0

I have using mercurial version control for my project. Now I want to merge source from branch A to branch B.

And my questions are:

  • Is there any way to ignore some folder when merging source?
  • Or is there any way can I specify a folder to merge?

I searched Google for my issue but only find how to ignore files.

Can anyone help me in this issue? Thanks you so much

Trung Nguyen
  • 818
  • 2
  • 10
  • 17

1 Answers1

0

sounds like you are forking a folder in the project. one option is to add the folder in your .hgrc file to always use local file during merge

[merge-patterns]
path/to/folder/* = internal:local
device_exec
  • 1,686
  • 1
  • 9
  • 7
  • I have tried as your comment but all of sources are merged successfully. I added more content to hgrc file as below: [merge-patterns] path/to/folder_need_merge/* = internal:local I wonder if I whether did right or not. Thanks – Trung Nguyen May 18 '15 at 04:13
  • to merge successfully was the expected behavior, it always preserves your local changes ( per your second question). If you wanted to ignore that folder entirely so that it does not get pushed, you can add the folder to `.hgignore` – device_exec May 19 '15 at 00:11
  • mercurial also supports nested repos in case you want to version control them independently while keeping the folder structure – device_exec May 19 '15 at 00:14