[p4] Restructuring depot

Wright, Richard richardw at cobaltgroup.com
Tue Oct 4 14:03:44 PDT 2005

Just a quick fix to the script below:

You would want to add '/...' after most of the '$1's listed below:
(e.g. p4 flush //depot/$1/...)


-----Original Message-----
From: Wright, Richard 
Sent: Tuesday, October 04, 2005 2:00 PM
To: 'Jonathan Arnold'; 'perforce-user at perforce.com'
Subject: RE: [p4] Restructuring depot

Here are a couple suggestions:
1. Make sure you have upgraded to the 2005.1 server before you do any major
restructuring.  The addition of the db.revhx table in the database can make
a *huge* difference in the responsiveness of the GUI when dealing with
highly restructured depots.

2. Create a branch spec to do the move.  It is easier to see what you are
about to do if you move it with a branch spec, than just doing it by hand. 

2a. As an alternate option, you may want to write a script to do it.  It
could be fairly simple, and it can keep you from moving things to the wrong
place due to a typo.  You could even do this with a simple shell script
(untested, consider it psudo-code):

# move.sh
p4 flush //depot/$1  #You need to have files synced to delete them
p4 integ -v //depot/$1 //depot/legacy/$1
p4 delete //depot/$1
p4 change -o | sed "s/<enter description here>/Moving $1 to legacy/" | p4
submit -i

Then, you would just run it like this:
move.sh OldProject


-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com]On Behalf Of Jonathan Arnold
Sent: Tuesday, October 04, 2005 1:22 PM
To: 'perforce-user at perforce.com'
Subject: [p4] Restructuring depot

We have a source depot with lots of folders at the root level,
that I'd like to move into a "legacy" folder. What is the easiest
way to do this? Just create a client and do it by hand?

Jonathan Arnold               (mailto:jdarnold at buddydog.org)
Jiggle The Handle, a personal blog    http://jiggle.anaze.us

Procrastination is the art of keeping up with yesterday.
  - Don Marquis
perforce-user mailing list  -  perforce-user at perforce.com

More information about the perforce-user mailing list