can't apply a patch

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

can't apply a patch

Federico Bruni-2
Hi

I'm trying to apply this patch but I get the error "patch does not apply".
What's wrong with it?


0001-Doc-it-proofread-chapters-1.3-1.4-1.5-of-Notation-Re.patch (64K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: can't apply a patch

David Kastrup
Federico Bruni <[hidden email]> writes:

> Hi
>
> I'm trying to apply this patch but I get the error "patch does not apply".
> What's wrong with it?

I read
Applying: Doc-it: proofread chapters 1.3, 1.4, 1.5 of Notation Reference
/usr/local/tmp/lilypond/.git/rebase-apply/patch:25: trailing whitespace.
Questa sezione spiega come creare segni di espressione
/usr/local/tmp/lilypond/.git/rebase-apply/patch:114: trailing whitespace.
@code{\!} avranno un aspetto simile.  Tuttavia, la lunghezza dell'indicazione
/usr/local/tmp/lilypond/.git/rebase-apply/patch:449: trailing whitespace.
tra segni di ritornello oppure ricopiate interamente (adatte
/usr/local/tmp/lilypond/.git/rebase-apply/patch:634: trailing whitespace.
La sintassi di @code{\repeat tremolo} prevede specificamente che
/usr/local/tmp/lilypond/.git/rebase-apply/patch:681: trailing whitespace.
Si possono specificare abbellimenti e articolazioni per ogni nota che fa parte
error: patch failed: Documentation/it/notation/expressive.itely:10
error: Documentation/it/notation/expressive.itely: patch does not apply
error: patch failed: Documentation/it/notation/simultaneous.itely:10
error: Documentation/it/notation/simultaneous.itely: patch does not apply
Patch failed at 0001 Doc-it: proofread chapters 1.3, 1.4, 1.5 of Notation Reference
The copy of the patch that failed is found in:
   /usr/local/tmp/lilypond/.git/rebase-apply/patch

Now let's take a look at Documentation/it/notation/expressive.itely,
line 10:

@c \version "2.17.25"

The patch has

>  @c \version "2.17.6"

Similar with simultaneous.ly.  Now let's see when this changed:

git log -p Documentation/it/notation/simultaneous.itely
commit 48a57a1c8feb426029e059d9fbf8aaf1b14f0ff8
Author: David Kastrup <[hidden email]>
Date:   Tue Aug 6 21:34:01 2013 +0200

    Run scripts/auxiliar/update-with-convert-ly.sh

diff --git a/Documentation/it/notation/simultaneous.itely b/Documentation/it/not
index 707c052..5d42e85 100644
--- a/Documentation/it/notation/simultaneous.itely
+++ b/Documentation/it/notation/simultaneous.itely
@@ -7,7 +7,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.17.6"
+@c \version "2.17.25"

[...]


Let's do it the lazy way.

dak@lola:/usr/local/tmp/lilypond$ git am /tmp/0001-Doc-it-proofread-chapters-1.3-1.4-1.5-of-Notation-Re.patch
previous rebase directory /usr/local/tmp/lilypond/.git/rebase-apply still exists but mbox given.
dak@lola:/usr/local/tmp/lilypond$ git am --abort
You seem to have moved HEAD since the last 'am' failure.
Not rewinding to ORIG_HEAD
dak@lola:/usr/local/tmp/lilypond$ git am /tmp/0001-Doc-it-proofread-chapters-1.3-1.4-1.5-of-Notation-Re.patch
Applying: Doc-it: proofread chapters 1.3, 1.4, 1.5 of Notation Reference
/usr/local/tmp/lilypond/.git/rebase-apply/patch:25: trailing whitespace.
Questa sezione spiega come creare segni di espressione
/usr/local/tmp/lilypond/.git/rebase-apply/patch:114: trailing whitespace.
@code{\!} avranno un aspetto simile.  Tuttavia, la lunghezza dell'indicazione
/usr/local/tmp/lilypond/.git/rebase-apply/patch:449: trailing whitespace.
tra segni di ritornello oppure ricopiate interamente (adatte
/usr/local/tmp/lilypond/.git/rebase-apply/patch:634: trailing whitespace.
La sintassi di @code{\repeat tremolo} prevede specificamente che
/usr/local/tmp/lilypond/.git/rebase-apply/patch:681: trailing whitespace.
Si possono specificare abbellimenti e articolazioni per ogni nota che fa parte
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
dak@lola:/usr/local/tmp/lilypond$ git rebase origin
First, rewinding head to replay your work on top of it...
Applying: Doc-it: proofread chapters 1.3, 1.4, 1.5 of Notation Reference
Using index info to reconstruct a base tree...
M Documentation/it/notation/expressive.itely
M Documentation/it/notation/simultaneous.itely
<stdin>:20: trailing whitespace.
Questa sezione spiega come creare segni di espressione
<stdin>:109: trailing whitespace.
@code{\!} avranno un aspetto simile.  Tuttavia, la lunghezza dell'indicazione
<stdin>:444: trailing whitespace.
tra segni di ritornello oppure ricopiate interamente (adatte
<stdin>:629: trailing whitespace.
La sintassi di @code{\repeat tremolo} prevede specificamente che
<stdin>:676: trailing whitespace.
Si possono specificare abbellimenti e articolazioni per ogni nota che fa parte
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging Documentation/it/notation/simultaneous.itely
Auto-merging Documentation/it/notation/expressive.itely
dak@lola:/usr/local/tmp/lilypond$ git format-patch origin
0001-Doc-it-proofread-chapters-1.3-1.4-1.5-of-Notation-Re.patch
dak@lola:/usr/local/tmp/lilypond$


But _please_ don't commit this before fixing all the whitespace errors.

--
David Kastrup

0001-Doc-it-proofread-chapters-1.3-1.4-1.5-of-Notation-Re.patch (48K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: can't apply a patch

David Kastrup
David Kastrup <[hidden email]> writes:

> Similar with simultaneous.ly.  Now let's see when this changed:
>
> git log -p Documentation/it/notation/simultaneous.itely
> commit 48a57a1c8feb426029e059d9fbf8aaf1b14f0ff8
> Author: David Kastrup <[hidden email]>
> Date:   Tue Aug 6 21:34:01 2013 +0200
>
>     Run scripts/auxiliar/update-with-convert-ly.sh
>
> diff --git a/Documentation/it/notation/simultaneous.itely b/Documentation/it/not
> index 707c052..5d42e85 100644
> --- a/Documentation/it/notation/simultaneous.itely
> +++ b/Documentation/it/notation/simultaneous.itely
> @@ -7,7 +7,7 @@
>      Guide, node Updating translation committishes..
>  @end ignore
>  
> -@c \version "2.17.6"
> +@c \version "2.17.25"
>
> [...]
>
>
> Let's do it the lazy way.
>
> dak@lola:/usr/local/tmp/lilypond$ git am /tmp/0001-Doc-it-proofread-chapters-1.3-1.4-1.5-of-Notation-Re.patch

Oops.  Before doing that, I of course did

git checkout 48a57a1c8feb426029e059d9fbf8aaf1b14f0ff8~1

in order to return to a version where the patch would apply.  Then apply
it, then rebase to origin again.

At any rate, don't forget to fix the whitespace errors.

--
David Kastrup


Reply | Threaded
Open this post in threaded view
|

Re: can't apply a patch

Federico Bruni-2
2013/9/8 David Kastrup <[hidden email]>
David Kastrup <[hidden email]> writes:

> Similar with simultaneous.ly.  Now let's see when this changed:
>
> git log -p Documentation/it/notation/simultaneous.itely
> commit 48a57a1c8feb426029e059d9fbf8aaf1b14f0ff8
> Author: David Kastrup <[hidden email]>
> Date:   Tue Aug 6 21:34:01 2013 +0200
>
>     Run scripts/auxiliar/update-with-convert-ly.sh
>
> diff --git a/Documentation/it/notation/simultaneous.itely b/Documentation/it/not
> index 707c052..5d42e85 100644
> --- a/Documentation/it/notation/simultaneous.itely
> +++ b/Documentation/it/notation/simultaneous.itely
> @@ -7,7 +7,7 @@
>      Guide, node Updating translation committishes..
>  @end ignore
>
> -@c \version "2.17.6"
> +@c \version "2.17.25"
>
> [...]
>
>
> Let's do it the lazy way.
>
> dak@lola:/usr/local/tmp/lilypond$ git am /tmp/0001-Doc-it-proofread-chapters-1.3-1.4-1.5-of-Notation-Re.patch

Oops.  Before doing that, I of course did

git checkout 48a57a1c8feb426029e059d9fbf8aaf1b14f0ff8~1

in order to return to a version where the patch would apply.  Then apply
it, then rebase to origin again.

At any rate, don't forget to fix the whitespace errors.

I've fixed the whitespace errors and followed your instructions. The patch is applied correctly.
I'm testing 'make doc' on a virtual machine.

Thanks for the help, I think I'll have to use this method again soon.