Showing posts with label Directory. Show all posts
Showing posts with label Directory. 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

Saturday, 6 November 2010

Changing the Windows TEMP Directory

I have been hitting the Windows path length limit of 260 characters on my local workspace, but it is not the workspace root that is causing the problem. Instead, the error message indicates that the temporary file could not be created.


As noted in KB article #978, you can avoid most path length issues by moving the local workspace root to a shorter path. However this does not affect the current location of the Windows TEMP directory, typically located on the path: C:\Users and Documents\{user name}\local settings\tempBefore adding the user name this is a 43 character path. Adding a user name of 8 letters pushes this over 50 characters. The location of the temporary file directory is controlled by the operating system, as noted in the Perforce Command Reference. To set the Windows temporary directory location for a current DOS command prompt, you can to use the "set" command from the command prompt. For example: set TMP=C:\temp set TEMP=%TMP% Note: The temporary directory must already exist. The first command sets the value for %TMP%. The second verifies that the %TEMP% value is the same as %TMP% -- a mismatch of those two values can cause a variety of problems for anything that uses the temporary directory. To permanently set the temporary directory for a Windows user account, go to Control Panel->System->Advanced, and enter the "Environment Variables" dialog window to find and change the TEMP and TMP variable settings in the "User variables".

View the original article here