Re: [Libreoffice] Windows build tagging ...

2011-10-31 Thread Michael Meeks
Hi Christian,

On Fri, 2011-10-28 at 15:43 +0200, Christian Lohmaier wrote:
 Git log on the notes object is not the same as git notes list.

Ah ! this was my missing piece :-) so your approach sounds much better
indeed.

 the log is sequential/chronological as is any other commit.
..
 See above: git *log* -p `git notes get-ref` :-) and with the
 additional -S earch you can filter that log output to only contain the
 wanted ones.

Strangely my 'git notes get-ref' doesn't exist:

$ git notes get-ref
error: Unknown subcommand: get-ref

Otherwise it sounds like this'd be ideal ( I have git 1.7.3.4 ).

 git log -p -Swin32 working build `git notes get-ref`
 gives you only the annotation commits, and contains the annotated revision
 
 I didn't just suggest things by only reading the manpage, I also
 played with it

Sure; so it sounds like as/when people's git's are upgraded, this would
be much faster and cleaner than grepping the whole log output thus:

hash=`git log --pretty='%H %N' | grep 'win32 working build' | head -n1 
| sed 's/ win32.*//'`

And presumably we should be using a namespace for that too in the most
recent notes impl.

Anyhow - I pushed something that works as of now; we just need someone
to insert the best note they can as/when a build really builds [ pending
the dependency fix for the manifest file I guess ].

Thanks !

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Windows build tagging ...

2011-10-28 Thread Michael Meeks

On Fri, 2011-10-28 at 01:55 +0200, Christian Lohmaier wrote:
 So I suspect the --set-last-working shall be limited to the
 tinderboxes that build regularly with a non-changing setup, i.e.
 without having random other stuff that might affect the build-result?

Well - I suggest we do it manually for now; at least something is
better than nothing here.

 never used the notes feature - but its help says that it can list the
 notes - so no parsing of the full log necessary, just using git notes
 list

Sure, a good idea :-) I've been there; here is some sample output:

$ git notes list | head
63128339eb1c9dceab08cb9f34c8b3a6b278f48b 
002c16ce95fa6e384e7541b6e656b9058dd9b459
3d98f2ca6d9843f7eecf3f8c8d85da2b3eb9e209 
00a326249f7bb4e7ded9c743836d9d572d3a9d7f
de193bbe203f54b2cbb18d03962691b91a3b0b4c 
00a6a3f6279dcf3b790a17f21bccd3e4cea1fc57
742a4d7cc15dda42a1acdab966994d39a9a0d991 
010a4baa37bbdca0c35dc3555f6467174e956644

Not so helpful in my view ;-)

 or if one wants to parse a log, one can do it with
 
 git log -p `git notes get-ref`
 that way one only has to examine the ones that match. or can do a

Sure - but the problem is then that you need to sort them into a
sequential /chronological order (which the notes list does not appear to
be in). At the end of the day - the 'git log' output is in the order we
want, and has the details ;-)

so - rest assured, I did think a little before suggesting this.

It seems like Bjoern's git log --pretty=%H %N gives:

62f4128d74179c6211fc961845182bf2956e3323 
3f3c2a7bd3bb238412a787c2e59290285a8cc51e 
5ad4d151dac1eb887d92200330e31af269d8d1fd win32 working build

f9f4c631b100ace6633dc06668ac107fb2bf 

and is pretty much perfect on that basis :-)

So - will hack that into 'g' next week if no-one else has.

Thanks for the input !

ATB,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Windows build tagging ...

2011-10-28 Thread Christian Lohmaier
On Fri, Oct 28, 2011 at 3:12 PM, Michael Meeks michael.me...@suse.com wrote:

 On Fri, 2011-10-28 at 01:55 +0200, Christian Lohmaier wrote:
 So I suspect the --set-last-working shall be limited to the
 tinderboxes that build regularly with a non-changing setup, i.e.
 without having random other stuff that might affect the build-result?

        Well - I suggest we do it manually for now; at least something is
 better than nothing here.

 never used the notes feature - but its help says that it can list the
 notes - so no parsing of the full log necessary, just using git notes
 list

        Sure, a good idea :-) I've been there; here is some sample output:

 $ git notes list | head
 63128339eb1c9dceab08cb9f34c8b3a6b278f48b 
 002c16ce95fa6e384e7541b6e656b9058dd9b459
 3d98f2ca6d9843f7eecf3f8c8d85da2b3eb9e209 
 00a326249f7bb4e7ded9c743836d9d572d3a9d7f
 de193bbe203f54b2cbb18d03962691b91a3b0b4c 
 00a6a3f6279dcf3b790a17f21bccd3e4cea1fc57
 742a4d7cc15dda42a1acdab966994d39a9a0d991 
 010a4baa37bbdca0c35dc3555f6467174e956644

        Not so helpful in my view ;-)


This is the notes list - show first hash and check for message, if
it is OK, checkout he second hash, but true:

 or if one wants to parse a log, one can do it with

 git log -p `git notes get-ref`
 that way one only has to examine the ones that match. or can do a

        Sure - but the problem is then that you need to sort them into a
 sequential /chronological order (which the notes list does not appear to
 be in).

Git log on the notes object is not the same as git notes list.
the log is sequential/chronological as is any other commit.

 At the end of the day - the 'git log' output is in the order we
 want, and has the details ;-)

