Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 12614:f314723f36f5 stable
revset: fix #branch in urls for outgoing()
hg log -r 'outgoing(..)' ignored #branch in some cases.
This patch fixes it.
The cases where it misbehaved are now covered by the added
test-revset-outgoing.t
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Tue, 05 Oct 2010 11:34:13 +0200 |
parents | 40c40c6f20b8 |
children | 64db820c66a2 |
line wrap: on
line diff
--- a/mercurial/revset.py Fri Oct 01 10:18:57 2010 -0500 +++ b/mercurial/revset.py Tue Oct 05 11:34:13 2010 +0200 @@ -435,12 +435,15 @@ dest = l and getstring(l[0], _("outgoing wants a repository path")) or '' dest = repo.ui.expandpath(dest or 'default-push', dest or 'default') dest, branches = hg.parseurl(dest) + revs, checkout = hg.addbranchrevs(repo, repo, branches, []) + if revs: + revs = [repo.lookup(rev) for rev in revs] other = hg.repository(hg.remoteui(repo, {}), dest) repo.ui.pushbuffer() o = discovery.findoutgoing(repo, other) repo.ui.popbuffer() cl = repo.changelog - o = set([cl.rev(r) for r in repo.changelog.nodesbetween(o, None)[0]]) + o = set([cl.rev(r) for r in repo.changelog.nodesbetween(o, revs)[0]]) return [r for r in subset if r in o] def tagged(repo, subset, x):