Changeset 12928 in josm for trunk/scripts
- Timestamp:
- 2017-10-06T15:17:51+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/since_xxx.py
r12789 r12928 6 6 7 7 Will retrieve the current revision number from the server. It runs over all 8 modified and added .java files and replaces xxx in " @since xxx" by the revision8 modified and added .java files and replaces xxx in "since xxx" by the revision 9 9 number that is to be expected for the next commit. 10 10 """ … … 26 26 with open(path, 'r') as f: 27 27 filedata = f.read() 28 filedata2 = re.sub(" @since xxx", lambda _: "@since {}".format(get_revision()), filedata)28 filedata2 = re.sub("since xxx", lambda _: "since {}".format(get_revision()), filedata) 29 29 if filedata != filedata2: 30 print("replacing ' @since xxx' with '@since {}' in '{}'".format(get_revision(), path))30 print("replacing 'since xxx' with 'since {}' in '{}'".format(get_revision(), path)) 31 31 with open(path, 'w') as f: 32 32 f.write(filedata2)
Note:
See TracChangeset
for help on using the changeset viewer.