[PATCH 1 of 2 V2] outgoing: accept revset argument for --rev
Pierre-Yves David
pierre-yves.david at logilab.fr
Tue Jul 17 09:26:20 CDT 2012
On Tue, Jul 17, 2012 at 10:18:52AM -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1342370590 14400
> # Node ID ecde35a1af9e326e124a52787dd355c4d24b07e7
> # 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,
> diff --git a/tests/test-phases.t b/tests/test-phases.t
> --- a/tests/test-phases.t
> +++ b/tests/test-phases.t
> @@ -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
Looks good to me.
--
Pierre-Yves David
http://www.logilab.fr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120717/86d61a81/attachment.pgp>
More information about the Mercurial-devel
mailing list