updating an up-to-date file?!?

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

updating an up-to-date file?!?

Federico Bruni-2
I have a silly question for you.

This is the list of files I have to update:

fede@debian:~/lilypond-git/Documentation$ make ISOLANG=it
check-translation | grep 'diff --git'
diff --git a/Documentation/learning/common-notation.itely
b/Documentation/learning/common-notation.itely
diff --git a/Documentation/user/fundamental.itely
b/Documentation/learning/fundamental.itely
diff --git a/Documentation/user/preface.itely
b/Documentation/learning/preface.itely
diff --git a/Documentation/learning/tutorial.itely
b/Documentation/learning/tutorial.itely
diff --git a/Documentation/user/tutorial.itely
b/Documentation/user/tutorial.itely
diff --git a/Documentation/macros.itexi b/Documentation/macros.itexi
diff --git a/Documentation/user/macros.itexi
b/Documentation/user/macros.itexi

(BTW, user/ is an old directory?)

So git thinks that it/learning/preface.itely must be updated but he's
wrong (I checked the history).

How can I tell git that the translation is up-to-date? should I put the
new committish and include the file in the next patch? That's it?

Thanks for your patience ;-)

Federico



Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Francisco Vila
2010/11/24 Federico Bruni <[hidden email]>:

> I have a silly question for you.
>
> This is the list of files I have to update:
>
> fede@debian:~/lilypond-git/Documentation$ make ISOLANG=it
> check-translation | grep 'diff --git'
> diff --git a/Documentation/learning/common-notation.itely
> b/Documentation/learning/common-notation.itely
> diff --git a/Documentation/user/fundamental.itely
> b/Documentation/learning/fundamental.itely
> diff --git a/Documentation/user/preface.itely
> b/Documentation/learning/preface.itely
> diff --git a/Documentation/learning/tutorial.itely
> b/Documentation/learning/tutorial.itely
> diff --git a/Documentation/user/tutorial.itely
> b/Documentation/user/tutorial.itely
> diff --git a/Documentation/macros.itexi b/Documentation/macros.itexi
> diff --git a/Documentation/user/macros.itexi
> b/Documentation/user/macros.itexi
>
> (BTW, user/ is an old directory?)

This surprises me: Documentation/user/ does not exist in git.

cd Documentation
git ls-files | grep user

> So git thinks that it/learning/preface.itely must be updated but he's
> wrong (I checked the history).

It looks up to date.

> How can I tell git that the translation is up-to-date? should I put the
> new committish and include the file in the next patch? That's it?

Yes, just rewrite the committish in your file with the first one in
the output from

  git log Documentation/learning/preface.itely

after checking again that the accumulated recent history of the
original matches the current status of your file.  This is tricky but
as time goes by, your eyes will get used to detect such things.

Issue your 'make check-translation' command just after editing the
committish in the file and you'll see how it dissapears from the
output.

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


Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

John Mandereau
In reply to this post by Federico Bruni-2
Il giorno mer, 24/11/2010 alle 00.08 +0100, Federico Bruni ha scritto:
> (BTW, user/ is an old directory?)

Yeah, after haing saved any valuable stuff there, I recommend you to
remove this directory.

Best,
John




Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Federico Bruni-2
2010/11/24 John Mandereau <[hidden email]>
Il giorno mer, 24/11/2010 alle 00.08 +0100, Federico Bruni ha scritto:
> (BTW, user/ is an old directory?)

Yeah, after haing saved any valuable stuff there, I recommend you to
remove this directory.



Yesterday I've checked it and I couldn't find any user/ directory in Documentation/it (not in Documentation/ either).
So I wonder where it comes from...

I'll doublecheck tonight and let you know.
Thanks,
Federico
Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

John Mandereau
Il giorno mer, 24/11/2010 alle 10.22 +0100, Federico Bruni ha scritto:


> Yesterday I've checked it and I couldn't find any user/ directory in
> Documentation/it (not in Documentation/ either).
>
> So I wonder where it comes from...

