##// END OF EJS Templates
revlog: fix descendants() if nullrev is in revs...
Nicolas Dumazet -
r12950:2405b4a5 stable
parent child Browse files
Show More
@@ -607,8 +607,14 b' class revlog(object):'
607 607 some rev in revs, i.e., each revision is *not* considered a
608 608 descendant of itself. Results are ordered by revision number (a
609 609 topological sort)."""
610 first = min(revs)
611 if first == nullrev:
612 for i in self:
613 yield i
614 return
615
610 616 seen = set(revs)
611 for i in xrange(min(revs) + 1, len(self)):
617 for i in xrange(first + 1, len(self)):
612 618 for x in self.parentrevs(i):
613 619 if x != nullrev and x in seen:
614 620 seen.add(i)
@@ -39,13 +39,32 b''
39 39
40 40 Convert from null revision
41 41
42 $ hg convert --config convert.hg.startrev=null source empty
43 initializing destination empty repository
42 $ hg convert --config convert.hg.startrev=null source full
43 initializing destination full repository
44 44 scanning source...
45 45 sorting...
46 46 converting...
47 5 0: add a b
48 4 1: add c
49 3 2: copy e from a, change b
50 2 3: change a
51 1 4: merge 2 and 3, copy d from b
52 0 5: change a
47 53
48 $ glog empty
54 $ glog full
55 o 5 "5: change a" files: a
56 |
57 o 4 "4: merge 2 and 3, copy d from b" files: d e
58 |\
59 | o 3 "3: change a" files: a
60 | |
61 o | 2 "2: copy e from a, change b" files: b e
62 | |
63 o | 1 "1: add c" files: c
64 |/
65 o 0 "0: add a b" files: a b
66
67 $ rm -Rf full
49 68
50 69 Convert from zero revision
51 70
General Comments 0
You need to be logged in to leave comments. Login now