Changeset 02304bccc7dd…
Parent b0b707b12891…
by
Changes to one file · Browse files at 02304bccc7dd Showing diff from parent b0b707b12891 Diff from another changeset...
@@ -64,11 +64,31 @@ lines = [ x.replace("\n", "") for x in fd.readlines() ]
fd.close()
os.unlink(filename)
- return lines
except IOError, e:
sys.stderr.write(_('can not read file "%s". Ignored.\n') % filename)
return []
+ # Convert absolute file paths to repo/cwd canonical
+ cwd = os.getcwd()
+ root = paths.find_root()
+ if cwd == root:
+ cwd_rel = ''
+ else:
+ cwd_rel = cwd[len(root+os.sep):] + os.sep
+ files = []
+ for f in lines:
+ try:
+ cpath = util.canonpath(root, cwd, f)
+ # canonpath will abort on .hg/ paths
+ except util.Abort:
+ pass
+ if cpath.startswith(cwd_rel):
+ cpath = cpath[len(cwd_rel):]
+ files.append(cpath)
+ else:
+ files.append(f)
+ return files
+
def _parse(ui, args):
options = {}
cmdoptions = {}
|
Loading...