# HG changeset patch # User Alexis S. L. Carvalho # Date 1181772958 10800 # Node ID b841dc886ba1698d34f8da04afc64b9ee91d9a64 # Parent d092e962c4f8f8c638ddd6939d48ccefbbc58ff0 commands.commit: don't use the unknown list diff -r d092e962c4f8 -r b841dc886ba1 mercurial/commands.py --- a/mercurial/commands.py Wed Jun 13 19:15:58 2007 -0300 +++ b/mercurial/commands.py Wed Jun 13 19:15:58 2007 -0300 @@ -404,8 +404,6 @@ continue if f not in files: rf = repo.wjoin(f) - if f in unknown: - raise util.Abort(_("file %s not tracked!") % rf) try: mode = os.lstat(rf)[stat.ST_MODE] except OSError: @@ -422,6 +420,8 @@ elif not (stat.S_ISREG(mode) or stat.S_ISLNK(mode)): raise util.Abort(_("can't commit %s: " "unsupported file type!") % rf) + elif repo.dirstate.state(f) == '?': + raise util.Abort(_("file %s not tracked!") % rf) else: files = [] try: