~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tsort.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-08-07 23:31:23 UTC
  • mfrom: (3613.1.1 correct_ghost_revnos)
  • Revision ID: pqm@pqm.ubuntu.com-20080807233123-dgabwwjxlfwzvz51
(jam) Fix dotted revno counting for root descendants.

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