~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/chk_map.py

  • Committer: Jelmer Vernooij
  • Date: 2009-05-13 21:59:57 UTC
  • mto: This revision was merged to the branch mainline in revision 4360.
  • Revision ID: jelmer@samba.org-20090513215957-9se99cq16q0h460t
Support empty keys when looking for common prefixes in CHKMap.

Show diffs side-by-side

added added

removed removed

Lines of Context:
559
559
        """
560
560
        if key.startswith(prefix):
561
561
            return prefix
 
562
        pos = -1
562
563
        # Is there a better way to do this?
563
564
        for pos, (left, right) in enumerate(zip(prefix, key)):
564
565
            if left != right: