Change 7646

sven_erik_knop (Sven Erik Knop)
Sven Erik Knop committed this change into //guest/sven_erik_knop/P4Pythonlib/scripts
Request Review
Download .zip
Added p4zip.py, a simple script that creates zip files from depot files without the need
to load the files into the workspace first.

Using 'p4 print', p4zip will store the specified files in a zip file. The files names are mapped to local
names using the workspace view mapping. Note that you do not have to be in the workspace to do so.

Usage: p4zip.py [-c|--client client] [-p|--port port] zipfile file[revRange] ...

The workspace view map is used to transform the depot files into local files. For example, if the workspace
has the following view

  //depot/Jam/MAIN/src/... //ws/Jam/MAIN/src/...

then the following command

  p4zip.py --client ws //depot/Jam/MAIN/src/...

would transform the file '//depot/Jam/MAIN/src/compile.c' into 'Jam/MAIN/src/compile.c' in the zip file.

No local files are created but the zip file. Note that the script could consume a lot of memory if the files
to be loaded into the zip files are very large.
  • Files 1
  • Comments 0
0 edited 1 added 0 deleted
p4zip.py#1
Loading...
Tip: Use n and p to cycle through the changes.