threads / discuss / 22310

Dangerous new server status for deleted files

Subject: Dangerous new server status for deleted files

## tl;dr

2 messages between Jan 20, 2010 and Jan 21, 2010.

replies: 1people: 2as markdown or json

Pal-Kristian Engstad· Jan 20, 2010, 20:16 UTC · lore
Hi,

Our new Perforce server (P4D/NTX64/2009.2/228098 2009/12/16) seems to be giving out 'move/delete' instead of the old 'delete' status for files that are moved within the repo. Attached is the simple patch to fix it. (By the way: How do you "sign off" a patch?) This is urgent, as it will corrupt git repos trying to track a Perforce depot.

Thanks,
PKE.
-- 
Pål-Kristian Engstad (engstad@naughtydog.com), 
Lead Graphics & Engine Programmer,
Naughty Dog, Inc., 1601 Cloverfield Blvd, 6000 North,
Santa Monica, CA 90404, USA. Ph.: (310) 633-9112.

"Emacs would be a far better OS if it was shipped with 
 a halfway-decent text editor." -- Slashdot, Dec 13. 2005.




From bbc0cf2dbd318faaf5731b684d67c5b2126cb1e0 Mon Sep 17 00:00:00 2001
From: Pal-Kristian Engstad <pal_engstad@naughtydog.com>
Date: Wed, 20 Jan 2010 12:07:21 -0800
Subject: [PATCH] git-p4: Fix sync errors due to new server version.

New server P4D/NTX64/2009.2/228098 (2009/12/16) reports 'move/delete' instead of 'delete'. This causes files that are
moved to leave their old file in git. Fixed by adding the new status string.
---
 contrib/fast-import/git-p4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 6303449..ef7c23b 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1089,7 +1089,7 @@ class P4Sync(Command):
 
             if includeFile:
                 filesForCommit.append(f)
-                if f['action'] not in ('delete', 'purge'):
+                if f['action'] not in ('delete', 'move/delete', 'purge'):
                     filesToRead.append(f)
                 else:
                     filesToDelete.append(f)
-- 
1.6.5.2.6.gc3c1e.dirty
Johan Herland· Jan 21, 2010, 00:28 UTC · re: Pal-Kristian Engstad · lore

Re: Dangerous new server status for deleted files

On Wednesday 20 January 2010, Pal-Kristian Engstad wrote:
Show 5 quoted lines
> Our new Perforce server (P4D/NTX64/2009.2/228098 2009/12/16) seems to be
> giving out 'move/delete' instead of the old 'delete' status for files
> that are moved within the repo. Attached is the simple patch to fix it.
> (By the way: How do you "sign off" a patch?) This is urgent, as it will
> corrupt git repos trying to track a Perforce depot.
Hi, and welcome to the Git community.

The patch itself may be fine, but you should probably read Documentation/SubmittingPatches for hints on the customs of this list. For example: We prefer patches _inline_ in the mail, so that it's easier to review and comment on them. The Documentation/SubmittingPatches also explains what is meant by a sign-off, and how to sign-off your patches.

Have fun! :)
...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net

← back to recent threads