108
108
if maxnum is not None and index > maxnum:
111
mainline = branch.revision_history()
112
112
revisions = branch.repository.get_revisions(revids)
113
113
revisionparents = branch.repository.get_graph().get_parents(revids)
114
114
directparentcache = [None for revision in revisions]
150
150
[], parents, children])
152
152
branchlineid = None
153
#Try and see if we are the same branchline as one of our children
154
#If we are, use the same branchlineid
155
for (childrevid, childindex, childbranchlineid) in children_ext:
156
childsparents = revisionparents[childindex]
158
if len(children) == 1 and len(childsparents) == 1:
159
# one-one relationship between parent and child
160
branchlineid = childbranchlineid
163
#Is the current revision the direct parent of the child?
164
if revision.revision_id == \
165
getdirectparent(childrevid, childindex, childsparents):
166
branchlineid = childbranchlineid
154
if revision.revision_id in mainline:
157
#Try and see if we are the same branchline as one of our children
158
#If we are, use the same branchlineid
159
for (childrevid, childindex, childbranchlineid) in children_ext:
160
childsparents = revisionparents[childindex]
162
if len(children) == 1 and len(childsparents) == 1:
163
# one-one relationship between parent and child
164
branchlineid = childbranchlineid
167
#Is the current revision the direct parent of the child?
168
if childbranchlineid != 0 and revision.revision_id == \
169
getdirectparent(childrevid, childindex, childsparents):
170
branchlineid = childbranchlineid
169
173
if branchlineid is None:
170
174
branchlineid = lastbranchlineid = lastbranchlineid + 1