It might mean that you used a committish so old in a translation
(macros.itexi) that it dates back to the time we had manuals and
macros.itexi in Documentation/user.  IIRC check-translation is able to
show a diff even across some renames, including stuff moved from user/.

To find the date associated to a committish, do

git show --stat COMMITTISH

Best,
John

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Federico Bruni-2
In reply to this post by Francisco Vila
Il giorno mer, 24/11/2010 alle 00.47 +0100, Francisco Vila ha scritto:
> > How can I tell git that the translation is up-to-date? should I put
> the
> > new committish and include the file in the next patch? That's it?
>
> Yes, just rewrite the committish in your file with the first one in
> the output from
>
>   git log Documentation/learning/preface.itely
>

I thaught I should always use the committish provided by this command:

git rev-list HEAD |head -1


Why should I use the last committish of the original in this case?




Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

John Mandereau
Il giorno mer, 24/11/2010 alle 22.47 +0100, Federico Bruni ha scritto:

> Il giorno mer, 24/11/2010 alle 00.47 +0100, Francisco Vila ha scritto:
> > Yes, just rewrite the committish in your file with the first one in
> > the output from
> >
> >   git log Documentation/learning/preface.itely
> >
>
> I thaught I should always use the committish provided by this command:
>
> git rev-list HEAD |head -1
>
>
> Why should I use the last committish of the original in this case?

Both committishes are equivalent when you do a diff to original file; a
crucial point is that you should preserve the commit you take the
committish from, i.e. you shouldn't change it by rebasing, otherwise it
will no longer possible to make a diff against it.

Best,
John




Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Francisco Vila
In reply to this post by Federico Bruni-2
2010/11/24 Federico Bruni <[hidden email]>:

> Il giorno mer, 24/11/2010 alle 00.47 +0100, Francisco Vila ha scritto:
>> > How can I tell git that the translation is up-to-date? should I put
>> the
>> > new committish and include the file in the next patch? That's it?
>>
>> Yes, just rewrite the committish in your file with the first one in
>> the output from
>>
>>   git log Documentation/learning/preface.itely
>>
>
> I thaught I should always use the committish provided by this command:
>
> git rev-list HEAD |head -1
>
>
> Why should I use the last committish of the original in this case?

If the file is really up to date, both are equivalent.  I use the
committish of the original as extra data for my convenience: that way
I know what exact version of the file am I in sync with.


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


Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Federico Bruni-2
Il giorno gio, 25/11/2010 alle 10.39 +0100, Francisco Vila ha scritto:

> > I thaught I should always use the committish provided by this
> command:
> >
> > git rev-list HEAD |head -1
> >
> >
> > Why should I use the last committish of the original in this case?
>
> If the file is really up to date, both are equivalent.  I use the
> committish of the original as extra data for my convenience: that way
> I know what exact version of the file am I in sync with.
>

It seems wise :)

Last question about update.  Actually, I prefer using terminal rather
than web interface.
Could you please tell me if the following procedure is OK?

1) I check the commit date of my last revision with 'git log
path/to/file'
This date doesn't tell me exactly which version of original file I used,
but it's a good reference.
That's why your "committish strategy" explained above seems much
convenient.


2) 'git log path/to/original' and I pick the committish which is likely
to be the one I used in my last revision.  After checking and comparing
I *should* be sure about it.


3) 'git diff committish path/to/original'


This should give me the diff from that committish to current one.

It's OK?

Thanks,
Federico



Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Francisco Vila
2010/11/25 Federico Bruni <[hidden email]>:

> Il giorno gio, 25/11/2010 alle 10.39 +0100, Francisco Vila ha scritto:
>> > I thaught I should always use the committish provided by this
>> command:
>> >
>> > git rev-list HEAD |head -1
>> >
>> >
>> > Why should I use the last committish of the original in this case?
>>
>> If the file is really up to date, both are equivalent.  I use the
>> committish of the original as extra data for my convenience: that way
>> I know what exact version of the file am I in sync with.
>>
>
> It seems wise :)
>
> Last question about update.  Actually, I prefer using terminal rather
> than web interface.
> Could you please tell me if the following procedure is OK?
>
> 1) I check the commit date of my last revision with 'git log
> path/to/file'
> This date doesn't tell me exactly which version of original file I used,
> but it's a good reference.
> That's why your "committish strategy" explained above seems much
> convenient.
>
>
> 2) 'git log path/to/original' and I pick the committish which is likely
> to be the one I used in my last revision.  After checking and comparing
> I *should* be sure about it.
>
>
> 3) 'git diff committish path/to/original'
>
>
> This should give me the diff from that committish to current one.
>
> It's OK?

I have never done it that way because I think that's exactly what
check-translation does.  Do you use it, and how? I redirect its
(usually very long) output to a file, then less -R thatFile.  In
another terminal I can issue the edit commands.

Anyway, I'll take a more close look to your procedure.
--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Federico Bruni-2
Il giorno ven, 26/11/2010 alle 08.26 +0100, Francisco Vila ha scritto:
> I have never done it that way because I think that's exactly what
> check-translation does.  Do you use it, and how? I redirect its
> (usually very long) output to a file, then less -R thatFile.  In
> another terminal I can issue the edit commands.

I've tried check-translations but I had problems.
Let's take an example: I'm going to update it/learning/fundamental.itely

This file has been renamed since my first translation:

$ make ISOLANG=it check-translation | grep 'diff --git'
diff --git a/Documentation/user/fundamental.itely
b/Documentation/learning/fundamental.itely

So I run this command:

$ make CHECKED_FILES=it/{learning,user}/fundamental.itely
check-translation
ISOLANG= /usr/bin/python ../scripts/auxiliar/check_translation.py  


Can you see what's wrong?  Maybe ISOLANG= is missing 'it'?


Anyway, I used my procedure and after a couple of checks I found out
that the first commit which introduced some new edits in the original
(compared to my translated version) has been made by Mats in January.

So I run 'git diff' plus the committish of the previous commit:

fede@debian:~/lilypond-git/Documentation$ git diff
c6152932c5610e7ac834066d8dbea8f9af31260c learning/fundamental.itely >
~/fundamental.diff

Using check-translation would be quicker, of course.  In the meanwhile
I'll use this procedure.

Cheers,
Federico



Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Francisco Vila
2010/11/27 Federico Bruni <[hidden email]>:

> I've tried check-translations but I had problems.
> Let's take an example: I'm going to update it/learning/fundamental.itely
>
> This file has been renamed since my first translation:
>
> $ make ISOLANG=it check-translation | grep 'diff --git'
> diff --git a/Documentation/user/fundamental.itely
> b/Documentation/learning/fundamental.itely
>
> So I run this command:
>
> $ make CHECKED_FILES=it/{learning,user}/fundamental.itely
> check-translation
> ISOLANG= /usr/bin/python ../scripts/auxiliar/check_translation.py
>
>
> Can you see what's wrong?  Maybe ISOLANG= is missing 'it'?

Yes, with ISOLANG=it you'll obtain 7520 lines worth of output.

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


Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Federico Bruni-2
Il giorno sab, 27/11/2010 alle 18.16 +0100, Francisco Vila ha scritto:
> >
> > $ make CHECKED_FILES=it/{learning,user}/fundamental.itely
> > check-translation
> > ISOLANG= /usr/bin/python ../scripts/auxiliar/check_translation.py
> >
> >
> > Can you see what's wrong?  Maybe ISOLANG= is missing 'it'?
>
> Yes, with ISOLANG=it you'll obtain 7520 lines worth of output.


Where should I define ISOLANG=it?

Documentation/it/GNUmakefile already has that string.
And Documentation/it/learning/GNUmakefile doesn't need to have it (I
just checked Documentation/es/learning/GNUmakefile).





Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Jean-Charles MALAHIEUDE
Le 27/11/2010 18:36, Federico Bruni disait :

