Mercurial > public > mercurial-scm > hg
diff hgext/largefiles/reposetup.py @ 23188:94ac64bcf6fe
largefiles: introduce "_lfstatuswriters" to customize status reporting
"lfutil.getstatuswriter" is the utility to get appropriate function to
write largefiles specific status out from "repo._lfstatuswriters".
This patch uses "stack" with an element instead of flag like
"_isXXXXing" or so, because:
- the former works correctly even when customizations are nested, and
- ensuring at least one element can ignore empty check
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 05 Nov 2014 23:24:47 +0900 |
parents | 6de61d0b773f |
children | 4be754832829 |
line wrap: on
line diff
--- a/hgext/largefiles/reposetup.py Wed Nov 05 23:24:47 2014 +0900 +++ b/hgext/largefiles/reposetup.py Wed Nov 05 23:24:47 2014 +0900 @@ -343,6 +343,11 @@ # only last element ("_lfcommithooks[-1]") is used for each committing. repo._lfcommithooks = [lfutil.updatestandinsbymatch] + # Stack of status writer functions taking "*msg, **opts" arguments + # like "ui.status()". Only last element ("_lfupdatereporters[-1]") + # is used to write status out. + repo._lfstatuswriters = [ui.status] + def prepushoutgoinghook(local, remote, outgoing): if outgoing.missing: toupload = set()