D3015: parseurl: consistently call second output "branches"

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon Apr 2 15:46:30 UTC 2018


martinvonz created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3015

AFFECTED FILES
  hgext/histedit.py
  mercurial/hg.py

CHANGE DETAILS

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -530,13 +530,13 @@
 
     if isinstance(source, bytes):
         origsource = ui.expandpath(source)
-        source, branch = parseurl(origsource, branch)
+        source, branches = parseurl(origsource, branch)
         srcpeer = peer(ui, peeropts, source)
     else:
         srcpeer = source.peer() # in case we were called with a localrepo
-        branch = (None, branch or [])
+        branches = (None, branch or [])
         origsource = source = srcpeer.url()
-    rev, checkout = addbranchrevs(srcpeer, srcpeer, branch, rev)
+    rev, checkout = addbranchrevs(srcpeer, srcpeer, branches, rev)
 
     if dest is None:
         dest = defaultdest(source)
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -899,10 +899,10 @@
     if opts is None:
         opts = {}
     dest = ui.expandpath(remote or 'default-push', remote or 'default')
-    dest, revs = hg.parseurl(dest, None)[:2]
+    dest, branches = hg.parseurl(dest, None)[:2]
     ui.status(_('comparing with %s\n') % util.hidepassword(dest))
 
-    revs, checkout = hg.addbranchrevs(repo, repo, revs, None)
+    revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
     other = hg.peer(repo, opts, dest)
 
     if revs:



To: martinvonz, durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list