17 messages in com.perforce.perforce-user[p4] finding change number mapped to ...| From | Sent On | Attachments |
|---|---|---|
| Hoff, Todd | 17 Mar 2003 14:14 | |
| Bennett, Patrick | 17 Mar 2003 15:07 | |
| Hoff, Todd | 17 Mar 2003 15:18 | |
| Eric Whitcombe | 17 Mar 2003 15:39 | |
| Patrick Bennett | 17 Mar 2003 15:56 | |
| Robert Duff | 17 Mar 2003 16:45 | |
| Jeff A. Bowles | 17 Mar 2003 18:43 | |
| Patrick Bennett | 17 Mar 2003 21:27 | |
| Chuck Karish | 18 Mar 2003 05:08 | |
| Hoff, Todd | 18 Mar 2003 06:57 | |
| Bennett, Patrick | 18 Mar 2003 07:01 | |
| Robert Duff | 18 Mar 2003 07:41 | |
| Bennett, Patrick | 18 Mar 2003 10:30 | |
| Hoff, Todd | 18 Mar 2003 11:59 | |
| Robert Duff | 18 Mar 2003 12:41 | |
| Bennett, Patrick | 18 Mar 2003 12:48 | |
| Robert Duff | 18 Mar 2003 14:10 |
| Subject: | [p4] finding change number mapped to pending change number?![]() |
|---|---|
| From: | Chuck Karish (kar...@well.com) |
| Date: | 03/18/2003 05:08:19 AM |
| List: | com.perforce.perforce-user |
At 07:45 PM 3/17/2003 -0500, Robert Duff wrote:
What I would really like to see is this -- some way to trace back a submitted
changelist back to a pending changelist. Since pending changelists are simply
thrown out, it would be nice to have some sort of record to the previous number.
Sounds silly, I know, but sometimes we have pending changelists described in
bugs when they actually should be the submitted numbers. Being able to somehow
track a change all through the process (pending and submitted) would be very,
very nice. Just think of the possibilities!
You can dredge the information you need out of the journal.
Here's an example:
pluto> echo Test file 1. > foo pluto> echo Test file 2. > bar pluto> p4 add foo bar pluto> p4 change # Put foo into change 64 pluto> p4 change # Put bar into change 65 pluto> p4 submit -c 65 pluto> p4 submit -c 64
Here's the end of the journal, showing change 64 being submitted and renumbered
to 66.
$P4CLIENT is karish.pluto. $P4USER is Chuck_Karish.
@rv@ 2 @db.working@ @//karish.pluto/chuck/toast/foo@ @//pluto/chuck/toast/foo@
@karish.pluto@ @Chuck_Karish@ 0 1 0 0 0 64 0 1
@rv@ 1 @db.locks@ @//pluto/chuck/toast/foo@ @karish.pluto@ @Chuck_Karish@ 0 1
@rv@ 2 @db.working@ @//karish.pluto/chuck/toast/foo@ @//pluto/chuck/toast/foo@
@karish.pluto@ @Chuck_Karish@ 0 1 0 0 0 64 1047990924 1
@rv@ 1 @db.locks@ @//pluto/chuck/toast/foo@ @karish.pluto@ @Chuck_Karish@ 0 1
@rv@ 0 @db.counters@ @change@ 66
@dv@ 0 @db.changex@ 64 64 @karish.pluto@ @Chuck_Karish@ 1047991166 1 @First test
change.
@
@dv@ 0 @db.change@ 64 64 @karish.pluto@ @Chuck_Karish@ 1047991166 1 @First test
change.
@
@pv@ 0 @db.change@ 66 64 @karish.pluto@ @Chuck_Karish@ 1047991166 1 @First test
change.
@
@pv@ 1 @db.have@ @//karish.pluto/chuck/toast/foo@ @//pluto/chuck/toast/foo@ 1 0
@pv@ 3 @db.rev@ @//pluto/chuck/toast/foo@ 1 0 0 66 1047991166 1047990924
00000000000000000000000000000000 @//pluto/chuck/toast/foo@ @1.1@ 0
@pv@ 0 @db.revcx@ 66 @//pluto/chuck/toast/foo@ 1 0
@dv@ 1 @db.locks@ @//pluto/chuck/toast/foo@ @karish.pluto@ @Chuck_Karish@ 0 1
@dv@ 2 @db.working@ @//karish.pluto/chuck/toast/foo@ @//pluto/chuck/toast/foo@
@karish.pluto@ @Chuck_Karish@ 0 1 0 0 0 64 1047990924 1
If you scan for the last line whose third field is @db.change@ and whose fifth
field is the
pending change number, you can read the final change number from the fourth
field:
pluto> oldnum=64
pluto> awk '$3 ~ /@db.change@/ && $5 ~ /'$oldnum'/ {newnum=$4} END {print
newnum}' journal
66
pluto>
Chuck Karish karish at well.com (415) 317-0182




