Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 18996:160d8416e286
summary: make "incoming" information sensitive to branch in URL (issue3830)
Before this patch, "incoming" information of "hg summary --remote" is
not sensitive to the branch specified in the URL of the destination
repository, even though "hg pull"/"hg incoming" are so.
Invocation of "discovery.findcommonincoming()" without "heads"
argument treats revisions on branches other than the one specified in
the URL as incoming ones unexpectedly.
This patch looks head revisions, which are already detected by
"hg.addbranchrevs()" from URL, up against "other" repository, and
invokes "discovery.findcommonincoming()" with list of them as "heads"
to limit calculation of incoming revisions.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 09 Apr 2013 23:40:11 +0900 |
parents | 32843795e9b3 |
children | 4cf09a1bf5b2 |
comparison
equal
deleted
inserted
replaced
18995:0023a6e49268 | 18996:160d8416e286 |
---|---|
5465 t = [] | 5465 t = [] |
5466 source, branches = hg.parseurl(ui.expandpath('default')) | 5466 source, branches = hg.parseurl(ui.expandpath('default')) |
5467 other = hg.peer(repo, {}, source) | 5467 other = hg.peer(repo, {}, source) |
5468 revs, checkout = hg.addbranchrevs(repo, other, branches, | 5468 revs, checkout = hg.addbranchrevs(repo, other, branches, |
5469 opts.get('rev')) | 5469 opts.get('rev')) |
5470 if revs: | |
5471 revs = [other.lookup(rev) for rev in revs] | |
5470 ui.debug('comparing with %s\n' % util.hidepassword(source)) | 5472 ui.debug('comparing with %s\n' % util.hidepassword(source)) |
5471 repo.ui.pushbuffer() | 5473 repo.ui.pushbuffer() |
5472 commoninc = discovery.findcommonincoming(repo, other) | 5474 commoninc = discovery.findcommonincoming(repo, other, heads=revs) |
5473 _common, incoming, _rheads = commoninc | 5475 _common, incoming, _rheads = commoninc |
5474 repo.ui.popbuffer() | 5476 repo.ui.popbuffer() |
5475 if incoming: | 5477 if incoming: |
5476 t.append(_('1 or more incoming')) | 5478 t.append(_('1 or more incoming')) |
5477 | 5479 |