[PATCH 1 of 1] outgoing: accept revset argument for --rev

Matt Harbison matt_harbison at yahoo.com
Tue Jul 17 01:31:43 CDT 2012


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1342370590 14400
# Node ID c80794eb155b9281338a5a3c13aab740a188440b
# Parent  67b8cca2f12b0e07d8258d357510805c698e2124
outgoing: accept revset argument for --rev

There may be a more generic way that would add revset support to more commands
by adding revset support to addbranchrevs(), but given the proximity of the next
code freeze, a minimal change seems like the better choice.

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -518,7 +518,7 @@
     ui.status(_('comparing with %s\n') % util.hidepassword(dest))
     revs, checkout = addbranchrevs(repo, repo, branches, opts.get('rev'))
     if revs:
-        revs = [repo.lookup(rev) for rev in revs]
+        revs = [repo.lookup(rev) for rev in scmutil.revrange(repo, revs)]
 
     other = peer(repo, opts, dest)
     outgoing = discovery.findcommonoutgoing(repo, other, revs,


More information about the Mercurial-devel mailing list