@@ -1574,7 +1574,7 @@ def fixFileTypes(self, fileRevs, openedFiles):
15741574 if "can't change +l type with reopen; use revert -k and then edit -t to change type." in str (result ):
15751575 self .logger .warning (f"Issue identified with file { ofile ['depotFile' ]} suggesting to use 'revert -k' and type change." )
15761576 self .p4cmd ('revert' , '-k' , ofile ['depotFile' ])
1577- self .p4cmd ('add' , '-t ' , chRev .type , ofile ['depotFile' ])
1577+ self .p4cmd ('add' , '-ft ' , chRev .type , ofile ['depotFile' ])
15781578 self .p4cmd ('edit' , '-t' , chRev .type , ofile ['depotFile' ])
15791579 else :
15801580 self .p4cmd ('reopen' , '-t' , chRev .type , ofile ['depotFile' ])
@@ -1658,7 +1658,7 @@ def replicateFirstChange(self, sourcePort):
16581658 """Replicate first change when historical start specified"""
16591659
16601660 newChangeId = None
1661- openedFiles = self .p4cmd ('reconcile' , '-mead ' , '//%s/...' % self .p4 .client )
1661+ openedFiles = self .p4cmd ('reconcile' , '-meadf ' , '//%s/...' % self .p4 .client )
16621662 lenOpenedFiles = len (openedFiles )
16631663 if lenOpenedFiles > 0 :
16641664 description = self .formatChangeDescription (
@@ -1854,7 +1854,7 @@ def replicateBranch(self, file, dirty=False):
18541854 else :
18551855 # "add from" is rather an odd beast - recreate as move after back out of delete
18561856 self .p4cmd ('sync' , file .localIntegSyncSource (ind ))
1857- self .p4cmd ('add' , file .getIntegration (ind ).localFile )
1857+ self .p4cmd ('add' , '-f' , file .getIntegration (ind ).localFile )
18581858 makeWritable (file .fixedLocalFile )
18591859 os .remove (file .fixedLocalFile )
18601860 self .p4cmd ('move' , file .getIntegration (ind ).localFile , file .fixedLocalFile )
@@ -1869,7 +1869,7 @@ def replicateBranch(self, file, dirty=False):
18691869 self .p4cmd ('undo' , "%s#%d" % (file .localFile , file ._integrations [ind ].erev + 1 ))
18701870 if diskFileContentModified (file ):
18711871 if file .action == 'add' :
1872- self .p4cmd ('add' , file .localFile )
1872+ self .p4cmd ('add' , '-f' , file .localFile )
18731873 else :
18741874 self .p4cmd ('edit' , file .localFile )
18751875 self .src .p4cmd ('sync' , '-f' , file .localFileRev ())
@@ -1885,7 +1885,7 @@ def replicateBranch(self, file, dirty=False):
18851885 afterAdd = True # This will fire further integrations
18861886 if outputDict and 'action' in outputDict and outputDict ['action' ] == 'delete' :
18871887 self .p4cmd ('resolve' , '-at' , file .localFile )
1888- self .p4cmd ('add' , file .localFile )
1888+ self .p4cmd ('add' , '-f' , file .localFile )
18891889 edited = True
18901890 added = True
18911891 if dirty and not edited :
@@ -2121,7 +2121,7 @@ def actionResolve(self, mergeInfo):
21212121 self .src .p4cmd ('sync' , '-f' , file .localFileRev ())
21222122 # if afterAdd:
21232123 # self.logger.debug('Redoing add to avoid problems after forced integrate')
2124- # self.p4cmd('add', '-d', file.localFile)
2124+ # self.p4cmd('add', '-f', '- d', file.localFile)
21252125 elif integ .how == 'ignored' :
21262126 self .logger .debug ('processing:0330 ignored' )
21272127 if 'action' in integResult and integResult ['action' ] == 'delete' :
@@ -2156,7 +2156,7 @@ def actionResolve(self, mergeInfo):
21562156 editedFrom = True
21572157 if afterAdd :
21582158 self .logger .debug ('Redoing add to avoid problems after forced integrate' )
2159- self .p4cmd ('add' , '-d' , file .localFile )
2159+ self .p4cmd ('add' , '-f' , '- d' , file .localFile )
21602160 elif self .re_resolve_tampered .search (str (resolve_result )):
21612161 self .p4cmd ('edit' , file .localFile )
21622162 self .src .p4cmd ('sync' , '-f' , file .localFileRev ())
@@ -2171,7 +2171,7 @@ def actionResolve(self, mergeInfo):
21712171 self .editFrom (file , self .currentFileContent )
21722172 if afterAdd :
21732173 self .logger .debug ('Redoing add to avoid problems after forced integrate' )
2174- self .p4cmd ('add' , '-d' , file .localFile )
2174+ self .p4cmd ('add' , '-f' , '- d' , file .localFile )
21752175 elif integ .how == 'branch from' :
21762176 self .logger .debug ('processing:0355 branch from - interactive -at' )
21772177 self .p4 .run_resolve (resolver = EditAcceptTheirs ())
@@ -2198,7 +2198,7 @@ def actionResolve(self, mergeInfo):
21982198 else :
21992199 self .p4cmd ('edit' , '-t' , file .type , file .localFile )
22002200 if self .p4 .warnings and self .re_file_not_on_client .search ("\n " .join (self .p4 .warnings )):
2201- self .p4cmd ('add' , file .localFile )
2201+ self .p4cmd ('add' , '-f' , file .localFile )
22022202 self .logger .debug ('processing:0376 %s turned into historical %s' % (file .action , newAction ))
22032203 if diskFileContentModified (file ):
22042204 self .src .p4cmd ('sync' , '-f' , file .localFileRev ())
0 commit comments