2

I've been assigned the task to do a huge merge, ~1500 commits, on a mercurial project.

In the local fork we have deleted about ~200 files, right now I need to press d and enter for each file:

remote changed file/that/is/deleted/in/local which local deleted
use (c)hanged version or leave (d)eleted?

Is there a way to tell mercurial to choose to delete all those files?

orique
  • 1,295
  • 1
  • 27
  • 36

4 Answers4

1

Are you on a Unix-like system? If so, this command will automate answering "d" to all questions. That's what it's for. (Will only work if there are no other issues requesting manual intervention, of course.)

yes d | hg merge ...

If you're not, you could implement it yourself :-) E.g.,

perl -e "for (;1;) { print \"d\n\"; }" | hg merge ...

Or write a Windows batch file with an infinite loop (etc.)

YES.BAT | hg merge ...
alexis
  • 48,685
  • 16
  • 101
  • 161
0

since you are on windows, try using tortoise https://tortoisehg.bitbucket.io/

add your project. then your working directory, you will be able to see the files affected, you can then

perseusl
  • 348
  • 1
  • 14
0

You deleted them on local? You can't just do an hg addremove? If they changed after removal, but before pushing I think you are out of luck :(

Nick
  • 4,901
  • 40
  • 61
0

As per the second answer and its comments in Resolving conflicts: how to accept "their" changes automatically?,

hg merge --tool internal:local 

will work.

mikep
  • 3,841
  • 8
  • 21
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - [From Review](/review/low-quality-posts/16346156) – Patrick Hund Jun 07 '17 at 18:29
  • See edit above. It is the answer as per the second answer in https://stackoverflow.com/questions/15544736/resolving-conflicts-how-to-accept-their-changes-automatically – mikep Jun 07 '17 at 21:27