~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-03 05:10:00 UTC
  • mfrom: (5193.2.2 relpath-docstring)
  • Revision ID: pqm@pqm.ubuntu.com-20100503051000-ax5yg7yz7p5ks1da
(spiv) Improve docstring of bzrlib.osutils.relpath (Alexander Belchenko)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1147
1147
 
1148
1148
 
1149
1149
def relpath(base, path):
1150
 
    """Return path relative to base, or raise exception.
 
1150
    """Return path relative to base, or raise PathNotChild exception.
1151
1151
 
1152
1152
    The path may be either an absolute path or a path relative to the
1153
1153
    current working directory.
1155
1155
    os.path.commonprefix (python2.4) has a bad bug that it works just
1156
1156
    on string prefixes, assuming that '/u' is a prefix of '/u2'.  This
1157
1157
    avoids that problem.
 
1158
 
 
1159
    NOTE: `base` should not have a trailing slash otherwise you'll get
 
1160
    PathNotChild exceptions regardless of `path`.
1158
1161
    """
1159
1162
 
1160
1163
    if len(base) < MIN_ABS_PATHLENGTH: