[p4] Running Obliterate command on perforce server livedatabases

Robert Cowham robert at vaccaperna.co.uk
Thu Sep 27 08:06:55 PDT 2007


The principles were:

- find all changes on the branch
- remove first one (which creates the branch)
- for all remaining changes, find the files in each change and add to a set
- since these files have been changed since the branch was done
- create a workspace with whole branch mapped, and with an exclusion line
for each file in the set
- obliterate using the workspace

Details left as an exercise for the reader!

I think there may be some performance optimisations depending on how many
files turn out to have been changed on the branch. Also I would experiment
(on a test server) the relative performance of obliterates with workspaces
and exclusions vs, multiple obliterates of subsets where there are no files.

An alternative version of the script gets all the files in the branch,
subtracts the changes files and then explicitly obliterates files (e.g.
using -x) - I think this is likely to be a lot slower.

Robert

> -----Original Message-----
> From: perforce-user-bounces at perforce.com 
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of 
> Jamison, Shawn
> Sent: 27 September 2007 14:24
> To: perforce-user at perforce.com
> Subject: Re: [p4] Running Obliterate command on perforce 
> server livedatabases
> 
> Can you elaborate on the process and tools/scrips you used 
> for creating these sparse branches?? 
> 
> Thanks
> -Shawn J>
> Ciena Perforce Admin


More information about the perforce-user mailing list