diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py +++ b/hgext/largefiles/lfcommands.py @@ -435,8 +435,14 @@ def downloadlfiles(ui, repo, rev=None): ui.status(_("%d largefiles failed to download\n") % totalmissing) return totalsuccess, totalmissing -def updatelfiles(ui, repo, filelist=None, printmessage=True, +def updatelfiles(ui, repo, filelist=None, printmessage=None, normallookup=False): + '''Update largefiles according to standins in the working directory + + If ``printmessage`` is other than ``None``, it means "print (or + ignore, for false) message forcibly". + ''' + statuswriter = lfutil.getstatuswriter(ui, repo, printmessage) wlock = repo.wlock() try: lfdirstate = lfutil.openlfdirstate(ui, repo) @@ -482,8 +488,7 @@ def updatelfiles(ui, repo, filelist=None lfdirstate.write() if lfiles: - if printmessage: - ui.status(_('getting changed largefiles\n')) + statuswriter(_('getting changed largefiles\n')) cachelfiles(ui, repo, None, lfiles) for lfile in lfiles: @@ -527,8 +532,8 @@ def updatelfiles(ui, repo, filelist=None lfutil.synclfdirstate(repo, lfdirstate, lfile, True) lfdirstate.write() - if printmessage and lfiles: - ui.status(_('%d largefiles updated, %d removed\n') % (updated, + if lfiles: + statuswriter(_('%d largefiles updated, %d removed\n') % (updated, removed)) finally: wlock.release() diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -1279,9 +1279,11 @@ def mergeupdate(orig, repo, node, branch newstandins = lfutil.getstandinsstate(repo) filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) - # suppress status message while automated committing - printmessage = not (getattr(repo, "_isrebasing", False) or - getattr(repo, "_istransplanting", False)) + printmessage = None + if (getattr(repo, "_isrebasing", False) or + getattr(repo, "_istransplanting", False)): + # suppress status message while automated committing + printmessage = False lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, printmessage=printmessage, normallookup=partial)