Comments
Patch
@@ -90,6 +90,7 @@
self._abort = abort
allfiles = '\0'.join(dirstate._map)
self._loweredfiles = set(encoding.lower(allfiles).split('\0'))
+ self._existingonly = False
self._dirstate = dirstate
# The purpose of _newfiles is so that we don't complain about
# case collisions if someone were to call this object with the
@@ -111,6 +112,20 @@
raise util.Abort(msg)
self._ui.warn(_("warning: %s\n") % msg)
+ def _exact(self):
+ if self._existingonly:
+ return True
+ existing = []
+ for f, s in self._dirstate.iteritems():
+ if s[0] != 'r':
+ existing.append(f)
+ for f in self._newfiles:
+ existing.append(f)
+ allfiles = '\0'.join(existing)
+ self._loweredfiles = set(encoding.lower(allfiles).split('\0'))
+ self._existingonly = True
+ return False
+
class pathauditor(object):
'''ensure that a filesystem path contains no banned components.
the following properties of a path are checked: