/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Vincent Ladeuil
  • Date: 2010-04-29 15:41:20 UTC
  • mto: (5355.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5356.
  • Revision ID: v.ladeuil+lp@free.fr-20100429154120-0xoh32ggrusndxkz
First texinfo test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import os
18
18
import re
19
19
import stat
20
 
from stat import S_ISREG, S_ISDIR, S_ISLNK, ST_MODE, ST_SIZE
 
20
from stat import (S_ISREG, S_ISDIR, S_ISLNK, ST_MODE, ST_SIZE,
 
21
                  S_ISCHR, S_ISBLK, S_ISFIFO, S_ISSOCK)
21
22
import sys
22
23
import time
23
24
import codecs
 
25
import warnings
24
26
 
25
27
from bzrlib.lazy_import import lazy_import
26
28
lazy_import(globals(), """
1147
1149
 
1148
1150
 
1149
1151
def relpath(base, path):
1150
 
    """Return path relative to base, or raise PathNotChild exception.
 
1152
    """Return path relative to base, or raise exception.
1151
1153
 
1152
1154
    The path may be either an absolute path or a path relative to the
1153
1155
    current working directory.
1155
1157
    os.path.commonprefix (python2.4) has a bad bug that it works just
1156
1158
    on string prefixes, assuming that '/u' is a prefix of '/u2'.  This
1157
1159
    avoids that problem.
1158
 
 
1159
 
    NOTE: `base` should not have a trailing slash otherwise you'll get
1160
 
    PathNotChild exceptions regardless of `path`.
1161
1160
    """
1162
1161
 
1163
1162
    if len(base) < MIN_ABS_PATHLENGTH: