Is it normal? So you just need to add \.hgignore
to the list to ignore itself?
views:
64answers:
2
+2
Q:
funny that when .hgignore is added for Mercurial, this file itself shows up as "?" in hg status?
+7
A:
Yes, but you don't want to ignore the .hgignore
file. When a new person checks out your repository, don't you want them to get your ignored-files list? Instead, do hg add .hgignore; hg commit
.
Bottom line: .hgignore
is tracked like any other file in the repository.
Borealid
2010-08-12 23:43:14
+1 for noting the symmetry - Mercurial shies away from special cases which is a Good Thing.
msw
2010-08-13 00:01:18
I can see sometimes we want `.hgignore` to be versioned as well, such as the `*.orig`, `*~` (emacs previous version file)... other time I may have `.csv` or `.txt` that I want to ignore but my coworkers don't want to ignore. They can always change their `.hgignore`, of course, but will they commit the file or should they?
動靜能量
2010-08-13 03:45:24
@Jian Lin: If they commit the file and push it, then anyone else pulling will also get their ignore settings. I think it's pretty unlikely there are files only *some* people want to ignore - if one person is not ignoring it, then it goes in the repo to be versioned. So the other people shouldn't be ignoring it b/c it's tracked!
Borealid
2010-08-13 04:36:09
Please see the `ui.ignore` config setting if you need a local ignore file in addition to the normal `.hgignore` file: http://www.selenic.com/mercurial/hgrc.5.html#ui
Martin Geisler
2010-08-13 07:48:25
+1
A:
Just to supplement Borealid's answer: ?
in hg status
means that the file is in the working directory, but not tracked. You usually see it in one of two situations:
- A file got generated that you don't need to check in, like a compiled binary or something.
- You added a new file to your project, but haven't
hg add
ed it yet.
In #1, you'll want to add the file or file type to .hgignore
. In #2, you want to hg add
the file. In the case of .hgignore
, it's #2.
tghw
2010-08-13 01:36:02