Show More
@@ -1,3 +1,4 b'' | |||||
1 | 35fb62a3a673d5322f6274a44ba6456e5e4b3b37 0 iD8DBQBEYmO2ywK+sNU5EO8RAnaYAKCO7x15xUn5mnhqWNXqk/ehlhRt2QCfRDfY0LrUq2q4oK/KypuJYPHgq1A= |
|
1 | 35fb62a3a673d5322f6274a44ba6456e5e4b3b37 0 iD8DBQBEYmO2ywK+sNU5EO8RAnaYAKCO7x15xUn5mnhqWNXqk/ehlhRt2QCfRDfY0LrUq2q4oK/KypuJYPHgq1A= | |
2 | 2be3001847cb18a23c403439d9e7d0ace30804e9 0 iD8DBQBExUbjywK+sNU5EO8RAhzxAKCtyHAQUzcTSZTqlfJ0by6vhREwWQCghaQFHfkfN0l9/40EowNhuMOKnJk= |
|
2 | 2be3001847cb18a23c403439d9e7d0ace30804e9 0 iD8DBQBExUbjywK+sNU5EO8RAhzxAKCtyHAQUzcTSZTqlfJ0by6vhREwWQCghaQFHfkfN0l9/40EowNhuMOKnJk= | |
3 | 36a957364b1b89c150f2d0e60a99befe0ee08bd3 0 iD8DBQBFfL2QywK+sNU5EO8RAjYFAKCoGlaWRTeMsjdmxAjUYx6diZxOBwCfY6IpBYsKvPTwB3oktnPt5Rmrlys= |
|
3 | 36a957364b1b89c150f2d0e60a99befe0ee08bd3 0 iD8DBQBFfL2QywK+sNU5EO8RAjYFAKCoGlaWRTeMsjdmxAjUYx6diZxOBwCfY6IpBYsKvPTwB3oktnPt5Rmrlys= | |
|
4 | 27230c29bfec36d5540fbe1c976810aefecfd1d2 0 iD8DBQBFheweywK+sNU5EO8RAt7VAKCrqJQWT2/uo2RWf0ZI4bLp6v82jACgjrMdsaTbxRsypcmEsdPhlG6/8F4= |
@@ -13,3 +13,4 b' 6a03cff2b0f5d30281e6addefe96b993582f2eac' | |||||
13 | 35fb62a3a673d5322f6274a44ba6456e5e4b3b37 0.9 |
|
13 | 35fb62a3a673d5322f6274a44ba6456e5e4b3b37 0.9 | |
14 | 2be3001847cb18a23c403439d9e7d0ace30804e9 0.9.1 |
|
14 | 2be3001847cb18a23c403439d9e7d0ace30804e9 0.9.1 | |
15 | 36a957364b1b89c150f2d0e60a99befe0ee08bd3 0.9.2 |
|
15 | 36a957364b1b89c150f2d0e60a99befe0ee08bd3 0.9.2 | |
|
16 | 27230c29bfec36d5540fbe1c976810aefecfd1d2 0.9.3 |
@@ -1284,7 +1284,7 b' class localrepository(repo.repository):' | |||||
1284 | newheads = list(heads) |
|
1284 | newheads = list(heads) | |
1285 | for r in remote_heads: |
|
1285 | for r in remote_heads: | |
1286 | if r in self.changelog.nodemap: |
|
1286 | if r in self.changelog.nodemap: | |
1287 | desc = self.changelog.heads(r) |
|
1287 | desc = self.changelog.heads(r, heads) | |
1288 | l = [h for h in heads if h in desc] |
|
1288 | l = [h for h in heads if h in desc] | |
1289 | if not l: |
|
1289 | if not l: | |
1290 | newheads.append(r) |
|
1290 | newheads.append(r) |
@@ -716,15 +716,19 b' class revlog(object):' | |||||
716 | assert heads |
|
716 | assert heads | |
717 | return (orderedout, roots, heads) |
|
717 | return (orderedout, roots, heads) | |
718 |
|
718 | |||
719 | def heads(self, start=None): |
|
719 | def heads(self, start=None, stop=None): | |
720 | """return the list of all nodes that have no children |
|
720 | """return the list of all nodes that have no children | |
721 |
|
721 | |||
722 | if start is specified, only heads that are descendants of |
|
722 | if start is specified, only heads that are descendants of | |
723 | start will be returned |
|
723 | start will be returned | |
724 |
|
724 | if stop is specified, it will consider all the revs from stop | ||
|
725 | as if they had no children | |||
725 | """ |
|
726 | """ | |
726 | if start is None: |
|
727 | if start is None: | |
727 | start = nullid |
|
728 | start = nullid | |
|
729 | if stop is None: | |||
|
730 | stop = [] | |||
|
731 | stoprevs = dict.fromkeys([self.rev(n) for n in stop]) | |||
728 | startrev = self.rev(start) |
|
732 | startrev = self.rev(start) | |
729 | reachable = {startrev: 1} |
|
733 | reachable = {startrev: 1} | |
730 | heads = {startrev: 1} |
|
734 | heads = {startrev: 1} | |
@@ -733,10 +737,12 b' class revlog(object):' | |||||
733 | for r in xrange(startrev + 1, self.count()): |
|
737 | for r in xrange(startrev + 1, self.count()): | |
734 | for p in parentrevs(r): |
|
738 | for p in parentrevs(r): | |
735 | if p in reachable: |
|
739 | if p in reachable: | |
|
740 | if r not in stoprevs: | |||
736 | reachable[r] = 1 |
|
741 | reachable[r] = 1 | |
737 | heads[r] = 1 |
|
742 | heads[r] = 1 | |
738 | if p in heads: |
|
743 | if p in heads and p not in stoprevs: | |
739 | del heads[p] |
|
744 | del heads[p] | |
|
745 | ||||
740 | return [self.node(r) for r in heads] |
|
746 | return [self.node(r) for r in heads] | |
741 |
|
747 | |||
742 | def children(self, node): |
|
748 | def children(self, node): |
@@ -54,4 +54,9 b' hg push -r 3 -r 4 ../c; echo $?' | |||||
54 | hg push -f -r 3 -r 4 ../c; echo $? |
|
54 | hg push -f -r 3 -r 4 ../c; echo $? | |
55 | hg push -r 5 ../c; echo $? |
|
55 | hg push -r 5 ../c; echo $? | |
56 |
|
56 | |||
|
57 | # issue 450 | |||
|
58 | hg init ../e | |||
|
59 | hg push -r 0 ../e ; echo $? | |||
|
60 | hg push -r 1 ../e ; echo $? | |||
|
61 | ||||
57 | exit 0 |
|
62 | exit 0 |
@@ -62,3 +62,17 b' adding manifests' | |||||
62 | adding file changes |
|
62 | adding file changes | |
63 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
63 | added 1 changesets with 1 changes to 1 files (-1 heads) | |
64 | 0 |
|
64 | 0 | |
|
65 | pushing to ../e | |||
|
66 | searching for changes | |||
|
67 | adding changesets | |||
|
68 | adding manifests | |||
|
69 | adding file changes | |||
|
70 | added 1 changesets with 1 changes to 1 files | |||
|
71 | 0 | |||
|
72 | pushing to ../e | |||
|
73 | searching for changes | |||
|
74 | adding changesets | |||
|
75 | adding manifests | |||
|
76 | adding file changes | |||
|
77 | added 1 changesets with 1 changes to 1 files | |||
|
78 | 0 |
General Comments 0
You need to be logged in to leave comments.
Login now