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

StackOverflow https://stackoverflow.com/questions/4139076

  •  30-09-2019
  •  | 
  •  

Pergunta

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 @<Client_Spec_Name>

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/...@<Client_Spec_Name>

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!

Foi útil?

Solução

p4 changes -m1 //depot/foo/...@<client_name>

or

p4 changes -m1 /root/appname/bin/...@<client_name>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top