Patchwork convert: Perforce sometimes mixes the case resulting in file being ignored

login
register
mail settings
Submitter Eugene Baranov
Date July 13, 2015, 2:05 p.m.
Message ID <4d725dde1e7a8675c259.1436796353@ADNADTX6400256.eng.citrite.net>
Download mbox | patch
Permalink /patch/9963/
State Accepted
Headers show

Comments

Eugene Baranov - July 13, 2015, 2:05 p.m.
# HG changeset patch
# User Eugene Baranov <eug.baranov@gmail.com>
# Date 1436796303 -3600
#      Mon Jul 13 15:05:03 2015 +0100
# Node ID 4d725dde1e7a8675c259e3597bd4a9adaaee2022
# Parent  f346506462419f4b1311c9be731954e253815c70
convert: Perforce sometimes mixes the case resulting in file being ignored
Matt Mackall - July 13, 2015, 7:53 p.m.
On Mon, 2015-07-13 at 15:05 +0100, Eugene Baranov wrote:
> # HG changeset patch
> # User Eugene Baranov <eug.baranov@gmail.com>
> # Date 1436796303 -3600
> #      Mon Jul 13 15:05:03 2015 +0100
> # Node ID 4d725dde1e7a8675c259e3597bd4a9adaaee2022
> # Parent  f346506462419f4b1311c9be731954e253815c70
> convert: Perforce sometimes mixes the case resulting in file being ignored

I guess I have to take your word for it since p4 users are pretty scarce
around here. I've committed it with a summary that reflects the change
rather than the problem:

convert: ignore case changes in vieworder for Perforce

Perforce sometimes mixes the case resulting in files being ignored.

Patch

diff -r f34650646241 -r 4d725dde1e7a hgext/convert/p4.py
--- a/hgext/convert/p4.py	Wed Jul 08 18:11:40 2015 +0100
+++ b/hgext/convert/p4.py	Mon Jul 13 15:05:03 2015 +0100
@@ -137,7 +137,7 @@ 
                 oldname = d["depotFile%d" % i]
                 filename = None
                 for v in vieworder:
-                    if oldname.startswith(v):
+                    if oldname.lower().startswith(v.lower()):
                         filename = views[v] + oldname[len(v):]
                         break
                 if filename: