Rev 5198: (spiv) Improve docstring of bzrlib.osutils.relpath (Alexander Belchenko) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon May 3 06:10:04 BST 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5198 [merge]
revision-id: pqm at pqm.ubuntu.com-20100503051000-ax5yg7yz7p5ks1da
parent: pqm at pqm.ubuntu.com-20100501043455-hc1xylhnwoemafbx
parent: bialix at ukr.net-20100430070020-1mt3wl782803cf8o
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2010-05-03 06:10:00 +0100
message:
(spiv) Improve docstring of bzrlib.osutils.relpath (Alexander Belchenko)
modified:
bzrlib/osutils.py osutils.py-20050309040759-eeaff12fbf77ac86
=== modified file 'bzrlib/osutils.py'
--- a/bzrlib/osutils.py 2010-04-30 11:35:43 +0000
+++ b/bzrlib/osutils.py 2010-05-03 05:10:00 +0000
@@ -1147,7 +1147,7 @@
def relpath(base, path):
- """Return path relative to base, or raise exception.
+ """Return path relative to base, or raise PathNotChild exception.
The path may be either an absolute path or a path relative to the
current working directory.
@@ -1155,6 +1155,9 @@
os.path.commonprefix (python2.4) has a bad bug that it works just
on string prefixes, assuming that '/u' is a prefix of '/u2'. This
avoids that problem.
+
+ NOTE: `base` should not have a trailing slash otherwise you'll get
+ PathNotChild exceptions regardless of `path`.
"""
if len(base) < MIN_ABS_PATHLENGTH:
More information about the bazaar-commits
mailing list