how to handle snippets commit if you don't have push access

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

how to handle snippets commit if you don't have push access

Federico Bruni-2
Hi,

I've just sent the first chapter of NR to the italian proofreader.
While waiting for his feedback, I have a few questions about the patches
that I'll have to send.

It's all about the snippets management, which caused me some headache a
couple of months ago:
http://lilypond-translations.3384276.n2.nabble.com/CG-5-8-3-updating-committish-of-lsr-snippets-td6852329.html

I'm thinking about sending two patches first and then a third after the
two are applied.
The first two patches will be:

1) files related to notation manual
2) snippets updated by makelsr

I think it's better to split them, right?

The third:

3) my .texidoc files containing the committish generated by Francisco
when committing patch 2.
The reason is: I can't place the committish of my local commit, because,
since I don't push the patch, the real committish will be different
(BTW, as I don't have push access, my local committishes are always bad
objects).

I think also that I'd better update the committish of all the other
it/*.texidoc files in order to stop check-translation to put garbage in
the diff :)
Of course, after checking that nothing has changed in the title or in
the description of the snippets.

Does it make sense?

Thanks,
Federico


Reply | Threaded
Open this post in threaded view
|

Re: how to handle snippets commit if you don't have push access

Francisco Vila
2012/1/5 Federico Bruni <[hidden email]>:

> Hi,
>
> I've just sent the first chapter of NR to the italian proofreader.
> While waiting for his feedback, I have a few questions about the patches
> that I'll have to send.
>
> It's all about the snippets management, which caused me some headache a
> couple of months ago:
> http://lilypond-translations.3384276.n2.nabble.com/CG-5-8-3-updating-committish-of-lsr-snippets-td6852329.html
>
> I'm thinking about sending two patches first and then a third after the two
> are applied.
> The first two patches will be:
>
> 1) files related to notation manual
> 2) snippets updated by makelsr
>
> I think it's better to split them, right?

Right.

> The third:
>
> 3) my .texidoc files containing the committish generated by Francisco when
> committing patch 2.

As an alternative: include your .texidocs in  patch 2 with the
committish unaltered, then the new committishes in patch 3.

This patch 3 would contain changes in committishes only.  Also, patch
2 would not contain diffs in committishes. So, the overall size of the
patch set would be nearly the same.

> The reason is: I can't place the committish of my local commit, because,
> since I don't push the patch, the real committish will be different (BTW, as
> I don't have push access, my local committishes are always bad objects).

Probably. Makes sense but I have not verified that. I believe you
because you have experienced it many times.

> I think also that I'd better update the committish of all the other
> it/*.texidoc files in order to stop check-translation to put garbage in the
> diff :)

I am not sure this is necessary but it is easy to do, theoretically
harmless and it has advantages because simplifies things. The drawback
is, the patch is unnecessarily big.

> Of course, after checking that nothing has changed in the title or in the
> description of the snippets.
>
> Does it make sense?

At a glance, I'd say yes.

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


Reply | Threaded
Open this post in threaded view
|

Re: how to handle snippets commit if you don't have push access

Federico Bruni-2
I'm almost ready to send the patch.
I would do this way:

1) I send a patch containing the new files (.texidoc files included,
with COMMITTISH instead of real committish)

2) You (Francisco) run update-lsr and commit the results

3) Me or you copy the committish in the new .texidoc files and commit
it. This should be easily done with sed:

cd Documentation/it/texidocs
grep 'COMMITTISH' * # just to check that only the right files are affected

sed sed -i
's/COMMITTISH/id-of-the-committish/g'
*.texidoc


If you do step 2 and 3 it would be one single patch. Maybe it's better?
Thanks,
Federico

Il 06/01/2012 23:44, Francisco Vila ha scritto:

> 2012/1/5 Federico Bruni<[hidden email]>:
>> Hi,
>>
>> I've just sent the first chapter of NR to the italian proofreader.
>> While waiting for his feedback, I have a few questions about the patches
>> that I'll have to send.
>>
>> It's all about the snippets management, which caused me some headache a
>> couple of months ago:
>> http://lilypond-translations.3384276.n2.nabble.com/CG-5-8-3-updating-committish-of-lsr-snippets-td6852329.html
>>
>> I'm thinking about sending two patches first and then a third after the two
>> are applied.
>> The first two patches will be:
>>
>> 1) files related to notation manual
>> 2) snippets updated by makelsr
>>
>> I think it's better to split them, right?
>
> Right.
>
>> The third:
>>
>> 3) my .texidoc files containing the committish generated by Francisco when
>> committing patch 2.
>
> As an alternative: include your .texidocs in  patch 2 with the
> committish unaltered, then the new committishes in patch 3.
>
> This patch 3 would contain changes in committishes only.  Also, patch
> 2 would not contain diffs in committishes. So, the overall size of the
> patch set would be nearly the same.
>
>> The reason is: I can't place the committish of my local commit, because,
>> since I don't push the patch, the real committish will be different (BTW, as
>> I don't have push access, my local committishes are always bad objects).
>
> Probably. Makes sense but I have not verified that. I believe you
> because you have experienced it many times.
>
>> I think also that I'd better update the committish of all the other
>> it/*.texidoc files in order to stop check-translation to put garbage in the
>> diff :)
>
> I am not sure this is necessary but it is easy to do, theoretically
> harmless and it has advantages because simplifies things. The drawback
> is, the patch is unnecessarily big.
>
>> Of course, after checking that nothing has changed in the title or in the
>> description of the snippets.
>>
>> Does it make sense?
>
> At a glance, I'd say yes.
>



Reply | Threaded
Open this post in threaded view
|

Re: how to handle snippets commit if you don't have push access

Federico Bruni-2
Il 29/01/2012 16:52, Federico Bruni ha scritto:
> I'm almost ready to send the patch.

Here's the patch.
Hope everything it's ok

0001-Doc-it-Add-Notation-Reference-first-chapter.patch (96K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: how to handle snippets commit if you don't have push access

Francisco Vila
In reply to this post by Federico Bruni-2
2012/1/29 Federico Bruni <[hidden email]>:
> I'm almost ready to send the patch.
> I would do this way:
>
> 1) I send a patch containing the new files (.texidoc files included, with
> COMMITTISH instead of real committish)
>
> 2) You (Francisco) run update-lsr and commit the results

You mean makelsr.py

> 3) Me or you copy the committish in the new .texidoc files and commit it.
> This should be easily done with sed:
>
> cd Documentation/it/texidocs
> grep 'COMMITTISH' * # just to check that only the right files are affected
>
> sed sed -i
> 's/COMMITTISH/id-of-the-committish/g'
> *.texidoc

yes but id-of-the-committish points to a file which could have changed
in the meantime, so the whole process should be very quick or you'll
lose information of those edits.

> If you do step 2 and 3 it would be one single patch. Maybe it's better?

'A single patch from you' but 2 more from me. It is impossible to do
steps 2+3 in a single patch because the committish in step 3 is the
commit ID of step 2.

Oh wait, maybe 2+3 could be a single patch after all if I put the ID
of commit #1.
--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

Re: how to handle snippets commit if you don't have push access

Francisco Vila
2012/1/30 Francisco Vila <[hidden email]>:

> 2012/1/29 Federico Bruni <[hidden email]>:
>> I'm almost ready to send the patch.
>> I would do this way:
>>
>> 1) I send a patch containing the new files (.texidoc files included, with
>> COMMITTISH instead of real committish)
>>
>> 2) You (Francisco) run update-lsr and commit the results
>
> You mean makelsr.py

I have done it. the word COMMITTISH goes into snippets/*.ly, I'm not
sure this is desirable
--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

Re: how to handle snippets commit if you don't have push access

Federico Bruni-2
In reply to this post by Francisco Vila
Il 30/01/2012 07:56, Francisco Vila ha scritto:

> 2012/1/29 Federico Bruni<[hidden email]>:
>> I'm almost ready to send the patch.
>> I would do this way:
>>
>> 1) I send a patch containing the new files (.texidoc files included, with
>> COMMITTISH instead of real committish)
>>
>> 2) You (Francisco) run update-lsr and commit the results
>
> You mean makelsr.py
>

yes, makelsr.py

>> 3) Me or you copy the committish in the new .texidoc files and commit it.
>> This should be easily done with sed:
>>
>> cd Documentation/it/texidocs
>> grep 'COMMITTISH' * # just to check that only the right files are affected
>>
>> sed sed -i
>> 's/COMMITTISH/id-of-the-committish/g'
>> *.texidoc
>
> yes but id-of-the-committish points to a file which could have changed
> in the meantime, so the whole process should be very quick or you'll
> lose information of those edits.
>

you are right, I'm working on a different version from yours.
This is my origin (last commit):
d58942c56765b8606c636355c2b01d147599eb8a

so I must run makelsr and then update the committish of texidoc files
once I have from you the real committish of makelsr

>> If you do step 2 and 3 it would be one single patch. Maybe it's better?
>
> 'A single patch from you' but 2 more from me. It is impossible to do
> steps 2+3 in a single patch because the committish in step 3 is the
> commit ID of step 2.
>

you are right



Reply | Threaded
Open this post in threaded view
|

Re: how to handle snippets commit if you don't have push access

Francisco Vila
In reply to this post by Francisco Vila
2012/1/30 Francisco Vila <[hidden email]>:
> I have done it. the word COMMITTISH goes into snippets/*.ly, I'm not
> sure this is desirable

Federico: I have tried to complete the process and after 3 commits
there is still one more needed because the COMMITTISH word is still in
the files in snippets. That would mean I have to run makelsr.py once
more and maybe perform no less than two new commits. Now I am as
confused as one can posibbly be.

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


Reply | Threaded
Open this post in threaded view
|

Re: how to handle snippets commit if you don't have push access

Federico Bruni-2
In reply to this post by Francisco Vila
Il 30/01/2012 08:04, Francisco Vila ha scritto:

> 2012/1/30 Francisco Vila<[hidden email]>:
>> 2012/1/29 Federico Bruni<[hidden email]>:
>>> I'm almost ready to send the patch.
>>> I would do this way:
>>>
>>> 1) I send a patch containing the new files (.texidoc files included, with
>>> COMMITTISH instead of real committish)
>>>
>>> 2) You (Francisco) run update-lsr and commit the results
>>
>> You mean makelsr.py
>
> I have done it. the word COMMITTISH goes into snippets/*.ly, I'm not
> sure this is desirable

please revert
as explained before I was wrong: I think that I must run makelsr

should I change the patch and replace COMMITTISH with something else (what?)

sorry, management of snippets still sounds complicated to me


Reply | Threaded
Open this post in threaded view
|

Re: how to handle snippets commit if you don't have push access

Francisco Vila
2012/1/30 Federico Bruni <[hidden email]>:

>> I have done it. the word COMMITTISH goes into snippets/*.ly, I'm not
>> sure this is desirable
>
>
> please revert
> as explained before I was wrong: I think that I must run makelsr
>
> should I change the patch and replace COMMITTISH with something else (what?)
>
> sorry, management of snippets still sounds complicated to me

Reverting leaves a revert commit as well. Check out 8337a3e91a2 , test
it and we'll think a more compact method.

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


Reply | Threaded
Open this post in threaded view
|

Re: how to handle snippets commit if you don't have push access

Federico Bruni-2
Il 30/01/2012 08:26, Francisco Vila ha scritto:

> 2012/1/30 Federico Bruni<[hidden email]>:
>>> I have done it. the word COMMITTISH goes into snippets/*.ly, I'm not
>>> sure this is desirable
>>
>>
>> please revert
>> as explained before I was wrong: I think that I must run makelsr
>>
>> should I change the patch and replace COMMITTISH with something else (what?)
>>
>> sorry, management of snippets still sounds complicated to me
>
> Reverting leaves a revert commit as well. Check out 8337a3e91a2 , test
> it and we'll think a more compact method.
>

Ok, I thought you hadn't pushed yet.

I've pulled and I think it's ok.
I've checked the logs of snippets: the last update was in November, so
no edit is missing.

Thanks


Reply | Threaded
Open this post in threaded view
|

Re: how to handle snippets commit if you don't have push access

Francisco Vila
2012/1/30 Federico Bruni <[hidden email]>:
> I've pulled and I think it's ok.
> I've checked the logs of snippets: the last update was in November, so no
> edit is missing.

But your output of make check-translation still will contain the last
change: "COMMITTISH" to real committish in snippets/.ly due to my last
run of makelsr.py

Undoubtedly there is something wrong in this all. Whoever changes its
own texidoc and runs makelsr.py forces all other translators to update
their own committish in texidocs, which in turn forces them to run
makelsr.py to make output of make check to dissapear, which in turn
makes all other translators to update their own committishes in
texidocs.

Whe should live with outdated committishes in texidocs and run makelsr
only if there are real changes in snippets that make texidocs worth of
updating.

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


Reply | Threaded
Open this post in threaded view
|

Re: how to handle snippets commit if you don't have push access

Francisco Vila
2012/1/30 Francisco Vila <[hidden email]>:
> Undoubtedly there is something wrong in this all. Whoever changes its
> own texidoc and runs makelsr.py forces all other translators to update
> their own committish in texidocs, which in turn forces them to run
> makelsr.py to make output of make check to dissapear, which in turn
> makes all other translators to update their own committishes in
> texidocs.


Fortunately those changes are not cummulative: either one or dozens of
changes to the same string in snippets will appear as one single
change in make check-translation output.

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