##// END OF EJS Templates
convert: move localname state to function scope
David Soria Parra -
r30630:3830f880 default
parent child Browse files
Show More
@@ -64,7 +64,6 b' class p4_source(common.converter_source)'
64 64 self.encoding = self.ui.config('convert', 'p4.encoding',
65 65 default=convcmd.orig_encoding)
66 66 self.depotname = {} # mapping from local name to depot name
67 self.localname = {} # mapping from depot name to local name
68 67 self.re_type = re.compile(
69 68 "([a-z]+)?(text|binary|symlink|apple|resource|unicode|utf\d+)"
70 69 "(\+\w+)?$")
@@ -168,6 +167,7 b' class p4_source(common.converter_source)'
168 167 files = []
169 168 copies = {}
170 169 copiedfiles = []
170 localname = {}
171 171 i = 0
172 172 while ("depotFile%d" % i) in d and ("rev%d" % i) in d:
173 173 oldname = d["depotFile%d" % i]
@@ -181,7 +181,7 b' class p4_source(common.converter_source)'
181 181 self.depotname[filename] = oldname
182 182 if (d.get("action%d" % i) == "move/add"):
183 183 copiedfiles.append(filename)
184 self.localname[oldname] = filename
184 localname[oldname] = filename
185 185 i += 1
186 186
187 187 # Collect information about copied files
@@ -208,8 +208,8 b' class p4_source(common.converter_source)'
208 208 j += 1
209 209 i += 1
210 210
211 if copiedoldname and copiedoldname in self.localname:
212 copiedfilename = self.localname[copiedoldname]
211 if copiedoldname and copiedoldname in localname:
212 copiedfilename = localname[copiedoldname]
213 213 break
214 214
215 215 if copiedfilename:
General Comments 0
You need to be logged in to leave comments. Login now