Fixed bug in p4SyncMissingFiles.py. Also fixed bug in p4Helper when
running p4RemoveUnversioned.py.
This commit is contained in:
parent
c32c0bfbd1
commit
ea14f96d76
2 changed files with 36 additions and 27 deletions
|
@ -44,23 +44,25 @@ class P4SyncMissing:
|
|||
def shutdown( data ):
|
||||
return False
|
||||
def sync( files ):
|
||||
files_flat = ' '.join(files)
|
||||
#subprocess.check_output( "p4 sync -f " + files_flat + "", shell=False, cwd=None )
|
||||
files_flat = ' '.join('"' + f + '"' for f in files)
|
||||
ret = -1
|
||||
count = 0
|
||||
while ret != 0 and count < 2:
|
||||
ret = try_call_process( "p4 sync -f " + files_flat )
|
||||
count += 1
|
||||
if ret != 0 and not options.quiet:
|
||||
c.write("Failed, trying again to sync " + files_flat)
|
||||
|
||||
|
||||
if not options.quiet:
|
||||
files_len = len(files)
|
||||
if files_len > 1:
|
||||
c.write( " Synced batch of " + str(len(files)) )
|
||||
for f in files:
|
||||
c.write( " Synced " + os.path.relpath( f, directory ) )
|
||||
#if ret != 0 and not options.quiet:
|
||||
# c.write("Failed, trying again to sync " + files_flat)
|
||||
if ret != 0:
|
||||
pass
|
||||
#if not options.quiet:
|
||||
# c.write("Failed to sync " + files_flat)
|
||||
else:
|
||||
if not options.quiet:
|
||||
files_len = len(files)
|
||||
if files_len > 1:
|
||||
c.write( " Synced batch of " + str(len(files)) )
|
||||
for f in files:
|
||||
c.write( " Synced " + os.path.relpath( f, directory ) )
|
||||
return True
|
||||
|
||||
commands = {
|
||||
|
@ -116,7 +118,7 @@ class P4SyncMissing:
|
|||
|
||||
self.buckets = {}
|
||||
self.buckets[file_type_text] = Bucket(10)
|
||||
self.buckets[file_type_binary] = Bucket(2)
|
||||
self.buckets[file_type_binary] = Bucket(1)
|
||||
|
||||
def push_queued(bucket):
|
||||
if bucket.queue_size == 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue