~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/chk_map.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-05-13 23:24:16 UTC
  • mfrom: (4358.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20090513232416-vt21661225sx5v8m
(Jelmer) Handle empty keys when finding 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: