Doc-it: revision of snippets in LM (please backport to 2.14)

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

Doc-it: revision of snippets in LM (please backport to 2.14)

Federico Bruni-2
Hi Francisco and Carl,

I've added the corrections of the proofreader and fixed the committish
of .texidoc files (which was a fatal bad object, probably because of the
troubles we had in applying the previous patch).

These patches should be backported to 2.14.
It's the last request: from now on I'll work on 2.15 only :)

I hope the patches are ok.
Thanks,
Federico

0001-Doc-it-fix-translations-in-snippets.-Run-makelsr.patch (175K) Download Attachment
0002-Doc-it-fix-translation-of-snippets-in-LM.patch (21K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Doc-it: revision of snippets in LM (please backport to 2.14)

Federico Bruni-2
2011/7/20 Carl Sorensen <[hidden email]>



On 7/19/11 4:41 PM, "Federico Bruni" <[hidden email]> wrote:

> Hi Francisco and Carl,
>
> I've added the corrections of the proofreader and fixed the committish
> of .texidoc files (which was a fatal bad object, probably because of the
> troubles we had in applying the previous patch).
>
> These patches should be backported to 2.14.
> It's the last request: from now on I'll work on 2.15 only :)

Can these be applied to the translations branch, and then cherry-picked?


Francisco, can you please apply it to lilypond/translation?

I think that Graham is going to release 2.14.2 very soon.
It may be too late already.

Thanks,
Federico
Reply | Threaded
Open this post in threaded view
|

Re: Doc-it: revision of snippets in LM (please backport to 2.14)

Francisco Vila
2011/7/21 Federico Bruni <[hidden email]>:

> 2011/7/20 Carl Sorensen <[hidden email]>
>>
>>
>>
>> On 7/19/11 4:41 PM, "Federico Bruni" <[hidden email]> wrote:
>>
>> > Hi Francisco and Carl,
>> >
>> > I've added the corrections of the proofreader and fixed the committish
>> > of .texidoc files (which was a fatal bad object, probably because of the
>> > troubles we had in applying the previous patch).
>> >
>> > These patches should be backported to 2.14.
>> > It's the last request: from now on I'll work on 2.15 only :)
>>
>> Can these be applied to the translations branch, and then cherry-picked?
>>
>
> Francisco, can you please apply it to lilypond/translation?
>
> I think that Graham is going to release 2.14.2 very soon.
> It may be too late already.

Applied. Carl, please backport. IDs are

commit c3b519f0dd5ff0f8ccfc9a39ed1fe8df8b43741c
Author: Federico Bruni <[hidden email]>
Date:   Wed Jul 20 00:17:06 2011 +0200

    Doc-it: fix translations in snippets. Run makelsr.

commit 4726227b76f1016098c10d0b20ef2062f931c26b
Author: Federico Bruni <[hidden email]>
Date:   Wed Jul 20 00:25:44 2011 +0200

    Doc-it: fix translation of snippets in LM



--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

Re: Doc-it: revision of snippets in LM (please backport to 2.14)

Francisco Vila
2011/7/21 Francisco Vila <[hidden email]>:

> 2011/7/21 Federico Bruni <[hidden email]>:
>> 2011/7/20 Carl Sorensen <[hidden email]>
>>>
>>>
>>>
>>> On 7/19/11 4:41 PM, "Federico Bruni" <[hidden email]> wrote:
>>>
>>> > Hi Francisco and Carl,
>>> >
>>> > I've added the corrections of the proofreader and fixed the committish
>>> > of .texidoc files (which was a fatal bad object, probably because of the
>>> > troubles we had in applying the previous patch).
>>> >
>>> > These patches should be backported to 2.14.
>>> > It's the last request: from now on I'll work on 2.15 only :)
>>>
>>> Can these be applied to the translations branch, and then cherry-picked?
>>>
>>
>> Francisco, can you please apply it to lilypond/translation?
>>
>> I think that Graham is going to release 2.14.2 very soon.
>> It may be too late already.
>
> Applied. Carl, please backport. IDs are
>
> commit c3b519f0dd5ff0f8ccfc9a39ed1fe8df8b43741c
> Author: Federico Bruni <[hidden email]>
> Date:   Wed Jul 20 00:17:06 2011 +0200
>
>    Doc-it: fix translations in snippets. Run makelsr.
>
> commit 4726227b76f1016098c10d0b20ef2062f931c26b
> Author: Federico Bruni <[hidden email]>
> Date:   Wed Jul 20 00:25:44 2011 +0200
>
>    Doc-it: fix translation of snippets in LM

Graham: it would be fine if these commits were put on stable before
2.14-2 release. Thanks


--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

lost committishes [WAS Re: Doc-it: revision of snippets in LM (please backport to 2.14)]

Federico Bruni-2
In reply to this post by Federico Bruni-2
Il giorno mer, 20/07/2011 alle 00.41 +0200, Federico Bruni ha scritto:
> I've added the corrections of the proofreader and fixed the committish
> of .texidoc files (which was a fatal bad object, probably because of
> the
> troubles we had in applying the previous patch).

I think I was wrong here, because it's happened again.
The problem is that Francisco has probably changed some mistake in my
patch and then committed with a new commit. At least this is my guess,
because after pulling I have double commits plus a merge:

commit f42b010530f58c3817f4d4a985d76b2181b1f1df
Merge: e11d8e7 c3b519f
Author: Federico Bruni <[hidden email]>
Date:   Fri Jul 22 17:41:37 2011 +0200

    Merge branch 'lilypond/translation' of git://git.sv.gnu.org/lilypond
into lilypond/translation

commit c3b519f0dd5ff0f8ccfc9a39ed1fe8df8b43741c
Author: Federico Bruni <[hidden email]>
Date:   Wed Jul 20 00:17:06 2011 +0200

    Doc-it: fix translations in snippets. Run makelsr.

commit 4726227b76f1016098c10d0b20ef2062f931c26b
Author: Federico Bruni <[hidden email]>
Date:   Wed Jul 20 00:25:44 2011 +0200

    Doc-it: fix translation of snippets in LM

commit e11d8e736858097eb4e400bfdb7f7593db25de1f
Author: Federico Bruni <[hidden email]>
Date:   Wed Jul 20 00:25:44 2011 +0200

    Doc-it: fix translation of snippets in LM

commit 514674cb00c18629242dfcde0c1a4976758adc56
Author: Federico Bruni <[hidden email]>
Date:   Wed Jul 20 00:17:06 2011 +0200

    Doc-it: fix translations in snippets. Run makelsr.

commit d961c10edbe32c4b82e348fc40bc239a37eb1428
Author: Francisco Vila <[hidden email]>
Date:   Thu Jul 14 12:34:40 2011 +0200


This is my usual Git FAQ (Francisco knows it well :)).
Usually I can reset hard to a previous commit, pull again and forget
about anything.
But in this case I can't keep in my .texidoc files committishes that are
not recorded in Git, otherwise I won't be able to track the changes and
update translations accordingly.

In a nutshell: the committish of my .texidoc files is a fatal bad object
for Git.
How should we fix it?

Thanks,
Federico



Reply | Threaded
Open this post in threaded view
|

Re: lost committishes [WAS Re: Doc-it: revision of snippets in LM (please backport to 2.14)]

Francisco Vila
2011/7/22 Federico Bruni <[hidden email]>:

> Il giorno mer, 20/07/2011 alle 00.41 +0200, Federico Bruni ha scritto:
>> I've added the corrections of the proofreader and fixed the committish
>> of .texidoc files (which was a fatal bad object, probably because of
>> the
>> troubles we had in applying the previous patch).
>
> I think I was wrong here, because it's happened again.
> The problem is that Francisco has probably changed some mistake in my
> patch and then committed with a new commit. At least this is my guess,
> because after pulling I have double commits plus a merge:

Did you pull with your own changes applied?  You should pull onto a
version that is previous to your changes, otherwise double commits are
expected.

