git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to make gitk to use specified history information
@ 2009-11-16  7:51 Liu Yubao
  2009-11-16  8:08 ` Eric Raible
  0 siblings, 1 reply; 4+ messages in thread
From: Liu Yubao @ 2009-11-16  7:51 UTC (permalink / raw)
  To: git

Hi,

I want to obtain an outline of history information, for example:

  a - b - c - d - h -i -j
   \         /
    e- f - g

I simplify the graph like this:

  a - c - d - j
    \    /
      g

That's to say, I skip all commits that

  * have only one parent, and
  * have only one child, and
  * its child has only one parent

I checked `git help rev-list` but didn't find this feature, so I
write a little script[1] to parse output of `git rev-list --parents
--full-history --sparse --all` and get the simplified history:
j d
d c g
c a
g a

Now how can I make gitk to show this simpilified history? I have tried
GraphViz but the history information is still so large that GraphViz
crashes.


[1] http://jff.googlecode.com/svn/trunk/utils/git-branch-graph.pl

Best regards,

Liu Yubao

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to make gitk to use specified history information
  2009-11-16  7:51 how to make gitk to use specified history information Liu Yubao
@ 2009-11-16  8:08 ` Eric Raible
  2009-11-16  8:38   ` Liu Yubao
  2009-11-16 10:58   ` dirty code to get an outline of commit history with gitk [Was: how to make gitk to use specified history information] Liu Yubao
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Raible @ 2009-11-16  8:08 UTC (permalink / raw)
  To: git

Liu Yubao <yubao.liu <at> gmail.com> writes:

> I want to obtain an outline of history information, for example:
> 
>   a - b - c - d - h -i -j
>    \         /
>     e- f - g
> 
> I simplify the graph like this:
> 
>   a - c - d - j
>     \    /
>       g

"gitk --simplify-by-decoration"?

- Eric

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to make gitk to use specified history information
  2009-11-16  8:08 ` Eric Raible
@ 2009-11-16  8:38   ` Liu Yubao
  2009-11-16 10:58   ` dirty code to get an outline of commit history with gitk [Was: how to make gitk to use specified history information] Liu Yubao
  1 sibling, 0 replies; 4+ messages in thread
From: Liu Yubao @ 2009-11-16  8:38 UTC (permalink / raw)
  To: Eric Raible; +Cc: git

Eric Raible wrote:
> Liu Yubao <yubao.liu <at> gmail.com> writes:
> 
>> I want to obtain an outline of history information, for example:
>>
>>   a - b - c - d - h -i -j
>>    \         /
>>     e- f - g
>>
>> I simplify the graph like this:
>>
>>   a - c - d - j
>>     \    /
>>       g
> 
> "gitk --simplify-by-decoration"?
> 
> - Eric
> 
Thanks, but that gets "a - g - j" which isn't what I want.
(g and j are heads of two branches).

The command sequence to produce that full revision graph:

#!/bin/bash
d=/tmp/t$$
rm -rf $d && mkdir $d && cd $d || exit 1

doit () {
  for s in $@; do
    echo $s >> a.txt 
    git add a.txt
    git commit -q -m $s
  done
}

git init
doit a b c
git checkout -b t HEAD~2
doit e f g
git checkout master
git merge t
doit d h i j

gitk &

^ permalink raw reply	[flat|nested] 4+ messages in thread

* dirty code to get an outline of commit history with gitk [Was: how to make gitk to use specified history information]
  2009-11-16  8:08 ` Eric Raible
  2009-11-16  8:38   ` Liu Yubao
@ 2009-11-16 10:58   ` Liu Yubao
  1 sibling, 0 replies; 4+ messages in thread
From: Liu Yubao @ 2009-11-16 10:58 UTC (permalink / raw)
  To: Eric Raible; +Cc: git, Junio C Hamano

Eric Raible wrote:
> Liu Yubao <yubao.liu <at> gmail.com> writes:
> 
>> I want to obtain an outline of history information, for example:
>>
>>   a - b - c - d - h -i -j
>>    \         /
>>     e- f - g
>>
>> I simplify the graph like this:
>>
>>   a - c - d - j
>>     \    /
>>       g
> 
> "gitk --simplify-by-decoration"?
> 
> - Eric
> 
Hi, I get a very dirty implementation, see

http://jff.googlecode.com/svn/trunk/utils/git-branch-graph/

http://jff.googlecode.com/files/gitk-branch-graph--all.png
http://jff.googlecode.com/files/gitk--all.png

These are just to show my expectation, the code is very very very dirty,
I hope git and gitk will add this feature in an elegant and efficent way.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-16 10:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-16  7:51 how to make gitk to use specified history information Liu Yubao
2009-11-16  8:08 ` Eric Raible
2009-11-16  8:38   ` Liu Yubao
2009-11-16 10:58   ` dirty code to get an outline of commit history with gitk [Was: how to make gitk to use specified history information] Liu Yubao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).