Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
port in everything from 1.6 but labotimizetools(will do that later th…
…is weekend)
- Loading branch information
Showing
21 changed files
with
8,806 additions
and
131 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
| ||
import sys, os, csv | ||
|
||
myDir = os.path.dirname(sys.argv[0]) | ||
|
||
srg = {} | ||
|
||
for fn in ["fields.csv", "methods.csv"]: | ||
fn = os.path.join(myDir, fn) | ||
reader = csv.DictReader(open(fn)) | ||
for entry in reader: | ||
srg[entry["searge"]] = entry["name"] | ||
|
||
|
||
def handleFile(filename): | ||
if not filename.endswith(".java"): | ||
print filename, ": not a java source file?" | ||
return | ||
contents = open(filename).read() | ||
count = 0 | ||
for k,v in srg.iteritems(): | ||
if k not in contents: continue | ||
if count == 0: | ||
print filename, ": ", | ||
count += 1 | ||
print k + "->" + v, | ||
contents = contents.replace(k, v) | ||
if count: print | ||
open(filename, 'w').write(contents) | ||
pass | ||
|
||
|
||
for arg in sys.argv[1:]: | ||
if os.path.isdir(arg): | ||
for dirpath, dirnames, filenames in os.walk(arg): | ||
for fn in filenames: | ||
handleFile(os.path.join(dirpath, fn)) | ||
else: | ||
handleFile(arg) | ||
|
||
print "Use git add -e" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
What?