简体   繁体   中英

download only files changed between 2 dates on perforce

I need to download from perforce server only those files which are changed between 2 dates. what i am looking for is to compare a branch with almost half a million files between 2 dates. Since there are too many files i dont want to sync to a new workspace.

So is there a way to only download files changed between 2 dates on perforce?

Try this, from an empty client that maps the relevant piece of your repository:

p4 sync -k @2012/01/01
p4 sync @2012/02/01

The sync -k will fool the Perforce server into thinking your workspace has the files from your repository as they existed on the first of January. The second sync will sync the files as they existed on the first of February -- but Perforce will only sync the files that changed during the month of January, since it "knows" you already have the files as they existed on the first of January.

I think you can do this with a little script.

  1. Run 'p4 changes ...@date1,@date2' to find out what changes were made
  2. Run 'p4 describe' on each changelist to see what files were included
  3. Run 'p4 sync' on those files

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM