Patchwork convert: handle deleted files when converting from Perforce (issue4743)

login
register
mail settings
Submitter Eugene Baranov
Date July 6, 2015, 10 a.m.
Message ID <CAPEtdqxPrMGh5-Thx6jLVLkjy8WBt5=_qzQN5mVXRWNS+mEdbA@mail.gmail.com>
Download mbox | patch
Permalink /patch/9894/
State Superseded
Commit 501c51d607922692bd6654cb3c24d9f1e31d7450
Headers show

Comments

Eugene Baranov - July 6, 2015, 10 a.m.
# HG changeset patch
# User Eugene Baranov <eug.baranov@gmail.com>
# Date 1435943458 -3600
#      Fri Jul 03 18:10:58 2015 +0100
# Branch stable
# Node ID b3db00879bbc85d1946d49c5df7832578efeb86e
# Parent  6047b60cdd0984b60191bdb3b272d87c2691ffe4
convert: handle deleted files when converting from Perforce (issue4743)

Patch

diff --git a/hgext/convert/p4.py b/hgext/convert/p4.py
--- a/hgext/convert/p4.py
+++ b/hgext/convert/p4.py
@@ -164,7 +164,8 @@ 
                 raise IOError(d["generic"], data)

             elif code == "stat":
-                if d.get("action") == "purge":
+                action = d.get("action")
+                if action in ["purge", "delete", "move/delete"]:
                     return None, None
                 p4type = self.re_type.match(d["type"])
                 if p4type: