blob: 71ac31b0d0b7746b3538f1384ec62891ae02d8a9 [file] [log] [blame]
niklase@google.com47bdc462011-05-30 11:42:35 +00001import os
2import filemanagement
3
4# checks out entire p4 repository
5def checkoutallfiles():
6 os.system('p4 edit //depotGoogle/...')
7 return
8
9# reverts all unchanged files, this is completely innoculus
10def revertunchangedfiles():
11 os.system('p4 revert -a //depotGoogle/...')
12 return
13
14def integratefile( old_name, new_name):
15 if(old_name == new_name):
16 return
17 if(not filemanagement.fileexist(old_name)):
18 return
19 integrate_command = 'p4 integrate -o -f ' +\
20 old_name +\
21 ' ' +\
22 new_name +\
23 ' > p4summary.txt 2> error.txt'
24 os.system(integrate_command)
25 #print integrate_command
26 delete_command = 'p4 delete -c default ' +\
27 old_name +\
28 ' > p4summary.txt 2> error.txt'
29 os.system(delete_command)
30 #print delete_command
31 return