All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pal-Kristian Engstad <pal_engstad@naughtydog.com>
To: Simon Hausmann <simon@lst.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Dangerous new server status for deleted files
Date: Wed, 20 Jan 2010 12:16:38 -0800	[thread overview]
Message-ID: <4B5764A6.30504@naughtydog.com> (raw)

[-- 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


             reply	other threads:[~2010-01-20 20:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-20 20:16 Pal-Kristian Engstad [this message]
2010-01-21  0:28 ` Dangerous new server status for deleted files Johan Herland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B5764A6.30504@naughtydog.com \
    --to=pal_engstad@naughtydog.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=simon@lst.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.