[p4] Best way to sync foreign repository
Dirk Ringe
ringe at phenomic.net
Wed Apr 17 09:22:07 PDT 2002
For this task we use a tool called locksweep. It uses an offline checksum
database of all files in a part of the depot.
Steps:
1. Run locksweep to generate the checksum database
2. Rename old directory
3. Copy new files into empty directory with the correct name
4. Run locksweep to diff the current snapshot with the database
5. Three resulting text files have the edits,adds,deletes
6. Now run the p4 commands on them.
The tool is somewhere referenced from the p4 website, the pdf manual has all
the necessary steps in it.
Dirk
-----Original Message-----
From: perforce-user-admin at perforce.com
[mailto:perforce-user-admin at perforce.com]On Behalf Of Schaible, Jörg
Sent: Wednesday, April 17, 2002 6:02 PM
To: Perforce
Subject: [p4] Best way to sync foreign repository
Hello all,
what is the best way to synchronize the changes in a foreign (non-Perforce)
repository/archive with a local depot? We will receive from time-to-time an
archive with newer revisions. We're definately interested having the diff
between two repository versions. The archive contains some thousand files,
few files have changed, few are new, and some were deleted. Currently I'd
like to do following steps:
1. P4: Check out complete depot for edit
2. Clear all of the local files
3. Move the new fileset from the foreign repository at the proper location
4. P4: Revert all unchanged files
5. P4: Delete all files not present anymore
6. P4: Add all new files
7. P4: Submit
In commands I have something like:
p4 edit //depot/...
mv /depot /depot.old; mv /depot.new /depot
p4 revert -a
***** problem *****
find /depot -type f | xargs -r p4 add
p4 submit
The problem is to identify the files to delete. Unfortunately p4 diff will
not tell me in a separate list, which files are not present anymore. Is
there any smart way to delete those files also in the depot? Currently I
skip the deletion step and process all reported and failed files manually
when submitting the change list (unlock, revert, delete). This is somewhat
tedious ...
Regards,
Jörg
_______________________________________________
perforce-user mailing list - perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
More information about the perforce-user
mailing list