Showing posts with label change. Show all posts
Showing posts with label change. Show all posts

Wednesday, 10 November 2010

How to get the last Perforce change list synced to a specific directory by non-local client spec (cmd line)?

I'm trying to return the last change list synced to a specific directory per client spec. I've researched this pretty heavily and am starting to think it's impossible. This is what I have so far:

p4 changes -m1 @

This will return the last change list synced to the passed in client spec, which I can then parse the CL out from. Example of output:

Change 798261 on 2010/11/08 by asdf@specname 'description...'

From that, I can easily parse out the change list: 798261.

What I'm trying to do is get similar output, but for a specific directory that's mapped in the client spec that's passed into the command. I know the -d flag usually lets you specify a directory in perforce commands, but p4 changes doesn't support the -d flag. This is what I'm going for if the -d flag was supported in p4 changes:

p4 changes -m1 -d /root/appname/bin/...@

In theory, if the -d flag was supported, this would return the last CL synced to /root/appname/bin through the passed in client spec. Is there any way to do this? Is there a p4 command I'm missing that would let me specify the directory and get the last CL synced to that directory? Any suggestions are greatly appreciated.

Thanks!


View the original article here

Sunday, 7 November 2010

Sequence error: local change vs remote

What does "Sequence error: local 'change' counter vs remote" mean? Why am I getting "Sequence error" when trying to submit a file to the server?


A "Sequence error" occurs when the change counter is altered before a submit of an existing pending numbered change.  Changelists should always appear in a sequential order, and this error means that the sequence is potentially out of order. If you see this error, contact Perforce Support immediately and shut down your Perforce Server.

Note: Carrying on with this error in place could cause further damage to the information stored in your Server.

The sequence of events that generates this error, is as follows:
Create a pending numbered changeForce the change counter to a number below the pending change numberAttempt to submit the pending numbered changeFrom the error reported, local refers to the current change counter value and remote the value of numbered pending change.  For example: p4 submit -c 221Submitting change 221.Locking 1 files ...edit //depot/main/jam.c#4Operation 'dm-CommitSubmit' failed.Sequence error: local 'change' counter '100' vs remote '221'!Here the change counter has been set to 100 whereas the pending numbered changelist created before the change counter was changed was change 221.

View the original article here