Bug in Mercurial?
Patrick Mézard
pmezard at gmail.com
Wed Dec 23 14:14:20 CST 2009
Le 23/12/09 20:45, Octavian Râşniţă a écrit :
> 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?
> (And why they don't match many many other files which are stored in
> other subdirectories under root\templates?)
By default, patterns in .hgignore operates in regexp mode. Insert the following line at the beginning of the file:
syntax: glob
Additional information here: http://hg.intevation.org/mercurial/crew/file/8cb482a0d39e/doc/hgignore.5.txt
--
Patrick Mézard
More information about the Mercurial
mailing list