'hg ci .' regression

Alexis S. L. Carvalho alexis at cecm.usp.br
Sun Mar 18 21:50:35 CDT 2007


Thus spake Giorgos Keramidas:
> Changeset 4182:01c4ea5e788c to the crew repository seems to have caused
> problems with commands that use a 'dot directory', i.e.:
> 
>     hg ci .
> 
> I've attached a patch for crew which expands tests/test-commit to test
> this, and updated test-commit.out with the output of Hg for versions
> before crew @ 4182.
> 
> Alexis, since you are the one who made change 4182:01c4ea5e788c, any
> idea how this could have broken commands like "hg ci ."?

If this is only a problem with commit, and only when you're in the root
of the repo, it should be easy to fix - see the patch below.  Or did you
also see some other stuff breaking?

Thanks for the report.

Alexis

diff -r 815ad65cfca9 mercurial/commands.py
--- a/mercurial/commands.py	Sun Mar 18 20:44:58 2007 +0100
+++ b/mercurial/commands.py	Sun Mar 18 23:48:11 2007 -0300
@@ -431,6 +431,8 @@ def commit(ui, repo, *pats, **opts):
         slist = None
         for f in fns:
             if f not in files:
+                if f == '.':
+                    continue
                 rf = repo.wjoin(f)
                 if f in unknown:
                     raise util.Abort(_("file %s not tracked!") % rf)



More information about the Mercurial-devel mailing list