merging & hgignore

Mads Kiilerich mads at kiilerich.com
Thu Jun 30 08:47:34 CDT 2011


On 06/30/2011 03:34 PM, watlab wrote:
> Quite simple use case:
> Branch A contains file1 and a .hgignore file, which contains "file2".
> Branch B contains file1 and file2 (and no .hgignore).
>
> Now I want to merge changes in file1 from B into A. But of course, I don't
> want to get file2 added to Branch A.
> How can this be achieved?

You can "hg rm file2" before you commit the merge.

(As you might know: .hgignore doesn't control which files are tracked by 
Mercurial. It only controls which untracked files will be reported by 
"hg status" and which files "hg add" without any file specifications 
will add.)

/Mads


More information about the Mercurial mailing list