This is an archive of the discontinued Mercurial Phabricator instance.

bookmarks: avoid traceback when two pushes race to delete the same bookmark
ClosedPublic

Authored by valentin.gatienbaron on Feb 15 2020, 4:05 PM.

Details

Summary

hg push -f -B remote-only-bookmark can raise server-side in
bookmarks._del (specifically in self._refmap.pop(mark)), if the
remote-only bookmark got deleted concurrently.

Fix this by simply not deleting the non-existent bookmark in that
case.

For avoidance of doubt, refusing to delete a bookmark that doesn't
exist when the push starts is taking care of elsewhere; no change of
behavior there.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.