##// END OF EJS Templates
largefiles: get function to write status messages via "getstatuswriter()"...
FUJIWARA Katsunori -
r23189:fb139f55 default
parent child Browse files
Show More
@@ -435,8 +435,14 b' def downloadlfiles(ui, repo, rev=None):'
435 435 ui.status(_("%d largefiles failed to download\n") % totalmissing)
436 436 return totalsuccess, totalmissing
437 437
438 def updatelfiles(ui, repo, filelist=None, printmessage=True,
438 def updatelfiles(ui, repo, filelist=None, printmessage=None,
439 439 normallookup=False):
440 '''Update largefiles according to standins in the working directory
441
442 If ``printmessage`` is other than ``None``, it means "print (or
443 ignore, for false) message forcibly".
444 '''
445 statuswriter = lfutil.getstatuswriter(ui, repo, printmessage)
440 446 wlock = repo.wlock()
441 447 try:
442 448 lfdirstate = lfutil.openlfdirstate(ui, repo)
@@ -482,8 +488,7 b' def updatelfiles(ui, repo, filelist=None'
482 488 lfdirstate.write()
483 489
484 490 if lfiles:
485 if printmessage:
486 ui.status(_('getting changed largefiles\n'))
491 statuswriter(_('getting changed largefiles\n'))
487 492 cachelfiles(ui, repo, None, lfiles)
488 493
489 494 for lfile in lfiles:
@@ -527,8 +532,8 b' def updatelfiles(ui, repo, filelist=None'
527 532 lfutil.synclfdirstate(repo, lfdirstate, lfile, True)
528 533
529 534 lfdirstate.write()
530 if printmessage and lfiles:
531 ui.status(_('%d largefiles updated, %d removed\n') % (updated,
535 if lfiles:
536 statuswriter(_('%d largefiles updated, %d removed\n') % (updated,
532 537 removed))
533 538 finally:
534 539 wlock.release()
@@ -1279,9 +1279,11 b' def mergeupdate(orig, repo, node, branch'
1279 1279 newstandins = lfutil.getstandinsstate(repo)
1280 1280 filelist = lfutil.getlfilestoupdate(oldstandins, newstandins)
1281 1281
1282 # suppress status message while automated committing
1283 printmessage = not (getattr(repo, "_isrebasing", False) or
1284 getattr(repo, "_istransplanting", False))
1282 printmessage = None
1283 if (getattr(repo, "_isrebasing", False) or
1284 getattr(repo, "_istransplanting", False)):
1285 # suppress status message while automated committing
1286 printmessage = False
1285 1287 lfcommands.updatelfiles(repo.ui, repo, filelist=filelist,
1286 1288 printmessage=printmessage,
1287 1289 normallookup=partial)
General Comments 0
You need to be logged in to leave comments. Login now