0

I have got a folder containing a list of diff files in a Mercurial queue (mq) format and I want to apply these patches.

At first I tried git am --patch-format=hg -- "path/to/files/", but this gave me the error Patch is empty. Was it split wrong?. I tried git am --continue, hoping this is a non-stopping error, but it complains Patch does not have a valid e-mail address.. I then typed git am --abort.

I also tried to use git am --patch-format=hg -- "path/to/files/*.diff" and git am -- "path/to/files/*.diff" but these complained that there is No such file or directory. Is there a better git tool that I must use, or am I misunderstanding how git am works?

Strategy Thinker
  • 343
  • 1
  • 3
  • 15

1 Answers1

0

git am is command for applying patches and sequences of patches from e-mails, either mbox or Maildir format, while MQ is just set of "naked" pathches, not wrapped into e-mails (with additional metadata in e-mails) - in "easy case" or hg-repository (if patches are versioned).

You have not expect this format as applicable for git am ("Apply Mail") command

If you want to apply patches from (plain unversioned) Mercurial Queue, you must to see at git apply carefully (AFAICR, it can apply only single patch per command, but TBT!!!)

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110