Request: 'hg import' should produce conflict markers

Nathan Ridge zeratul976 at hotmail.com
Fri Jul 3 21:45:12 UTC 2015


Hi,

I often need to apply patch files with 'hg import' without knowing exactly which ancestor revision they apply to.

Currently, if a patch fails to merge cleanly, 'hg import' produces reject files. I find these very annoying to work with. I much prefer the conflict markers inserted by other commands such as 'graft' and 'rebase'.

I can get conflict markers by using 'patch --merge' to apply the patch rather than 'hg import', but then patch metadata such as author and commit message are lost, and I need to enter that metadata again manually when committing the changes.

In bug 4697 [1] I discovered that you can configure 'hg import' to use a custom patch tool such as 'patch --merge' using the 'ui.patch' option, but that doesn't give me anything over using 'patch --merge' directly in the case where there are conflicts. (In the case where there are no conflicts, it performs the commit, so that's an improvement.)

I would really like for 'hg import' to behave in the following way:

  - It has an option to produce conflict markers itself, rather than doing it via
    an external tool.

  - It tracks the conflicts and allows you to use 'hg resolve' to resolve them.

  - It remembers the commit metadata and allows you to perform the commit
    after resolving the conflicts with 'hg import --continue'.

Thoughts?

Thanks,
Nate

[1] http://bz.selenic.com/show_bug.cgi?id=4697
 		 	   		  


More information about the Mercurial-devel mailing list