Show More
@@ -557,3 +557,20 b' class automatedcommithook(object):' | |||||
557 | return updatestandinsbymatch(repo, match) |
|
557 | return updatestandinsbymatch(repo, match) | |
558 | else: |
|
558 | else: | |
559 | return match |
|
559 | return match | |
|
560 | ||||
|
561 | def getstatuswriter(ui, repo, forcibly=None): | |||
|
562 | '''Return the function to write largefiles specific status out | |||
|
563 | ||||
|
564 | If ``forcibly`` is ``None``, this returns the last element of | |||
|
565 | ``repo._lfupdatereporters`` as "default" writer function. | |||
|
566 | ||||
|
567 | Otherwise, this returns the function to always write out (or | |||
|
568 | ignore if ``not forcibly``) status. | |||
|
569 | ''' | |||
|
570 | if forcibly is None: | |||
|
571 | return repo._lfstatuswriters[-1] | |||
|
572 | else: | |||
|
573 | if forcibly: | |||
|
574 | return ui.status # forcibly WRITE OUT | |||
|
575 | else: | |||
|
576 | return lambda *msg, **opts: None # forcibly IGNORE |
@@ -343,6 +343,11 b' def reposetup(ui, repo):' | |||||
343 | # only last element ("_lfcommithooks[-1]") is used for each committing. |
|
343 | # only last element ("_lfcommithooks[-1]") is used for each committing. | |
344 | repo._lfcommithooks = [lfutil.updatestandinsbymatch] |
|
344 | repo._lfcommithooks = [lfutil.updatestandinsbymatch] | |
345 |
|
345 | |||
|
346 | # Stack of status writer functions taking "*msg, **opts" arguments | |||
|
347 | # like "ui.status()". Only last element ("_lfupdatereporters[-1]") | |||
|
348 | # is used to write status out. | |||
|
349 | repo._lfstatuswriters = [ui.status] | |||
|
350 | ||||
346 | def prepushoutgoinghook(local, remote, outgoing): |
|
351 | def prepushoutgoinghook(local, remote, outgoing): | |
347 | if outgoing.missing: |
|
352 | if outgoing.missing: | |
348 | toupload = set() |
|
353 | toupload = set() |
General Comments 0
You need to be logged in to leave comments.
Login now