Bug 3830 - "incoming" informatioin of "hg summary" is not sensitive to branch in URL
Summary: "incoming" informatioin of "hg summary" is not sensitive to branch in URL
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: earlier
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-17 06:06 UTC by FUJIWARA Katsunori
Modified: 2017-11-01 18:04 UTC (History)
3 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FUJIWARA Katsunori 2013-02-17 06:06 UTC
"incoming" information of "hg summary --remote" is not sensitive
to the branch specified in destination URL, even though "hg
pull"/"hg incoming" are so.

this can be reproduced by script below:

    hg init src
    echo a > src/a
    hg -R src commit -Am '#0'

    hg clone src dst

    hg -R src branch foo
    hg -R src commit -m '#1'

    echo "==== 1 incoming should be in whole history ===="
    hg -R dst incoming
    hg -R dst summary --remote

    echo "==== no incoming should be in default branch ===="
    hg -R dst incoming "src#default"
    hg -R dst summary --remote --config paths.default="src#default"

In above script, "hg sumary --remote" for "src#default" will
show "remote: 1 or more incoming", even though there is no
incoming revision on "default" branch.
Comment 1 HG Bot 2013-04-16 20:15 UTC
Fixed by http://selenic.com/repo/hg/rev/160d8416e286
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
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.

(please test the fix)