# Dangerous new server status for deleted files

2 messages from 2010-01-20 to 2010-01-21. Participants: Pal-Kristian Engstad, Johan Herland.
Thread: https://gitlist.dev/t/22310

## Pal-Kristian Engstad, 2010-01-20 20:16

Subject: Dangerous new server status for deleted files
Message-ID: <4B5764A6.30504@naughtydog.com>
URL: https://gitlist.dev/e/4B5764A6.30504%40naughtydog.com

```
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, 2010-01-21 00:28

Subject: Re: Dangerous new server status for deleted files
Message-ID: <201001210128.13772.johan@herland.net>
URL: https://gitlist.dev/e/201001210128.13772.johan%40herland.net
In-Reply-To: <4B5764A6.30504@naughtydog.com>

```
On Wednesday 20 January 2010, Pal-Kristian Engstad wrote:
> 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

```