> commit f42b010530f58c3817f4d4a985d76b2181b1f1df
> Merge: e11d8e7 c3b519f
> Author: Federico Bruni <[hidden email]>
> Date:   Fri Jul 22 17:41:37 2011 +0200
>
>    Merge branch 'lilypond/translation' of git://git.sv.gnu.org/lilypond
> into lilypond/translation
>
> commit c3b519f0dd5ff0f8ccfc9a39ed1fe8df8b43741c
> Author: Federico Bruni <[hidden email]>
> Date:   Wed Jul 20 00:17:06 2011 +0200
>
>    Doc-it: fix translations in snippets. Run makelsr.
>
> commit 4726227b76f1016098c10d0b20ef2062f931c26b
> Author: Federico Bruni <[hidden email]>
> Date:   Wed Jul 20 00:25:44 2011 +0200
>
>    Doc-it: fix translation of snippets in LM
>
> commit e11d8e736858097eb4e400bfdb7f7593db25de1f
> Author: Federico Bruni <[hidden email]>
> Date:   Wed Jul 20 00:25:44 2011 +0200
>
>    Doc-it: fix translation of snippets in LM
>
> commit 514674cb00c18629242dfcde0c1a4976758adc56
> Author: Federico Bruni <[hidden email]>
> Date:   Wed Jul 20 00:17:06 2011 +0200
>
>    Doc-it: fix translations in snippets. Run makelsr.
>
> commit d961c10edbe32c4b82e348fc40bc239a37eb1428
> Author: Francisco Vila <[hidden email]>
> Date:   Thu Jul 14 12:34:40 2011 +0200

Firstly, get sure what branch are you in, then git log, then compare
this with one of

  http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=shortlog;h=refs/heads/master
  http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=shortlog;h=refs/heads/lilypond/translation
  http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=shortlog;h=refs/heads/stable/2.14

> This is my usual Git FAQ (Francisco knows it well :)).
> Usually I can reset hard to a previous commit, pull again and forget
> about anything.
> But in this case I can't keep in my .texidoc files committishes that are
> not recorded in Git, otherwise I won't be able to track the changes and
> update translations accordingly.
>
> In a nutshell: the committish of my .texidoc files is a fatal bad object
> for Git.

Not for git, but rather for our lilypond scripts. Git does not
complain about a number in a file.

If I understand well, you want to know what is the correct committish
for a texidoc so that you can track the changes later.  First, this is
not possible between different branches: you stick in a branch. Mixing
branches does not allow you to track changes on a file because version
IDs for similar patches are very different in general.

Given a file and a branch, you should always know the very last change
to that file. This is shown at the first line of 'git log <file>'.
Put that one on your translation and it will be marked as up to date.

If you are in doubt, go to gitweb in savannah and take version IDs
from there as the only correct ones; if your commit IDs are different
from those, and you put them in your translations anyway, for sure you
are going to obtain 'bad object' fatal errors.

Please ask more if you need it.
--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

Re: lost committishes [WAS Re: Doc-it: revision of snippets in LM (please backport to 2.14)]

Francisco Vila
In reply to this post by Federico Bruni-2
Federico,

Here I try to explain some things in more detail.

2011/7/22 Federico Bruni <[hidden email]>:
> Il giorno mer, 20/07/2011 alle 00.41 +0200, Federico Bruni ha scritto:
>> I've added the corrections of the proofreader and fixed the committish
>> of .texidoc files (which was a fatal bad object, probably because of
>> the
>> troubles we had in applying the previous patch).
>
> I think I was wrong here, because it's happened again.
> The problem is that Francisco has probably changed some mistake in my
> patch and then committed with a new commit.

No, I didn't, but continue reading.

> At least this is my guess,
> because after pulling I have double commits plus a merge:
>
> commit f42b010530f58c3817f4d4a985d76b2181b1f1df
> Merge: e11d8e7 c3b519f
> Author: Federico Bruni <[hidden email]>
> Date:   Fri Jul 22 17:41:37 2011 +0200
>
>    Merge branch 'lilypond/translation' of git://git.sv.gnu.org/lilypond
> into lilypond/translation

This merge suggests that you had made and commited changes to your
branch before pulling.  Pulling involves a merge, in general.

> commit c3b519f0dd5ff0f8ccfc9a39ed1fe8df8b43741c
> Author: Federico Bruni <[hidden email]>
> Date:   Wed Jul 20 00:17:06 2011 +0200
>
>    Doc-it: fix translations in snippets. Run makelsr.

This comes from your patch 0001 which I applied and pushed immediately.

> commit 4726227b76f1016098c10d0b20ef2062f931c26b
> Author: Federico Bruni <[hidden email]>
> Date:   Wed Jul 20 00:25:44 2011 +0200
>
>    Doc-it: fix translation of snippets in LM

Also, this is what I applied and pushed directly from your patch 0002.

But looking at the content, these lines

-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56

in every changed file indicate that you put a non-existant committish
on your files, in other words you "invented" the ID 514674cb00c :-)

In fact I have invented committishises many times, that only means
that I took them from a version that lived only in my hard disk,
unpublished, and everything looked fine until I reset --hard to a
version in Savannah, making those invented versions to vanish.

