Bug in Mercurial?

Matt Mackall mpm at selenic.com
Wed Dec 23 14:11:05 CST 2009


On Wed, 2009-12-23 at 21:45 +0200, Octavian Râşniţă wrote:
> From: "Brendan Cully" <brendan at kublai.com>
> 
> > On Wednesday, 23 December 2009 at 19:21, Octavian Râşniţă wrote:
> >> Hi,
> >>
> >> Today I've seen that Mercurial ignores some files from a program I
> >> made and I don't know if I am missing something or it has a bug.
> >>
> >> I use to commit the changes using:
> >>
> >> hg commit -A
> >>
> >> Should this command add all the newly created files in the
> >> repository, even if they were not added before?
> >>
> >> I also use to check if there are any uncommited changes using:
> >>
> >> hg status
> >>
> >> Well, I have used hg status for more times, with no results displayed
> >> so I thought that all the changes were commited.
> >>
> >> After this step, I have pushed the changes to a central server as
> >> before, using:
> >>
> >> hg push ssh://hg@my-site.ro:16007/hg/ProjectName
> >>
> >> And then from that repository I cloned it with
> >>
> >> hg clone
> >>
> >> But 3 files were missing.
> >>
> >> I have checked again my computer with hg status, but no uncommited
> >> changes were reported.
> >>
> >> Then I added the files manually, using
> >>
> >> hg add path/to/the/file
> >>
> >> This command didn't tell me that those files were already added.
> >> After I added them this way, I was able to commit them, but I am not
> >> sure anymore that Mercurial is working correctly.
> >
> > Most likely the missing files are being deliberately ignored due to a
> > pattern in .hgignore. If so, hg status --ignored would show them.
> 
> Interesting!
> 
> Some of the files I want to be tracked appear as ignored, although I don't 
> know why. Here is the content of the .hgignore file:
> 
> logs
> temp
> include
> old_.*
> brk_local.*
> root/static/analiza
> root/static/anunturi
> 
> And here are the files that appear as ignored:
> 
> I root\templates\admin\user\old_login.tt
> I root\templates\comunicate\bvb\capital_change_body.tt
> I root\templates\cotatii\bvb\biggest_decreases_body.tt
> I root\templates\cotatii\bvb\biggest_increases_body.tt
> I root\templates\cotatii\bvb\delayed_body.tt
> I root\templates\cotatii\bvb\most_traded_body.tt
> I root\templates\indici\bvb\istorici_body.tt
> I root\templates\test\sha1.tt
> 
> Do you know why those patterns match these files?

The default syntax for ignore rules is regular expression, not shell
glob.

> (And why they don't match many many other files which are stored in other 
> subdirectories under root\templates?)

Files that are tracked or explicitly added stay tracked. 

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial mailing list