D5484: pull: use opts.get('bookmark') instead of opts['bookmark']
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Wed Dec 26 14:44:35 UTC 2018
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
This is done because at places in hgsubversion, we call the function directly. I
expect there might be more instances in extensions out there which calls
commands.push() directly. So let's not require explicitly passing of bookmark
value.
The use of opts['bookmark'] was introduced in
https://phab.mercurial-scm.org/rHGbad05a6afdc89cc58a2af320698ab29bd8de62d4.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5484
AFFECTED FILES
mercurial/commands.py
CHANGE DETAILS
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4417,7 +4417,7 @@
pullopargs = {}
nodes = None
- if opts['bookmark'] or revs:
+ if opts.get('bookmark') or revs:
# The list of bookmark used here is the same used to actually update
# the bookmark names, to avoid the race from issue 4689 and we do
# all lookup and bookmark queries in one go so they see the same
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list