[Kde-scm-interest] [PATCH] scripty draft 1

Thiago Macieira thiago at kde.org
Tue May 26 19:13:30 CEST 2009


Chani wrote:
>> I'd say there's no need for pull or rebase.
>>
>> You should do this:
>> git fetch $REPOSITORY
>
>any reason for fetch instead of pull?

Yes: pull is fetch + merge. Since two steps down we'll do a reset, we'll 
discard our merge here. So there's no point in wasting cycles.

>> git clean -x -d -f
>> git reset --hard $REPOSITORY/$BRANCH
>> [ apply changes ]
>> git commit -m "Scripty changes" -a
>> git push $REPOSITORY $BRANCH
>>
>> If the push fails, discard work and try again next time.
>
>hrm. but I've been told that scripty takes 13-17 hours to run. what are
> the chances that a push will succeed 13 hours after the fetch/pull? (I
> guess it depends on how many desktop files there are and how often
> people change them?)

Are you saying that the "[apply changes]" section is 13-17 hours, per 
repository and per branch? In other words, does scripty come back to the 
same repository after more than a month? (number of repositories * number 
of branches * hours per repository-branch = huge number)

I don't believe your information is correct. I think you meant that it's 
13-17 hours for the entire processing. The steps above should be executed 
only for applying the changes that have been translated already back into 
the .desktop files. That should take less than a minute, maybe 5 for big 
modules. 

In case there's contention, I'd recommend a git pull $REPOSITORY $BRANCH 
*before* the commit. If the pull fails, it's because there are changes to 
files that scripty has just touched (i.e., someone committed a change to 
the .desktop files in those 5 minutes since we fetched). So, throw changes 
away and try again next time.

After that, scripty can proceed to update the translation .po files with 
new strings found in the source code and .desktop files. Since it will not 
touch the repository again, the lengthy operation will cause no problem.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-scm-interest/attachments/20090526/30982f51/attachment.sig 


More information about the Kde-scm-interest mailing list