[PATCH 2 of 9 V2] push: accept revset argument for --rev
pierre-yves.david at logilab.fr
pierre-yves.david at logilab.fr
Fri Jul 6 12:54:03 CDT 2012
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1341510784 -7200
# Node ID 8d5c67b786a245ecb7b5e656c5a59766349c0ad8
# Parent ee5b997ce193817cbd608cee98ca97f7560cdc5d
push: accept revset argument for --rev
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4613,11 +4613,11 @@ def push(ui, repo, dest=None, **opts):
dest, branches = hg.parseurl(dest, opts.get('branch'))
ui.status(_('pushing to %s\n') % util.hidepassword(dest))
revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev'))
other = hg.peer(repo, opts, dest)
if revs:
- revs = [repo.lookup(rev) for rev in revs]
+ revs = [repo.lookup(r) for r in scmutil.revrange(repo, revs)]
repo._subtoppath = dest
try:
# push subrepos depth-first for coherent ordering
c = repo['']
More information about the Mercurial-devel
mailing list