3 messages in com.perforce.perforce-user[p4] show changelists for integrate?
FromSent OnAttachments
PETERS MW Mr -NUCLEAR07 Oct 1999 06:15 
Mike Meyer07 Oct 1999 11:24 
Mike Meyer07 Oct 1999 13:20 
Subject:[p4] show changelists for integrate?
From:Mike Meyer (mw@phone.net)
Date:10/07/1999 01:20:34 PM
List:com.perforce.perforce-user

On Thu, 7 Oct 1999, Steve Cogorno wrote: :->> p4 changes //depot/main/foo.c#4 :->> should get you all changes through #4. To get just the changes for #8, :->> you need to do: :->> p4 changes //depot/main/foo.c#8,#8 :->That may be the way it works, but it doesn't make sense.

I can see that viewpoint. On the other hand, it's not clear to me that having it work the way you want makes any more sense.

Looking at things globally, a depot file sans revision always (are there exceptions?) refers to the head revision, so that //depot/main/foo.c refers to //depot/main/foo.c#head (or #8 in this case). If you want the changes command with a revision but not a revision range to list the change for that revision, then

p4 changes //depot/main/foo.c

would only list the last change for foo.c. I would say that clearly doesn't make sense.

:->If I wanted all of the versions through #4, I would have put :-> p4 changes //depot/main/foo.c#1,#8

Um, no - you want "p4 changes //depot/main/foo.c#1,#4" for that one.

:->But back to my original question. I figured out how to do this, but it is :->ugly: :-> :->p4 integrate -n -b global7 | sed "s|.*- .* //\(.*\)#\(.*\)|//\1#\2,#\2|" | \ :-> p4 -x - changes | sort -u :-> :->I would think there has to be a better way to do this. Perhaps a new :->reporting command is in order?

I don't have the text of the original question handy, but did you really only want the change that created the last revision of the source file? For instance, I see output from an integrate -n that looks like:

//depot/branch/foo.c#2 - integrate from //depot/main/foo.c#3,#4

indicating that changes for both revision 3 and revision 4 are going to be integrated. Did you want them both, or just one?

It would be nice for this purpose if the output of integrate -n used the file names the same way that p4 changes did, and gave us //depot/branch/foo.c#8,#8 for an integrate that only involved the change for that revision. That way, your command becomes:

p4 integrate -n -b global7 | sed 's;//.*//;//;' | p4 -x - changes |\ sort -u

which is a bit more palatable.

If you had a concrete suggestion for that command, I'm sure the folks at perforce would be happy to consider it.

<mike