Show More
@@ -23,15 +23,22 b' class pathauditor(object):' | |||
|
23 | 23 | - under top-level .hg |
|
24 | 24 | - starts at the root of a windows drive |
|
25 | 25 | - contains ".." |
|
26 | ||
|
27 | More check are also done about the file system states: | |
|
26 | 28 | - traverses a symlink (e.g. a/symlink_here/b) |
|
27 | 29 | - inside a nested repository (a callback can be used to approve |
|
28 | 30 | some nested repositories, e.g., subrepositories) |
|
31 | ||
|
32 | The file system checks are only done when 'realfs' is set to True (the | |
|
33 | default). They should be disable then we are auditing path for operation on | |
|
34 | stored history. | |
|
29 | 35 | ''' |
|
30 | 36 | |
|
31 | def __init__(self, root, callback=None): | |
|
37 | def __init__(self, root, callback=None, realfs=True): | |
|
32 | 38 | self.audited = set() |
|
33 | 39 | self.auditeddir = set() |
|
34 | 40 | self.root = root |
|
41 | self._realfs = realfs | |
|
35 | 42 | self.callback = callback |
|
36 | 43 | if os.path.lexists(root) and not util.checkcase(root): |
|
37 | 44 | self.normcase = util.normcase |
@@ -81,7 +88,8 b' class pathauditor(object):' | |||
|
81 | 88 | normprefix = os.sep.join(normparts) |
|
82 | 89 | if normprefix in self.auditeddir: |
|
83 | 90 | break |
|
84 |
self._ |
|
|
91 | if self._realfs: | |
|
92 | self._checkfs(prefix, path) | |
|
85 | 93 | prefixes.append(normprefix) |
|
86 | 94 | parts.pop() |
|
87 | 95 | normparts.pop() |
General Comments 0
You need to be logged in to leave comments.
Login now