[p4] Drawing branch-diagrams code in P4 public depot?
phecht_98 at yahoo.com
Sat Oct 25 15:20:35 PDT 2008
I have tried to do such a thing using p4 integrated and graphwiz. Haven't had great or repeatable success. Some one mentioned that the P4wiki has something like this as well.
Any code in the public depot to do the graphs?
Date: Fri, 24 Oct 2008 08:30:09 -0700
From: "Jeff A. Bowles" <jab at pobox.com>
Subject: Re: [p4] Drawing branch-diagrams
To: "Rick Macdonald" <rickmacd at shaw.ca>
Cc: Felix Drueke <fdrueke at orga-systems.com>,
perforce-user at perforce.com
<9b8625810810240830m28e99adcje35b92309cf2866d at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
I have had good luck with the following strategy:
1. Use "p4 integrated" to get the list of all-existing parent-child
relationships, from-file and to-file.
2. Massage that output to get rid of common endings: //depot/main/x/y/z.c
and //depot/release1/x/y/z.c should whittle down to "//depot/main" ->
3. Eliminate the duplicate in these lists, because a branch of 1000 files
will have 1000 entries that look like "//depot/main" -> "//depot/release1".
4. Download Graphviz, which is free and runs on your platform. Make a
simple test case, and learn enough about the basic ASCII input to be able to
put the envelop information around it.
5. Make a Graphviz input from the data in #3.
6. Run Graphviz. It won't take long.
7. Note the weird times that people went off-the-road to integrate in
weird ways. (I often discard entries in step #3 that have less than 10-15
duplications because they're on-off branches or renames or ...)
It's easy, can be automated (and audited), and it is free. ( And pretty. )
More information about the perforce-user