> commit e11d8e736858097eb4e400bfdb7f7593db25de1f
> Author: Federico Bruni <[hidden email]>
> Date:   Wed Jul 20 00:25:44 2011 +0200
>
>    Doc-it: fix translation of snippets in LM

This could be your local commit previous to pulling.  Probably you
produced 0002 from here.  Why is it different from 4726227b, I don't
know.  Maybe I applied 0002, then 0001, and you had 0002 on top
instead.  You had X-A-B, you pulled X-B-A, the result is

                     A---B
                    /         \
               X---B---A---M

Where M is the merge commit produced by your pull.

e11d8e73 does not exist in Savannah, see

  http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commit;h=e11d8e7368

All four commits A, B, B, A have different version IDs as you can see.

> commit 514674cb00c18629242dfcde0c1a4976758adc56
> Author: Federico Bruni <[hidden email]>
> Date:   Wed Jul 20 00:17:06 2011 +0200
>
>    Doc-it: fix translations in snippets. Run makelsr.

Same as previous one.

In addition, your patches did apply cleanly on the
lilypond/translation branch, which does not mean that they could also
be applied cleanly on the stable/2.14 branch, in fact they couldn't
and I am sure that Carl had to resolve conflicts to get them applied.
The difference was an unequal count of blank lines in the files.

HTH
--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

Re: lost committishes [WAS Re: Doc-it: revision of snippets in LM (please backport to 2.14)]

Federico Bruni-2
Hi Francisco,

thanks a lot for your explanation

Il giorno sab, 23/07/2011 alle 02.45 +0200, Francisco Vila ha scritto:
> But looking at the content, these lines
>
> -%% Translation of GIT committish:
> 4077120c18ac1dc490501b3d7d5886bc93e61a42
> +%% Translation of GIT committish:
> 514674cb00c18629242dfcde0c1a4976758adc56
>
> in every changed file indicate that you put a non-existant committish
> on your files, in other words you "invented" the ID 514674cb00c :-)

It's the committish of the first commit, as you can see here:

commit 514674cb00c18629242dfcde0c1a4976758adc56
Author: Federico Bruni <[hidden email]>
Date:   Wed Jul 20 00:17:06 2011 +0200

    Doc-it: fix translations in snippets. Run makelsr.


Yes, it exists only in my repository. I must have misunderstood this
part of the CG (5.8.3):

"A special case is updating Snippet documentation strings in
‘Documentation/MY-LANGUAGE/texidocs’. For these to be correctly marked
as up-to-date, first run makelsr.py as explained in Adding and editing
snippets, and commit the resulting compiled snippets left in
‘Documentation/snippets/’. Say the SHA1 ID code of this commit is <C>.
Now edit again your translated files in
‘Documentation/MY-LANGUAGE/texidocs’ adjusting the 40-digit committish
that appears in the text to be <C>; finally, commit these updated files.
Not doing so would result in changes made both to your updates and
original snippets to persistently appear in the check-translation output
as if they were out of sync."

I read it again and again and I think I've done exactly what it's
written.
What I'm missing?

In my case <C> is 514674cb00c18629242dfcde0c1a4976758adc56
Which committish should I've used instead?



Reply | Threaded
Open this post in threaded view
|

Re: lost committishes [WAS Re: Doc-it: revision of snippets in LM (please backport to 2.14)]

Francisco Vila
Federico,

2011/7/24 Federico Bruni <[hidden email]>:

> Hi Francisco,
>
> thanks a lot for your explanation
>
> Il giorno sab, 23/07/2011 alle 02.45 +0200, Francisco Vila ha scritto:
>> But looking at the content, these lines
>>
>> -%% Translation of GIT committish:
>> 4077120c18ac1dc490501b3d7d5886bc93e61a42
>> +%% Translation of GIT committish:
>> 514674cb00c18629242dfcde0c1a4976758adc56
>>
>> in every changed file indicate that you put a non-existant committish
>> on your files, in other words you "invented" the ID 514674cb00c :-)
>
> It's the committish of the first commit, as you can see here:
>
> commit 514674cb00c18629242dfcde0c1a4976758adc56
> Author: Federico Bruni <[hidden email]>
> Date:   Wed Jul 20 00:17:06 2011 +0200
>
>    Doc-it: fix translations in snippets. Run makelsr.
>
>
> Yes, it exists only in my repository. I must have misunderstood this
> part of the CG (5.8.3):
>
> "A special case is updating Snippet documentation strings in
> ‘Documentation/MY-LANGUAGE/texidocs’. For these to be correctly marked
> as up-to-date, first run makelsr.py as explained in Adding and editing
> snippets, and commit the resulting compiled snippets left in
> ‘Documentation/snippets/’. Say the SHA1 ID code of this commit is <C>.
> Now edit again your translated files in
> ‘Documentation/MY-LANGUAGE/texidocs’ adjusting the 40-digit committish
> that appears in the text to be <C>; finally, commit these updated files.
> Not doing so would result in changes made both to your updates and
> original snippets to persistently appear in the check-translation output
> as if they were out of sync."
>
> I read it again and again and I think I've done exactly what it's
> written.
> What I'm missing?
>
> In my case <C> is 514674cb00c18629242dfcde0c1a4976758adc56
> Which committish should I've used instead?

I tend to believe that the method in CG is not correct if you are
commiting through patches that you send and other applies.  In this
case, probably the commit IDs are not guaranteed to remain the same,
ant thus you can not trust on them to mark files as up to date.

Something that would work instead is this: you publish your
translations and the result of makelsr as a patch.  When the commit
from your patch is online in Savannah, reset and pull, then take its
commit ID from your updated tree. Check that this commit ID is the
same as on Savannah.  Then you can fix the committishes of your
translations taking this published ID as a valid one.  make check
should work properly without bad object errors and it should not show
any diff for updated files.

--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

Re: lost committishes [WAS Re: Doc-it: revision of snippets in LM (please backport to 2.14)]

Federico Bruni-2
Il giorno mar, 02/08/2011 alle 14.33 +0200, Francisco Vila ha scritto:
> I tend to believe that the method in CG is not correct if you are
> commiting through patches that you send and other applies.  In this
> case, probably the commit IDs are not guaranteed to remain the same,
> ant thus you can not trust on them to mark files as up to date.
>

Yes, I remember that I stumbled upon the same issue in the past and you
gave the same answer.

The problem is that, except for you and the french guys (I think), most
of translation contributors do not have push access.  This means that
documentation gives "wrong" information for most of us.

> Something that would work instead is this: you publish your
> translations and the result of makelsr as a patch.  When the commit
> from your patch is online in Savannah, reset and pull, then take its
> commit ID from your updated tree. Check that this commit ID is the
> same as on Savannah.  Then you can fix the committishes of your
> translations taking this published ID as a valid one.  make check
> should work properly without bad object errors and it should not show
> any diff for updated files.

This method requires one more patch, right?
There's a way to avoid that?
For example, what if I used the last committish of the snippet I'm
translating (as I normally do with all the files)?

I think that this issue would deserve some lines in the CG.

Cheers,
Federico



Reply | Threaded
Open this post in threaded view
|

Re: lost committishes [WAS Re: Doc-it: revision of snippets in LM (please backport to 2.14)]

Francisco Vila
2011/8/8 Federico Bruni <[hidden email]>:

>> Something that would work instead is this: you publish your
>> translations and the result of makelsr as a patch.  When the commit
>> from your patch is online in Savannah, reset and pull, then take its
>> commit ID from your updated tree. Check that this commit ID is the
>> same as on Savannah.  Then you can fix the committishes of your
>> translations taking this published ID as a valid one.  make check
>> should work properly without bad object errors and it should not show
>> any diff for updated files.
>
> This method requires one more patch, right?

I think no, just two as before, but you should wait before doing the
second one until you have a published commit ID for you to put in your
translated files.

> There's a way to avoid that?
> For example, what if I used the last committish of the snippet I'm
> translating (as I normally do with all the files)?

For normal texinfo files, this is correct. Do 'git log <file>' and put
this in your translation.  'Git log <file>' should give you a
trustworthy log for the original file if your tree is in sync with
Savannah.

For LSR texidocs, it's a different problem. It does not work the same.
You are translating files, then running makelsr.py, then committing
the result, and finally putting the commit ID of that result in your
translations. It is impossible to do all in a single commit.  You need
to commit the result of makelsr.py and know its commit ID
_beforehand_. Then put it, then make another commit for this.  If this
is what you are referring to when talking about another commit, then
yes, it does need another commit.  Two commits in total.

> I think that this issue would deserve some lines in the CG.

I agree.
--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com