~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tsort.py

  • Committer: Andrew Bennetts
  • Date: 2008-07-28 07:17:25 UTC
  • mto: This revision was merged to the branch mainline in revision 3585.
  • Revision ID: andrew.bennetts@canonical.com-20080728071725-k0ol8cpay2w33j1x
Fix trivial bug in an AssertionError.

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, -1)
520
 
                root_count += 1
 
519
                root_count = revno_to_branch_count.get(0, 0)
521
520
                if root_count:
522
521
                    revno = (0, root_count, 1)
523
522
                else:
524
523
                    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