Mercurial > hg
comparison hgext/largefiles/overrides.py @ 23190:383ff455cab8
largefiles: avoid printing messages while rebasing by "_lfstatuswriters"
Putting "lambda *msg, **opts: None" (= avoid printing messages always)
into "_lfstatuswriters" while rebasing makes explicit passing
"printmessage = False" for "updatelfiles()" useless.
This patch also removes setting/unsetting "repo._isrebasing" in
"overriderebase", because there is no code path referring it.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 05 Nov 2014 23:24:47 +0900 |
parents | fb139f5553d6 |
children | 236c978bceca |
comparison
equal
deleted
inserted
replaced
23189:fb139f5553d6 | 23190:383ff455cab8 |
---|---|
790 return result | 790 return result |
791 | 791 |
792 def overriderebase(orig, ui, repo, **opts): | 792 def overriderebase(orig, ui, repo, **opts): |
793 resuming = opts.get('continue') | 793 resuming = opts.get('continue') |
794 repo._lfcommithooks.append(lfutil.automatedcommithook(resuming)) | 794 repo._lfcommithooks.append(lfutil.automatedcommithook(resuming)) |
795 repo._isrebasing = True | 795 repo._lfstatuswriters.append(lambda *msg, **opts: None) |
796 try: | 796 try: |
797 return orig(ui, repo, **opts) | 797 return orig(ui, repo, **opts) |
798 finally: | 798 finally: |
799 repo._isrebasing = False | 799 repo._lfstatuswriters.pop() |
800 repo._lfcommithooks.pop() | 800 repo._lfcommithooks.pop() |
801 | 801 |
802 def overridearchive(orig, repo, dest, node, kind, decode=True, matchfn=None, | 802 def overridearchive(orig, repo, dest, node, kind, decode=True, matchfn=None, |
803 prefix=None, mtime=None, subrepos=None): | 803 prefix=None, mtime=None, subrepos=None): |
804 # No need to lock because we are only reading history and | 804 # No need to lock because we are only reading history and |
1278 if linearmerge: | 1278 if linearmerge: |
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 printmessage = None | 1282 printmessage = None |
1283 if (getattr(repo, "_isrebasing", False) or | 1283 if getattr(repo, "_istransplanting", False): |
1284 getattr(repo, "_istransplanting", False)): | |
1285 # suppress status message while automated committing | 1284 # suppress status message while automated committing |
1286 printmessage = False | 1285 printmessage = False |
1287 lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, | 1286 lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, |
1288 printmessage=printmessage, | 1287 printmessage=printmessage, |
1289 normallookup=partial) | 1288 normallookup=partial) |