Show More
@@ -1742,8 +1742,13 b' class localrepository(repo.repository):' | |||
|
1742 | 1742 | |
|
1743 | 1743 | def addchangegroup(self, source, srctype, url): |
|
1744 | 1744 | """add changegroup to repo. |
|
1745 | returns number of heads modified or added + 1.""" | |
|
1746 | 1745 |
|
|
1746 | return values: | |
|
1747 | - nothing changed or no source: 0 | |
|
1748 | - more heads than before: 1+added heads (2..n) | |
|
1749 | - less heads than before: -1-removed heads (-2..-n) | |
|
1750 | - number of heads stays the same: 1 | |
|
1751 | """ | |
|
1747 | 1752 | def csmap(x): |
|
1748 | 1753 | self.ui.debug(_("add changeset %s\n") % short(x)) |
|
1749 | 1754 | return cl.count() |
@@ -1836,7 +1841,11 b' class localrepository(repo.repository):' | |||
|
1836 | 1841 | self.hook("incoming", node=hex(self.changelog.node(i)), |
|
1837 | 1842 | source=srctype, url=url) |
|
1838 | 1843 | |
|
1839 | return newheads - oldheads + 1 | |
|
1844 | # never return 0 here: | |
|
1845 | if newheads < oldheads: | |
|
1846 | return newheads - oldheads - 1 | |
|
1847 | else: | |
|
1848 | return newheads - oldheads + 1 | |
|
1840 | 1849 | |
|
1841 | 1850 | |
|
1842 | 1851 | def stream_in(self, remote): |
@@ -47,10 +47,11 b' done' | |||
|
47 | 47 | HGMERGE=true hg merge 3 |
|
48 | 48 | hg ci -m c-d -d "1000000 0" |
|
49 | 49 | |
|
50 | hg push ../c | |
|
51 | hg push -r 2 ../c | |
|
52 |
hg push -r 3 |
|
|
53 |
hg push - |
|
|
54 |
hg push - |
|
|
50 | hg push ../c; echo $? | |
|
51 | hg push -r 2 ../c; echo $? | |
|
52 | hg push -r 3 ../c; echo $? | |
|
53 | hg push -r 3 -r 4 ../c; echo $? | |
|
54 | hg push -f -r 3 -r 4 ../c; echo $? | |
|
55 | hg push -r 5 ../c; echo $? | |
|
55 | 56 | |
|
56 | 57 | exit 0 |
@@ -33,22 +33,32 b' pushing to ../c' | |||
|
33 | 33 | searching for changes |
|
34 | 34 | abort: push creates new remote branches! |
|
35 | 35 | (did you forget to merge? use push -f to force) |
|
36 | 0 | |
|
36 | 37 | pushing to ../c |
|
37 | 38 | searching for changes |
|
38 | 39 | no changes found |
|
40 | 0 | |
|
39 | 41 | pushing to ../c |
|
40 | 42 | searching for changes |
|
41 | 43 | abort: push creates new remote branches! |
|
42 | 44 | (did you forget to merge? use push -f to force) |
|
45 | 0 | |
|
46 | pushing to ../c | |
|
47 | searching for changes | |
|
48 | abort: push creates new remote branches! | |
|
49 | (did you forget to merge? use push -f to force) | |
|
50 | 0 | |
|
43 | 51 | pushing to ../c |
|
44 | 52 | searching for changes |
|
45 | 53 | adding changesets |
|
46 | 54 | adding manifests |
|
47 | 55 | adding file changes |
|
48 | 56 | added 2 changesets with 2 changes to 1 files (+2 heads) |
|
57 | 0 | |
|
49 | 58 | pushing to ../c |
|
50 | 59 | searching for changes |
|
51 | 60 | adding changesets |
|
52 | 61 | adding manifests |
|
53 | 62 | adding file changes |
|
54 | 63 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
64 | 0 |
General Comments 0
You need to be logged in to leave comments.
Login now