> Il giorno sab, 27/11/2010 alle 18.16 +0100, Francisco Vila ha scritto:
>>>
>>> $ make CHECKED_FILES=it/{learning,user}/fundamental.itely
>>> check-translation
>>> ISOLANG= /usr/bin/python ../scripts/auxiliar/check_translation.py
>>>
>>>
>>> Can you see what's wrong?  Maybe ISOLANG= is missing 'it'?
>>
>> Yes, with ISOLANG=it you'll obtain 7520 lines worth of output.
>
>
> Where should I define ISOLANG=it?
>


Just when invoking check-translation:

make ISOLANG=it CHECKED_FILES=it/DIR/FILE.itely check-translation

Cheers,
Jean-Charles


Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Federico Bruni-2
Il giorno sab, 27/11/2010 alle 18.55 +0100, Jean-Charles Malahieude ha
scritto:
> > Where should I define ISOLANG=it?
> >
>
>
> Just when invoking check-translation:
>
> make ISOLANG=it CHECKED_FILES=it/DIR/FILE.itely check-translation

Ok... but I wonder why in CG 4.8.3 the command is:

make CHECKED_FILES=MY_LANGUAGE/manual/foo.itely check-translation

What's wrong: documentation or some configuration for italian language?

Thanks,
Federico



Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Jean-Charles MALAHIEUDE
Le 27/11/2010 19:26, Federico Bruni disait :

> Il giorno sab, 27/11/2010 alle 18.55 +0100, Jean-Charles Malahieude ha
> scritto:
>>> Where should I define ISOLANG=it?
>>>
>>
>>
>> Just when invoking check-translation:
>>
>> make ISOLANG=it CHECKED_FILES=it/DIR/FILE.itely check-translation
>
> Ok... but I wonder why in CG 4.8.3 the command is:
>
> make CHECKED_FILES=MY_LANGUAGE/manual/foo.itely check-translation
>
> What's wrong: documentation or some configuration for italian language?
>
> Thanks,
> Federico
>

I would say: documentation

Francisco, would you mind having a look at it?

Cheers,
Jean-Charles




Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Francisco Vila
2010/11/27 Jean-Charles Malahieude <[hidden email]>:

> Le 27/11/2010 19:26, Federico Bruni disait :
>>
>> Il giorno sab, 27/11/2010 alle 18.55 +0100, Jean-Charles Malahieude ha
>> scritto:
>>>>
>>>> Where should I define ISOLANG=it?
>>>>
>>>
>>>
>>> Just when invoking check-translation:
>>>
>>> make ISOLANG=it CHECKED_FILES=it/DIR/FILE.itely check-translation
>>
>> Ok... but I wonder why in CG 4.8.3 the command is:
>>
>> make CHECKED_FILES=MY_LANGUAGE/manual/foo.itely check-translation
>>
>> What's wrong: documentation or some configuration for italian language?
>>
>> Thanks,
>> Federico
>>
>
> I would say: documentation
>
> Francisco, would you mind having a look at it?

Documentation is [maybe too] abbreviated in this case.  The example
just shows what has to be added to the command line for checking some
given files.  But the part 'make [whatever] check-translation' must be
understood as 'make ISOLANG=[your language id] check-translation'.
Different options to achieve a given result have to be taken as added
to the command line as options.  It is easier and more readable not to
put always every possible option in examples.

Anyway, still it's possible to improve those directions.
--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Federico Bruni-2
Il giorno sab, 27/11/2010 alle 23.41 +0100, Francisco Vila ha scritto:
> > Francisco, would you mind having a look at it?
>
> Documentation is [maybe too] abbreviated in this case.  The example
> just shows what has to be added to the command line for checking some
> given files.  But the part 'make [whatever] check-translation' must be
> understood as 'make ISOLANG=[your language id] check-translation'.
> Different options to achieve a given result have to be taken as added
> to the command line as options.  It is easier and more readable not to
> put always every possible option in examples.

This is not straightforward for those (like me) who know nothing about
make files.

