mercurial/cmdutil.py
changeset 6112 5ffa962783c4
parent 5976 9f1e6ab76069
child 6139 989467e8e3a9
--- a/mercurial/cmdutil.py	Fri Feb 15 10:38:37 2008 -0200
+++ b/mercurial/cmdutil.py	Fri Feb 15 10:38:37 2008 -0200
@@ -1133,10 +1133,11 @@
                 continue
             if f not in files:
                 rf = repo.wjoin(f)
+                rel = repo.pathto(f)
                 try:
                     mode = os.lstat(rf)[stat.ST_MODE]
                 except OSError:
-                    raise util.Abort(_("file %s not found!") % rf)
+                    raise util.Abort(_("file %s not found!") % rel)
                 if stat.S_ISDIR(mode):
                     name = f + '/'
                     if slist is None:
@@ -1145,12 +1146,12 @@
                     i = bisect.bisect(slist, name)
                     if i >= len(slist) or not slist[i].startswith(name):
                         raise util.Abort(_("no match under directory %s!")
-                                         % rf)
+                                         % rel)
                 elif not (stat.S_ISREG(mode) or stat.S_ISLNK(mode)):
                     raise util.Abort(_("can't commit %s: "
-                                       "unsupported file type!") % rf)
+                                       "unsupported file type!") % rel)
                 elif f not in repo.dirstate:
-                    raise util.Abort(_("file %s not tracked!") % rf)
+                    raise util.Abort(_("file %s not tracked!") % rel)
     else:
         files = []
     try: