git-hg plugin, problems with the patch.

Uwe Brauer oub at mat.ucm.es
Fri Sep 16 12:55:30 UTC 2016


   > On Fri, Sep 16, 2016 at 11:01 AM, Uwe Brauer <oub at mat.ucm.es> wrote:

   > If you look at mypatch.patch here, you'll see that it actually
   > contains multiple patches, one for each revision that you specified.
   > If you look at the help for "hg export", you'll see that the "-o"
   > option is meant to specify a *format string*, such as
   > "mypatch.patch.%n".


   > "hg import" expects the file to only contain a single patch. I don't
   > know the patch format well enought to know if it is possible to detect
   > that the file contains multiple patches, but for the moment at least,
   > "hg import" has tried to apply what is effectively a single corrupt
   > patch.

   > If you use the suggested format string for "hg export", you will get 5
   > patch files which you can import individually.

Thanks a lot, but I beg to differ.

I did run a test.


In dir orgin I run create-repo-orgin.sh which creates a repo with 5
commit containing one branch

I run hg export -r 1::3 -o mybranch.patch

In dir target I run create-repo-target.sh
which create a similar repo but without that branch



 and then

 hg import mybranch.patch

And everything works as expected.

So the patch I mentioned must be somehow corrupt.....



-------------- next part --------------
A non-text attachment was scrubbed...
Name: create-repo-orgin.sh
Type: text/x-sh
Size: 418 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20160916/2d4d3f9f/attachment-0004.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mybranch.patch
Type: text/x-diff
Size: 1277 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20160916/2d4d3f9f/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: create-repo-target.sh
Type: text/x-sh
Size: 189 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20160916/2d4d3f9f/attachment-0005.sh>


More information about the Mercurial mailing list