~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 4555.2.1.

  • Committer: John Arbash Meinel
  • Date: 2009-07-22 16:41:48 UTC
  • mto: This revision was merged to the branch mainline in revision 4563.
  • Revision ID: john@arbash-meinel.com-20090722164148-uv3t6ath2t2tlo68
Fix bug #394227, osutils.relpath() could get into an infinite loop.

If your current path was at the root of a drive (like 'C:/', and you did something
like 'bzr init-repo H:/repo', then the relpath code would spin forever, trying
to find the relative path to H:/repo from C:/. The problem was that
os.path.split() doesn't strip off the drive letter, so you end up comparing
C:/ to H:/, and neither is 'shorter' to say that we didn't match.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: