From f4311e2faebde14260111926cd06759f55ef1fcc Mon Sep 17 00:00:00 2001 From: LexManos Date: Tue, 16 Jul 2013 14:34:43 -0700 Subject: [PATCH] Stupid spaces and windows escaping -.- --- fml/commands.patch | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/fml/commands.patch b/fml/commands.patch index ac8a2afc7..3cf59aa3c 100644 --- a/fml/commands.patch +++ b/fml/commands.patch @@ -29,7 +29,7 @@ if not os.path.exists(os.path.join(binlk[side], os.path.normpath(testlk[side] + '.class'))): return False return True -@@ -1281,23 +1285,31 @@ +@@ -1281,23 +1285,34 @@ pathbinlk = {CLIENT: self.binclient, SERVER: self.binserver} pathsrclk = {CLIENT: self.srcclient, SERVER: self.srcserver} pathlog = {CLIENT: self.clientrecomplog, SERVER: self.serverrecomplog} @@ -57,13 +57,16 @@ - dirs = ' '.join(pkglistscala) + f = NamedTemporaryFile(mode='wb', suffix='.txt', prefix ='scala_src_path_', delete=False) #FML: We write to a temporary file just in case the command is to long + for line in pkglistscala: -+ f.write('"%s"\n' % os.path.abspath(line)) ++ if os.sep == '\\': ++ f.write('"%s"\n' % os.path.abspath(line).replace(os.sep, os.sep + os.sep)) ++ else: ++ f.write('"%s"\n' % os.path.abspath(line)) + f.close() + dirs = '@"%s"' % f.name classpath = os.pathsep.join(cplk[side]) forkcmd = self.cmdrecompscala.format(classpath=classpath, sourcepath=pathsrclk[side], outpath=pathbinlk[side], pkgs=dirs) try: -@@ -1317,7 +1329,12 @@ +@@ -1317,7 +1332,15 @@ self.logger.error('================================') self.logger.error('') raise @@ -71,13 +74,16 @@ + os.unlink(f.name) + f = NamedTemporaryFile(mode='wb', suffix='.txt', prefix ='java_src_path_', delete=False) #FML: We write to a temporary file just in case the command is to long + for line in pkglist: -+ f.write('"%s"\n' % os.path.abspath(line)) ++ if os.sep == '\\': ++ f.write('"%s"\n' % os.path.abspath(line).replace('\\', '\\\\')) ++ else: ++ f.write('"%s"\n' % os.path.abspath(line)) + f.close() + dirs = '@"%s"' % f.name classpath = os.pathsep.join(cplk[side]) forkcmd = self.cmdrecomp.format(classpath=classpath, sourcepath=pathsrclk[side], outpath=pathbinlk[side], pkgs=dirs) -@@ -1336,9 +1353,10 @@ +@@ -1336,9 +1359,10 @@ self.logger.error('==================') self.logger.error('') raise @@ -89,7 +95,7 @@ classpath = [os.path.join('..', p) for p in classpath] classpath = os.pathsep.join(classpath) os.chdir(self.dirjars) -@@ -1703,7 +1721,7 @@ +@@ -1703,7 +1727,7 @@ self.runcmd(forkcmd) return True @@ -98,7 +104,7 @@ if not reobf: md5lk = {CLIENT: self.md5client, SERVER: self.md5server} else: -@@ -1718,6 +1736,9 @@ +@@ -1718,6 +1742,9 @@ class_path = '' else: class_path += '/' @@ -108,7 +114,7 @@ for class_file in fnmatch.filter(filelist, '*.class'): class_name = class_path + os.path.splitext(class_file)[0] bin_file = os.path.normpath(os.path.join(path, class_file)) -@@ -1890,6 +1911,9 @@ +@@ -1890,6 +1917,9 @@ sys.exit(1) for entry in newfiles: @@ -118,7 +124,7 @@ if entry[3] == 'U': self.logger.info('Retrieving file from server : %s', entry[0]) cur_file = os.path.normpath(entry[0]) -@@ -1910,6 +1934,9 @@ +@@ -1910,6 +1940,9 @@ md5reoblk = {CLIENT: self.md5reobfclient, SERVER: self.md5reobfserver} outpathlk = {CLIENT: self.srcmodclient, SERVER: self.srcmodserver} src = {CLIENT: self.srcclient, SERVER: self.srcserver}