Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 6112:5ffa962783c4
cmdutil.commit: use relative paths in the error messages
This is more consistent with other error messages and requires
less makeup in test-commit and test-symlink-basic.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 15 Feb 2008 10:38:37 -0200 |
parents | 9f1e6ab76069 |
children | 989467e8e3a9 |
line wrap: on
line diff
--- 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: