On 2015-12-29 14:16-0800 Alan W. Irwin wrote:

Part II.

> The above URL
[<http://stackoverflow.com/questions/25846189/git-am-error-patch-does-not-apply>]
> implies you should use the --reject git am option when
> -3 does not work, and I will say more about the practical details of
> how you resolve conflicts in that case once I have evaluated the
> contents of the first two patches and made any further commits to
> allow comprehensive testing of those two.

After amending the last of Arjen's patches to make comprehensive
testing work for example 9 and 14 (and many others such that the missing
Fortran examples list is now reduced down to just "15 16 19 20 21 22" which is a
huge improvement from where we started), the -3 option continued not to
work (as expected).  Therefore I followed up by

software@raven> git am --reject < 
0003-Implement-the-simplest-plshade-interface-used-by-x15.patch
Applying: Implement the simplest plshade interface - used by x15f This test 
case brought a deficiency in the interface for plpat to light. It has been 
corrected, but it might result in some incompatibilities
Checking patch bindings/f95/included_plplot_real_interfaces.f90...
error: while searching for:
     end interface plsdimap
     private :: plsdimap_impl

     interface plsmaj
         module procedure plsmaj_impl
     end interface plsmaj

error: patch failed: bindings/f95/included_plplot_real_interfaces.f90:344
error: while searching for:
                      real(dimxpmm,kind=private_plflt), 
real(diypmm,kind=private_plflt) )
end subroutine plsdimap_impl

subroutine plsmaj_impl( def, scale )
     real(kind=wp), intent(in) :: def, scale


error: patch failed: bindings/f95/included_plplot_real_interfaces.f90:2266
Checking patch bindings/f95/plplot_bindings.f90...
Hunk #1 succeeded at 758 (offset 45 lines).
Checking patch examples/f95/CMakeLists.txt...
Checking patch examples/f95/x15f.f90...
Applying patch bindings/f95/included_plplot_real_interfaces.f90 with 2 
rejects...
Rejected hunk #1.
Rejected hunk #2.
Applied patch bindings/f95/plplot_bindings.f90 cleanly.
Applied patch examples/f95/CMakeLists.txt cleanly.
Applied patch examples/f95/x15f.f90 cleanly.
Patch failed at 0001 Implement the simplest plshade interface - used by x15f 
This test case brought a deficiency in the interface for plpat to light. It has 
been corrected, but it might result in some incompatibilities
The copy of the patch that failed is found in:
    /home/software/plplot/HEAD/plplot.git/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

and

software@raven> git status
On branch new_f95_update
You are in the middle of an am session.
   (fix conflicts and then run "git am --continue")
   (use "git am --skip" to skip this patch)
   (use "git am --abort" to restore the original branch)

Changes not staged for commit:
   (use "git add <file>..." to update what will be committed)
   (use "git checkout -- <file>..." to discard changes in working directory)

         modified:   bindings/f95/plplot_bindings.f90
         modified:   examples/f95/CMakeLists.txt
         modified:   examples/f95/x15f.f90

Untracked files:
   (use "git add <file>..." to include in what will be committed)

         bindings/f95/included_plplot_real_interfaces.f90.rej

no changes added to commit (use "git add" and/or "git commit -a")

So this (much less convenient result than for the -3 option) is the
patch was applied where possible, but the remainder of it that
could not be applied because of conflicts is stored in a *.rej file.

Fortunately, that rejected part of the patch was because of broken
context lines where I had made changes that Arjen had not gotten yet
so it was an easy matter to edit
bindings/f95/included_plplot_real_interfaces.f90 to include the
relevant parts of bindings/f95/included_plplot_real_interfaces.f90.rej
without the leading "+" sign on all the lines that Arjen had added.

I followed up by using the command-line "rm" command to
remove the untracked file
bindings/f95/included_plplot_real_interfaces.f90.rej and also ran

software@raven> git add bindings examples
software@raven> git status
On branch new_f95_update
You are in the middle of an am session.
   (fix conflicts and then run "git am --continue")
   (use "git am --skip" to skip this patch)
   (use "git am --abort" to restore the original branch)

Changes to be committed:
   (use "git reset HEAD <file>..." to unstage)

         modified:   bindings/f95/included_plplot_real_interfaces.f90
         modified:   bindings/f95/plplot_bindings.f90
         modified:   examples/f95/CMakeLists.txt
         modified:   examples/f95/x15f.f90
software@raven> git log --oneline -1
f4f6e4b Implement the simplest plshade interface - used by x15f This
test case brought a deficiency in the interface for plpat to light. It
has been corrected, but it might result in some incompatibilities
software@raven> git status
On branch new_f95_update
nothing to commit, working directory clean

==> complete success with committing Arjen's 3rd patch.

I hope these details of what is needed to resolve conflicts will be of
help to the rest of you when you inevitably encounter your own
conflicts (typically when attempting to use "git rebase" or "git am").

Now, off-list again to rush the latest stack of commits with my work
that Arjen had not had access to before and with all conflicts
resolved to Arjen so he can make a clean start with that for
his future changes on this private topic branch concerning the
new Fortran binding.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to