diff -r 43a9e02a7b7f -r 94de83ed250e mercurial/bookmarks.py --- a/mercurial/bookmarks.py Mon Dec 05 17:40:01 2016 +0100 +++ b/mercurial/bookmarks.py Tue Nov 22 01:33:31 2016 -0800 @@ -323,8 +323,8 @@ finally: lockmod.release(tr, l, w) -def compare(repo, srcmarks, dstmarks, - srchex=None, dsthex=None, targets=None): +def comparebookmarks(repo, srcmarks, dstmarks, + srchex=None, dsthex=None, targets=None): '''Compare bookmarks between srcmarks and dstmarks This returns tuple "(addsrc, adddst, advsrc, advdst, diverge, @@ -443,7 +443,7 @@ ui.debug("checking for updated bookmarks\n") localmarks = repo._bookmarks (addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same - ) = compare(repo, remotemarks, localmarks, dsthex=hex) + ) = comparebookmarks(repo, remotemarks, localmarks, dsthex=hex) status = ui.status warn = ui.warn @@ -505,8 +505,8 @@ ''' ui.status(_("searching for changed bookmarks\n")) - r = compare(repo, other.listkeys('bookmarks'), repo._bookmarks, - dsthex=hex) + r = comparebookmarks(repo, other.listkeys('bookmarks'), repo._bookmarks, + dsthex=hex) addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r incomings = [] @@ -547,8 +547,8 @@ ''' ui.status(_("searching for changed bookmarks\n")) - r = compare(repo, repo._bookmarks, other.listkeys('bookmarks'), - srchex=hex) + r = comparebookmarks(repo, repo._bookmarks, other.listkeys('bookmarks'), + srchex=hex) addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r outgoings = [] @@ -592,8 +592,8 @@ This returns "(# of incoming, # of outgoing)" tuple. ''' - r = compare(repo, other.listkeys('bookmarks'), repo._bookmarks, - dsthex=hex) + r = comparebookmarks(repo, other.listkeys('bookmarks'), repo._bookmarks, + dsthex=hex) addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r return (len(addsrc), len(adddst))