~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tsort.py

(Jelmer) Fix a smal bug in Inventory.copy()

Show diffs side-by-side

added added

removed removed

Lines of Context:
516
516
                    revno = parent_revno[:-1] + (parent_revno[-1] + 1,)
517
517
            else:
518
518
                # no parents, use the root sequence
519
 
                root_count = revno_to_branch_count.get(0, 0)
 
519
                root_count = revno_to_branch_count.get(0, -1)
 
520
                root_count += 1
520
521
                if root_count:
521
522
                    revno = (0, root_count, 1)
522
523
                else:
523
524
                    revno = (1,)
524
 
                root_count += 1
525
525
                revno_to_branch_count[0] = root_count
526
526
 
527
527
            # store the revno for this node for future reference