[p4] Adding a Changelist # to C++ code...?
Steve M. Robbins
steve at sumost.ca
Thu Feb 21 08:55:32 PST 2008
On Thu, Feb 21, 2008 at 11:12:46AM -0000, Robert Cowham wrote:
> One way is to do this as part of your build process:
> A belt and braces way, assuming you are in root of workspace:
> Get the output of "p4 changes -m 1 -s submitted ...#have" - this gives you
> changelist in your workspace rather than whole repository (say 1234)
> Ensure that the output of "p4 sync -n ... at 1234" is empty meaning you are
> cleanly synced to that changelist.
Nice. However, doesn't this also assume that you have somehow
communicated the client name to p4? Either you have to have it set in
the environment (but then who uses just one client?) or you have to
have a p4config file properly set up.
Suppose you have a bunch of p4v users who don't know about p4config.
How do you write this kind of "find the changelist" script
I keep running into this kind of problem that makes me pine for CVS or
Subversion where the filesystem droppings (CVS or .svn directories)
means it is trivial to find out your "depot path" in a script.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the perforce-user