D4819: identify: only query remote bookmarks if needed
valentin.gatienbaron (Valentin Gatien-Baron)
phabricator at mercurial-scm.org
Tue Oct 2 12:19:33 EDT 2018
valentin.gatienbaron updated this revision to Diff 11564.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4819?vs=11515&id=11564
REVISION DETAIL
https://phab.mercurial-scm.org/D4819
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
@@ -3013,6 +3013,7 @@
output = [hexrev]
fm.data(id=hexrev)
+ @util.cachefunc
def getbms():
bms = []
@@ -3023,17 +3024,17 @@
return sorted(bms)
- bms = getbms()
if bookmarks:
- output.extend(bms)
+ output.extend(getbms())
elif default and not ui.quiet:
# multiple bookmarks for a single parent separated by '/'
- bm = '/'.join(bms)
+ bm = '/'.join(getbms())
if bm:
output.append(bm)
fm.data(node=hex(remoterev))
- fm.data(bookmarks=fm.formatlist(bms, name='bookmark'))
+ if 'bookmarks' in fm.datahint():
+ fm.data(bookmarks=fm.formatlist(getbms(), name='bookmark'))
else:
if rev:
repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
To: valentin.gatienbaron, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list