Mercurial > hg4j
comparison test/org/tmatesoft/hg/test/ExecHelper.java @ 388:b015f3918120
Work on FIXME: correct HgDataFile#workingCopy with tests; BasicSessionContext with property override; platform-specific options to internals
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 15 Feb 2012 22:57:56 +0100 |
parents | 66fd2c73c56f |
children | 7f27122011c3 |
comparison
equal
deleted
inserted
replaced
387:cdea37239b01 | 388:b015f3918120 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2011 TMate Software Ltd | 2 * Copyright (c) 2011-2012 TMate Software Ltd |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or modify | 4 * This program is free software; you can redistribute it and/or modify |
5 * it under the terms of the GNU General Public License as published by | 5 * it under the terms of the GNU General Public License as published by |
6 * the Free Software Foundation; version 2 of the License. | 6 * the Free Software Foundation; version 2 of the License. |
7 * | 7 * |
48 while (st.hasMoreTokens()) { | 48 while (st.hasMoreTokens()) { |
49 File pe = new File(st.nextToken()); | 49 File pe = new File(st.nextToken()); |
50 if (new File(pe, cmd[0] + ".exe").exists()) { | 50 if (new File(pe, cmd[0] + ".exe").exists()) { |
51 break; | 51 break; |
52 } | 52 } |
53 // PATHEXT controls precedence of .exe, .bat and .cmd files, ususlly .exe wins | 53 // PATHEXT controls precedence of .exe, .bat and .cmd files, usually .exe wins |
54 if (new File(pe, cmd[0] + ".bat").exists() || new File(pe, cmd[0] + ".cmd").exists()) { | 54 if (new File(pe, cmd[0] + ".bat").exists() || new File(pe, cmd[0] + ".cmd").exists()) { |
55 ArrayList<String> command = new ArrayList<String>(); | 55 ArrayList<String> command = new ArrayList<String>(); |
56 command.add("cmd.exe"); | 56 command.add("cmd.exe"); |
57 command.add("/C"); | 57 command.add("/C"); |
58 command.addAll(Arrays.asList(cmd)); | 58 command.addAll(Arrays.asList(cmd)); |