Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F108885
Convert_bug_numbers_to_Phabricator_ticket_numbers
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Krenair
Apr 4 2015, 8:37 PM
2015-04-04 20:37:21 (UTC+0)
Size
371 B
Referenced Files
None
Subscribers
None
Convert_bug_numbers_to_Phabricator_ticket_numbers
View Options
import glob, os, re
for fileName in glob.glob('*.php'):
outFile = open(fileName + '.out', 'w')
for line in open(fileName).read().splitlines():
matches = re.findall(r'Bug (\d+)', line)
if matches:
line = line.replace('Bug ' + matches[0], 'Bug T' + str(int(matches[0]) + 2000))
outFile.write(line + "\n")
outFile.close()
os.rename(fileName + '.out', fileName)
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
105671
Default Alt Text
Convert_bug_numbers_to_Phabricator_ticket_numbers (371 B)
Attached To
Mode
P476 Convert bug numbers to Phabricator ticket numbers
Attached
Detach File
Event Timeline
Log In to Comment