14 messages in com.perforce.perforce-user[p4] Forcing sync on missing files only| From | Sent On | Attachments |
|---|---|---|
| Edward Tsai | 05 Sep 2003 15:16 | |
| Robert Cowham | 08 Sep 2003 03:21 | |
| Bob Arnson | 08 Sep 2003 04:59 | |
| Robert Cowham | 08 Sep 2003 05:33 | |
| Alen Ladavac | 08 Sep 2003 06:37 | |
| Jeff Bowles | 08 Sep 2003 07:03 | |
| Alen Ladavac | 08 Sep 2003 07:09 | |
| Grills, Jeff | 08 Sep 2003 08:21 | |
| Edward Tsai | 08 Sep 2003 10:10 | |
| Alen Ladavac | 08 Sep 2003 10:31 | |
| Jason Williams | 08 Sep 2003 10:37 | |
| Robert Cowham | 08 Sep 2003 10:49 | |
| Stephen Vance | 08 Sep 2003 20:21 | |
| Jeff Bowles | 09 Sep 2003 11:13 |
| Subject: | [p4] Forcing sync on missing files only![]() |
|---|---|
| From: | Alen Ladavac (al...@croteam.com) |
| Date: | 09/08/2003 10:31:37 AM |
| List: | com.perforce.perforce-user |
From: "Jeff Bowles" <jab at pobox.com>
I'd just do a "p4 diff -sd" to see what's missing, and then sync those. ("p4 diff -sd | p4 -x - sync -f" is the exact sequence on a system that supports pipes.)
That's the first step: make sure you're in sync with what the server thinks you have. (Honestly, this only took care of accidently deleted files. "p4 diff -se" will show the hacked files.)
Then "p4 sync @12345" will make sure your workspace has specific versions, transferring the minimum number of modifications to make that happen.
Hm, this might work ok. But it has one problem: if @12345 is very far away from
#head, then it would
bring everything to #head, then refresh deleted files, then go back to @12345.
If there are a lot of
moved files in between, it is a lot of traffic for nothing.
(I would strongly recommend putting some powerful scripting language on your machine - the NT command interpreter isn't enough. A Unix shell clone is a start; Perl/Python/Ruby will be more powerful for string operations, and it's a religious discussion as to which is "more useful". I won't start that discussion, here.)
Of course. I use lua. :)
ps. For anyone "sync -f" operation, it's best if you make sure that you have nothing opened ("p4 edit/delete/add") or at least look ("p4 opened") before starting. It can get a litte weird if you "p4 sync -f" a file you have opened for edit - you might accidently request it to trash the edits you just made.
That's not needed. From cmdref.pdf:
-f Force the sync. Perforce performs the sync even if the client workspace already has the file at the specified revision, and even if the file is not writable. This flag does not affect open files, but it does override the noclobber client option.
Thanks for the suggestions, Alen




