Show More
@@ -1690,7 +1690,7 b' class localrepository(repo.repository):' | |||||
1690 | # inconsistent view |
|
1690 | # inconsistent view | |
1691 | cl = self.changelog |
|
1691 | cl = self.changelog | |
1692 | cl.delayupdate() |
|
1692 | cl.delayupdate() | |
1693 |
oldheads = |
|
1693 | oldheads = cl.heads() | |
1694 |
|
1694 | |||
1695 | tr = self.transaction("\n".join([srctype, urlmod.hidepassword(url)])) |
|
1695 | tr = self.transaction("\n".join([srctype, urlmod.hidepassword(url)])) | |
1696 | try: |
|
1696 | try: | |
@@ -1781,14 +1781,20 b' class localrepository(repo.repository):' | |||||
1781 | _('missing file data for %s:%s - run hg verify') % |
|
1781 | _('missing file data for %s:%s - run hg verify') % | |
1782 | (f, hex(n))) |
|
1782 | (f, hex(n))) | |
1783 |
|
1783 | |||
1784 | newheads = len(cl.heads()) |
|
1784 | dh = 0 | |
1785 |
|
|
1785 | if oldheads: | |
1786 |
|
|
1786 | heads = cl.heads() | |
1787 |
h |
|
1787 | dh = len(heads) - len(oldheads) | |
|
1788 | for h in heads: | |||
|
1789 | if h not in oldheads and 'close' in self[h].extra(): | |||
|
1790 | dh -= 1 | |||
|
1791 | htext = "" | |||
|
1792 | if dh: | |||
|
1793 | htext = _(" (%+d heads)") % dh | |||
1788 |
|
1794 | |||
1789 | self.ui.status(_("added %d changesets" |
|
1795 | self.ui.status(_("added %d changesets" | |
1790 | " with %d changes to %d files%s\n") |
|
1796 | " with %d changes to %d files%s\n") | |
1791 |
% (changesets, revisions, files, h |
|
1797 | % (changesets, revisions, files, htext)) | |
1792 |
|
1798 | |||
1793 | if changesets > 0: |
|
1799 | if changesets > 0: | |
1794 | p = lambda: cl.writepending() and self.root or "" |
|
1800 | p = lambda: cl.writepending() and self.root or "" | |
@@ -1817,11 +1823,10 b' class localrepository(repo.repository):' | |||||
1817 | source=srctype, url=url) |
|
1823 | source=srctype, url=url) | |
1818 |
|
1824 | |||
1819 | # never return 0 here: |
|
1825 | # never return 0 here: | |
1820 |
if |
|
1826 | if dh < 0: | |
1821 |
return |
|
1827 | return dh - 1 | |
1822 | else: |
|
1828 | else: | |
1823 |
return |
|
1829 | return dh + 1 | |
1824 |
|
||||
1825 |
|
1830 | |||
1826 | def stream_in(self, remote, requirements): |
|
1831 | def stream_in(self, remote, requirements): | |
1827 | lock = self.lock() |
|
1832 | lock = self.lock() |
@@ -27,6 +27,36 b'' | |||||
27 | summary: add foo |
|
27 | summary: add foo | |
28 |
|
28 | |||
29 | $ cd .. |
|
29 | $ cd .. | |
|
30 | ||||
|
31 | don't show "(+1 heads)" message when pulling closed head | |||
|
32 | ||||
|
33 | $ hg clone -q repo repo2 | |||
|
34 | $ hg clone -q repo2 repo3 | |||
|
35 | $ cd repo2 | |||
|
36 | $ hg up -q 0 | |||
|
37 | $ echo hello >> foo | |||
|
38 | $ hg ci -mx1 | |||
|
39 | created new head | |||
|
40 | $ hg ci -mx2 --close-branch | |||
|
41 | $ cd ../repo3 | |||
|
42 | $ hg heads -q --closed | |||
|
43 | 2:effea6de0384 | |||
|
44 | 1:ed1b79f46b9a | |||
|
45 | $ hg pull | |||
|
46 | pulling from $TESTTMP/repo2 | |||
|
47 | searching for changes | |||
|
48 | adding changesets | |||
|
49 | adding manifests | |||
|
50 | adding file changes | |||
|
51 | added 2 changesets with 1 changes to 1 files | |||
|
52 | (run 'hg update' to get a working copy) | |||
|
53 | $ hg heads -q --closed | |||
|
54 | 4:996201fa1abf | |||
|
55 | 2:effea6de0384 | |||
|
56 | 1:ed1b79f46b9a | |||
|
57 | ||||
|
58 | $ cd .. | |||
|
59 | ||||
30 | $ hg init copy |
|
60 | $ hg init copy | |
31 | $ cd copy |
|
61 | $ cd copy | |
32 |
|
62 |
General Comments 0
You need to be logged in to leave comments.
Login now