See above: git *log* -p `git notes get-ref` :-) and with the
additional -S earch you can filter that log output to only contain the
wanted ones.

git log -p -Swin32 working build `git notes get-ref`

gives you only the annotation commits, and contains the annotated revision

I didn't just suggest things by only reading the manpage, I also
played with it

ciao
Christian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] Windows build tagging ...

2011-10-27 Thread Michael Meeks
Hi there,

Bjoern - quick request for help below ;-)

On Wed, 2011-10-26 at 22:05 +0200, Regina Henschel wrote:
 I have build it (about 2011-10-19) with commit ID 
 5ad4d151dac1eb887d92200330e31af269d8d1fd

Ah ! this is where I needed to put my magic note; I've just pushed
that. I added support to './g':

   --last-working  checks out the last known working build (useful for 
windows)
   --set-last-working  adds a note denoting a working build
   --push-notespushes all notes

That - hopefully will be useful for this in future - so we can hoist
the note up the tree as/when we get a perfect build. If you try:

./g --last-working

it fetches the notes and then ... well; then it fails to do anything
useful. Bjoern - this is where your awk skills can get shown off to the
full I guess :-) failing that - I re-write './g' in a real language
(perl) ;-

We need to basically do after fetching the notes:

git log
..
commit 5ad4d151dac1eb887d92200330e31af269d8d1fd
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Oct 19 21:52:17 2011 +0400

migrate to StringRangeEnumerator in pdfexport

Notes:
win32 working build

And - when we find the magic string:

Notes:\n\twin32 working build\n

we need the previous commit hash, and to check that out. Of course it'd
be nice if 'git notes' had a search function, or sorted output or ...
showed the note text or ... ;-) but it does not.

This is not easy for me in shell, though I wasted a little while on
it ;-) perhaps some shell maestro can help finish the

'./g --last-working' impl. ?

and - hopefully, this will stop us having so many problems in this area
again.

Thanks :-)

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Windows build tagging ...

2011-10-27 Thread Bjoern Michaelsen
On Thu, Oct 27, 2011 at 12:59:18PM +0100, Michael Meeks wrote:
   it fetches the notes and then ... well; then it fails to do anything
 useful. Bjoern - this is where your awk skills can get shown off to the
 full I guess :-) failing that - I re-write './g' in a real language
 (perl) ;-

I played a bit with this and a basic implememtation isnt too hard if one uses:

 git log --pretty=%H %N

or somesuch. But I wonder if notes are really the way to go as there are
multiple platforms and once --last-working is existing, other platforms (e.g.
OSX, crosscompiled windows) will want it too -- and since there is only one
note per object possible one would have to take care of merging etc.

Why not having a one moving tag e.g. last_stable_WNT for each platform? Do we
really care much about commits older than the last_stable one?(*)

   That - hopefully will be useful for this in future - so we can hoist
 the note up the tree as/when we get a perfect build. If you try:

./g --last-working

it fetches the notes and then ... well; then it fails to do anything
 useful. 

Actually that is the other tricky part: What should the stuff do once it finds
the last stable commit? Check it out without creating a branch? Rather
dangerous for somebody not too deeply knowing git (and it gives you scary
warnings). Even if it would create a branch, once you commit on that you would
need to rebase it on master before pushing, which is also rather inconvenient.

I am just wondering what the final result should look like ...

Best,

Bjoern

(*) Or, being devils advocate: A branch stable_WNT, where the 
--set-last-working
stuff pushes commits that are already on master, but just up to the last known
good state. After all, a branch in git is just a forward moving tag.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Windows build tagging ...

2011-10-27 Thread Christian Lohmaier
Hi *,

On Thu, Oct 27, 2011 at 1:59 PM, Michael Meeks michael.me...@suse.com wrote:
 On Wed, 2011-10-26 at 22:05 +0200, Regina Henschel wrote:
 I have build it (about 2011-10-19) with commit ID
 5ad4d151dac1eb887d92200330e31af269d8d1fd

        Ah ! this is where I needed to put my magic note; I've just pushed
 that. I added support to './g':

   --last-working      checks out the last known working build (useful for 
 windows)
   --set-last-working  adds a note denoting a working build
   --push-notes        pushes all notes

        That - hopefully will be useful for this in future - so we can hoist
 the note up the tree as/when we get a perfect build. If you try:

So I suspect the --set-last-working shall be limited to the
tinderboxes that build regularly with a non-changing setup, i.e.
without having random other stuff that might affect the build-result?

        git log

never used the notes feature - but its help says that it can list the
notes - so no parsing of the full log necessary, just using git notes
list and iterate the list of note-object until the magic string is
found, and then checkout the corresponding annotated object.

or if one wants to parse a log, one can do it with

git log -p `git notes get-ref`
that way one only has to examine the ones that match. or can do a

git log -p -Swin32 working build `git notes get-ref`

and only get the commits with a corresponding match.

The annotated commit is extracted from the +++ b/commit-hash line

 [...]  we need the previous commit hash, and to check that out. Of course it'd
 be nice if 'git notes' had a search function, or sorted output or ...
 showed the note text or ... ;-) but it does not.

See above - can combine the two methods :-)

ciao
Christian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice