##// END OF EJS Templates
pathutil: use temporary variables instead of complicated wrapping...
Pierre-Yves David -
r27235:054cd38a default
parent child Browse files
Show More
@@ -111,14 +111,13 b' class pathauditor(object):'
111 raise
111 raise
112 else:
112 else:
113 if stat.S_ISLNK(st.st_mode):
113 if stat.S_ISLNK(st.st_mode):
114 raise error.Abort(
114 msg = _('path %r traverses symbolic link %r') % (path, prefix)
115 _('path %r traverses symbolic link %r')
115 raise error.Abort(msg)
116 % (path, prefix))
117 elif (stat.S_ISDIR(st.st_mode) and
116 elif (stat.S_ISDIR(st.st_mode) and
118 os.path.isdir(os.path.join(curpath, '.hg'))):
117 os.path.isdir(os.path.join(curpath, '.hg'))):
119 if not self.callback or not self.callback(curpath):
118 if not self.callback or not self.callback(curpath):
120 raise error.Abort(_("path '%s' is inside nested "
119 msg = _("path '%s' is inside nested repo %r")
121 "repo %r") % (path, prefix))
120 raise error.Abort(msg % (path, prefix))
122
121
123 def check(self, path):
122 def check(self, path):
124 try:
123 try:
General Comments 0
You need to be logged in to leave comments. Login now