Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perforce sync by date syntax and use of wildards

Tags:

sync

perforce

I am trying to check out a Perforce repository as of a certain date. The server is version 2010.1. According to the documents, I should be able to do something like this:

p4 sync @2001/06/24

However, when I attempt this I get the following error:

p4 sync @2014/08/28

p4_xsync: "//my/depot/path/@2014/08/28"

//my/depot/path/@2014/08/28 - no such file(s).

When I enter the date directly from the example, I get a different message:

//my/depot/path/@2001/06/24 - no file(s) as of that date.

Am I doing anything wrong? This seems like a very straightforward operation.

like image 940
Botono Avatar asked Oct 10 '14 18:10

Botono


People also ask

How does p4 sync work?

p4 sync brings the client workspace into sync with the depot by copying files matching its file pattern arguments from the depot to the client workspace. When no file patterns are specified on the command line, p4 sync copies a particular depot file if it meets all three criteria: Visible through the client view.

Can't add filenames with wildcards * in them?

To add files with filenames that contain wildcard characters, specify the -f flag. Filenames that contain the special characters '@', '#', '%' or '*' are reformatted to encode the characters using ASCII hexadecimal representation.

What is P4CLIENT?

The p4 client command puts the client spec into a temporary file and invokes the editor configured by the environment variable P4EDITOR . For new workspaces, the client name defaults to the P4CLIENT environment variable, if set, or to the current host name. Saving the file creates or modifies the client spec.

What does p4 Fstat do?

The p4 fstat command dumps information about each file, with information for each field on a separate line. The output is best used within a Helix C/C++ API application where the items can be accessed as variables, but is also suitable for parsing by scripts.


1 Answers

You're getting the same result as if you tried to run p4 sync //my/depot/path - you have to specify some actual files to sync (as opposed to just a depot path).

p4 sync //my/depot/path/...@2014/08/28 will get you all files under the depot path as of 2014/08/28.

like image 125
gareth_bowles Avatar answered Sep 30 '22 13:09

gareth_bowles