changeset 17198:ecde35a1af9e

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.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 15 Jul 2012 12:43:10 -0400
parents 67b8cca2f12b
children c6e38fdff23c
files mercurial/hg.py tests/test-phases.t
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Mon Jul 16 16:19:53 2012 -0500
+++ b/mercurial/hg.py	Sun Jul 15 12:43:10 2012 -0400
@@ -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,
--- a/tests/test-phases.t	Mon Jul 16 16:19:53 2012 -0500
+++ b/tests/test-phases.t	Sun Jul 15 12:43:10 2012 -0400
@@ -112,7 +112,7 @@
   2 draft C
   3 draft D
   6 draft B'
-  $ hg outgoing -r default ../push-dest --template='{rev} {phase} {desc|firstline}\n'
+  $ hg outgoing -r 'branch(default)' ../push-dest --template='{rev} {phase} {desc|firstline}\n'
   comparing with ../push-dest
   searching for changes
   0 public A