'hg ci .' regression
keramida at ceid.upatras.gr
Mon Mar 19 08:08:40 CDT 2007
On 2007-03-18 23:50, "Alexis S. L. Carvalho" <alexis at cecm.usp.br> wrote:
> 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?
keramida at kobe:/tmp$ hg init hgtest
keramida at kobe:/tmp$ cd hgtest
keramida at kobe:/tmp/hgtest$ echo a > a
keramida at kobe:/tmp/hgtest$ mkdir foo
keramida at kobe:/tmp/hgtest$ echo a > foo/a
keramida at kobe:/tmp/hgtest$ hg stat
keramida at kobe:/tmp/hgtest$ hg addremove
keramida at kobe:/tmp/hgtest$ cd foo
keramida at kobe:/tmp/hgtest/foo$ hg ci -m foo .
keramida at kobe:/tmp/hgtest/foo$ cd ..
keramida at kobe:/tmp/hgtest$ hg ci -m root-dir .
abort: no match under directory /tmp/hgtest/.!
keramida at kobe:/tmp/hgtest$
> Thanks for the report.
The patch below does indeed fix "hg ci ." in the repo root. Thanks :)
> 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