Also, in that page (CG 4.8.3) ISOLANG=MY_LANGUAGE is always specified
except for commands using CHECKED_FILES=

I could think that there's no need to add ISOLANG= because the script
can set automatically the language by looking at the path of the file
I'm checking (CHECKED_FILES=MY_LANGUAGE/manual/foo.itely).

(Yes, I could also think about adding ISOLANG= if it's not working...
but I trust doc editors so much! :-))

IMO we need consistency, so I suggest two possible ways:

- add ISOLANG=MY_LANGUAGE in all commands wich require it
- don't add ISOLANG=MY_LANGUAGE in any command, just put a warning at
the beginnning of the page, saying something like "you need to specify
your language in all the following commands by adding the
ISOLANG=MY_LANGUAGE option"




Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Francisco Vila
2010/11/28 Federico Bruni <[hidden email]>:

> Il giorno sab, 27/11/2010 alle 23.41 +0100, Francisco Vila ha scritto:
>> > Francisco, would you mind having a look at it?
>>
>> Documentation is [maybe too] abbreviated in this case.  The example
>> just shows what has to be added to the command line for checking some
>> given files.  But the part 'make [whatever] check-translation' must be
>> understood as 'make ISOLANG=[your language id] check-translation'.
>> Different options to achieve a given result have to be taken as added
>> to the command line as options.  It is easier and more readable not to
>> put always every possible option in examples.
>
> This is not straightforward for those (like me) who know nothing about
> make files.
>
> Also, in that page (CG 4.8.3) ISOLANG=MY_LANGUAGE is always specified
> except for commands using CHECKED_FILES=
>
> I could think that there's no need to add ISOLANG= because the script
> can set automatically the language by looking at the path of the file
> I'm checking (CHECKED_FILES=MY_LANGUAGE/manual/foo.itely).

On second thought, I think you're right, setting checked_files makes
isolang=it useless.

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


Reply | Threaded
Open this post in threaded view
|

Re: updating an up-to-date file?!?

Francisco Vila
2010/11/28 Francisco Vila <[hidden email]>:

> 2010/11/28 Federico Bruni <[hidden email]>:
>> Il giorno sab, 27/11/2010 alle 23.41 +0100, Francisco Vila ha scritto:
>>> > Francisco, would you mind having a look at it?
>>>
>>> Documentation is [maybe too] abbreviated in this case.  The example
>>> just shows what has to be added to the command line for checking some
>>> given files.  But the part 'make [whatever] check-translation' must be
>>> understood as 'make ISOLANG=[your language id] check-translation'.
>>> Different options to achieve a given result have to be taken as added
>>> to the command line as options.  It is easier and more readable not to
>>> put always every possible option in examples.
>>
>> This is not straightforward for those (like me) who know nothing about
>> make files.
>>
>> Also, in that page (CG 4.8.3) ISOLANG=MY_LANGUAGE is always specified
>> except for commands using CHECKED_FILES=
>>
>> I could think that there's no need to add ISOLANG= because the script
>> can set automatically the language by looking at the path of the file
>> I'm checking (CHECKED_FILES=MY_LANGUAGE/manual/foo.itely).
>
> On second thought, I think you're right, setting checked_files makes
> isolang=it useless.

Sorry for this quick'n'dirty answer, I was running out of battery at
my laptop :-)

These are some real-world results from make check-translation:

make ISOLANG=it CHECKED_FILES=it/learning/fundamental.itely
check-translation | wc -l
7518

make ISOLANG=it  check-translation | wc -l
7518

make CHECKED_FILES=it/learning/fundamental.itely check-translation | wc -l
1

From this, it looks clear that setting CHECKED_FILES does not limit
the checking to the specified files.  The option could be broken or we
are doing something bad.  It also looks clear that ISOLANG=it is
necessary in either case.  Therefore, please forget what I said on my
last message about this very option.  Note that writing ISOLANG= alone
does not leave the environment variable unset, it rather sets it to an
empty string; this would be wrong.

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