On Fri, Sep 16, 2016 at 11:01 AM, Uwe Brauer <o...@mat.ucm.es> wrote:
>>>> "Kevin" == Kevin Bullock <kbull...@ringworld.org> writes:
> >> On Sep 15, 2016, at 10:52, Uwe Brauer <o...@mat.ucm.es> wrote:
> > [...]
> >> So I try
> >> hg export -g -r 6851 -o ../pretty-not-merged.patch
> >> But when I try to import that patch into git
> >> git am --patch-format=hg pretty-not-merged.patch
> >> I obtain
> >> error: patch failed: doc/auctex.texi:165
> >> error: doc/auctex.texi: patch does not apply
> > I think you'll have a hard time applying your later changes
> > (6851:7a326e5bfa12) without your earlier ones to the same file
> > (6846:19350016f7cd and 6847:c54ae6c3004a). Your `hg export` command
> > only exported the last commit in your branch. I don't see anything
> > fundamentally wrong with your graph.
> Thanks, you are right, but it did not help.
> Here is what I done.
> Since I am not sure whether the git-hg plugin was the culprit
> I cloned the auctex repo again via hg clone,
> hg clone git://git.savannah.gnu.org/auctex.git auctex-hg
> Then I run in my local repo
> hg export -r 6847::6851 -o mypatch.patch
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
> And in the recently cloned auctex-hg repo
> I run
> hg import mypatch.patch
"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
If you use the suggested format string for "hg export", you will get 5
patch files which you can import individually.
> applying mypatch.patch
> patching file doc/auctex.texi
> Hunk #1 FAILED at 163
> Hunk #3 FAILED at 2594
> Hunk #4 FAILED at 2622
> 3 out of 4 hunks FAILED -- saving rejects to file doc/auctex.texi.rej
> abort: patch failed to apply
Hope that helps,
Mercurial mailing list