##// 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 ui.status(_("%d largefiles failed to download\n") % totalmissing)
435 ui.status(_("%d largefiles failed to download\n") % totalmissing)
436 return totalsuccess, totalmissing
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 normallookup=False):
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 wlock = repo.wlock()
446 wlock = repo.wlock()
441 try:
447 try:
442 lfdirstate = lfutil.openlfdirstate(ui, repo)
448 lfdirstate = lfutil.openlfdirstate(ui, repo)
@@ -482,8 +488,7 b' def updatelfiles(ui, repo, filelist=None'
482 lfdirstate.write()
488 lfdirstate.write()
483
489
484 if lfiles:
490 if lfiles:
485 if printmessage:
491 statuswriter(_('getting changed largefiles\n'))
486 ui.status(_('getting changed largefiles\n'))
487 cachelfiles(ui, repo, None, lfiles)
492 cachelfiles(ui, repo, None, lfiles)
488
493
489 for lfile in lfiles:
494 for lfile in lfiles:
@@ -527,8 +532,8 b' def updatelfiles(ui, repo, filelist=None'
527 lfutil.synclfdirstate(repo, lfdirstate, lfile, True)
532 lfutil.synclfdirstate(repo, lfdirstate, lfile, True)
528
533
529 lfdirstate.write()
534 lfdirstate.write()
530 if printmessage and lfiles:
535 if lfiles:
531 ui.status(_('%d largefiles updated, %d removed\n') % (updated,
536 statuswriter(_('%d largefiles updated, %d removed\n') % (updated,
532 removed))
537 removed))
533 finally:
538 finally:
534 wlock.release()
539 wlock.release()
@@ -1279,9 +1279,11 b' def mergeupdate(orig, repo, node, branch'
1279 newstandins = lfutil.getstandinsstate(repo)
1279 newstandins = lfutil.getstandinsstate(repo)
1280 filelist = lfutil.getlfilestoupdate(oldstandins, newstandins)
1280 filelist = lfutil.getlfilestoupdate(oldstandins, newstandins)
1281
1281
1282 # suppress status message while automated committing
1282 printmessage = None
1283 printmessage = not (getattr(repo, "_isrebasing", False) or
1283 if (getattr(repo, "_isrebasing", False) or
1284 getattr(repo, "_istransplanting", False))
1284 getattr(repo, "_istransplanting", False)):
1285 # suppress status message while automated committing
1286 printmessage = False
1285 lfcommands.updatelfiles(repo.ui, repo, filelist=filelist,
1287 lfcommands.updatelfiles(repo.ui, repo, filelist=filelist,
1286 printmessage=printmessage,
1288 printmessage=printmessage,
1287 normallookup=partial)
1289 normallookup=partial)
General Comments 0
You need to be logged in to leave comments. Login now