git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Dangerous new server status for deleted files
@ 2010-01-20 20:16 Pal-Kristian Engstad
  2010-01-21  0:28 ` Johan Herland
  0 siblings, 1 reply; 2+ messages in thread
From: Pal-Kristian Engstad @ 2010-01-20 20:16 UTC (permalink / raw)
  To: Simon Hausmann; +Cc: Junio C Hamano, git

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

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.



[-- Attachment #2: 0001-git-p4-Fix-sync-errors-due-to-new-server-version.patch --]
[-- Type: text/plain, Size: 1079 bytes --]

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-21  0:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-20 20:16 Dangerous new server status for deleted files Pal-Kristian Engstad
2010-01-21  0:28 ` Johan Herland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).