branch - How to prevent a file from automatically merging when switching branches in Mercurial? -


Assume that I have two branches default and newfeature . I have a file named readme.txt in both the files I am working on the newfeature branch and I make a change on readme.txt. If I run hg up default without changes, Mercurial automatically merges into the version of readme.txt in newfeature in default .

>

How can I change this behavior? What I'm worried about, developers before they are committed before switching the branches, thus doing whatever they are doing is merged.

How this process looks:

C: \ source \ branchestest \ Main & gt; HG branch exams C: \ source \ branchTest \ main & gt; Hg position M readme.txt c: \ source \ branchTest \ main & gt; Hg up default merged readme.txt 0 files updated, 1 files merged, 0 files removed, 0 files unresolved, C: \ source \ branchTest \ Main & gt;

Note the automated merge as I have not changed the readme.txt. Boring does not warn me that it will happen.

Any suggestions?

Use hg up -c (lower-case 'C' ). This will check your working directory before updating it.

You can make it the default in your HGRC file.


Comments

Popular posts from this blog

google indexing -

wpf - Custom Message Box Advice -

Eclipse CDT variable colors in editor -