# HG changeset patch # User Mads Kiilerich # Date 2014-08-25 01:27:51 # Node ID 754f208ce21d54df69b3bd0481adc832c8dcbb5e # Parent a970a5c15b439808ebab469dce9aa3a6706ebc80 convert: p4: ignore purged files with p4d 2012.2 and later Perforce has the concept of "+Sn" files where only the last revisions of the file is stored. In p4d 2012.1 old purged revisions were not included in the "manifest". With 2012.2 they started being included and convert's getfile failed to recognize the "purged" flag and saw it as an empty file. That made test-convert-p4-filetypes.t fail. There is no point in storing an empty file as placeholder for a purged file so we restore the old behaviour by checking the flag and letting getfile consider purged files deleted. (It is questionable whether it makes sense to convert not-yet-purged +S files to mercurial ... but that is another question.) diff --git a/hgext/convert/p4.py b/hgext/convert/p4.py --- a/hgext/convert/p4.py +++ b/hgext/convert/p4.py @@ -164,6 +164,8 @@ class p4_source(converter_source): raise IOError(d["generic"], data) elif code == "stat": + if d.get("action") == "purge": + return None, None p4type = self.re_type.match(d["type"]) if p4type: mode = ""