[p4] [Creating a new head revision with a single click]

Jeff Grills jgrills at junctionpoint.com
Wed May 30 14:01:54 PDT 2007


You haven't indicated what environment you're working in.  I don't think
that p4win nor p4v can be extended in this manner.  So, thinking about
an external tool to do this, you need at least a click to invoke the
tool from a gui, and you have to select the revision you want to make
the head revision, which seems like at least two mouse clicks. Assuming
that's okay, it shouldn't be hard to write an app that gets all the
revisions, presents it in a list, and lets you select a revision to
re-submit as head.  The steps you've outlined below seem correct,
although to my knowledge there's no reason to actually modify the file
and add whitespace as long as you merge with -ay.  In your specific
example, you'd issue these commands:

(make sure the file isn't already open)
p4 sync file#4
p4 edit file
p4 sync file
p4 resolve -ay file
p4 submit -d "Resubmitting revision 4 as head revision" file

Note that the -d option to submit requires a 2006.2 or newer server.  On
older servers you'd have to construct the changelist comments manually
and use submit -i.

Good luck.

j

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of
Mark.Bonfiglio at smsc.com
Sent: Wednesday, May 30, 2007 3:25 PM
To: perforce-user at perforce.com
Subject: [p4] [Creating a new head revision with a single click]

Hello,

I'm looking for single-mouse-click solution to make one revision of a
file 
the new head revision.

My current method is a bit cumbersome.  For example if I have a file
that 
has 10 revisions, and I want to make revision 4, the new head
(essentially 
becoming revision #11) I do the following:
                Check out revision 4
                Make a simple edit to rev 4 (usually add whitespace)
                Get latest revision from depot (this sets up a conflict)
                Resolve the conflict, making my file the new head
                Submit the change

What would be nice, is a right-click menu option titled something like 
"Make new Head Revision" that performs the above operations.

Is there a plugin that does this? Or does anyone know how to automate 
these steps?


Thanks for any tips

-Mark
_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user



More information about the perforce-user mailing list