Mercurial > public > mercurial-scm > hg-stable
diff hgext/largefiles/overrides.py @ 26417:9a466b9f9792 stable 3.5.2
largefiles: restore archiving largefiles with hgweb (issue4859)
This regressed in 7699d3212994, when trying to conditionally disable archiving
of largefiles.
I'm not sure if wrapfunction() is the right way to do this, but it seems to
work. The mysterious issue with lfstatus getting out of sync in the proxy and
the unfiltered view crops up again here. See the referenced cset for more info.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 29 Sep 2015 23:29:44 -0400 |
parents | 7699d3212994 |
children | 97dc6ab42aad |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Thu Oct 01 11:09:36 2015 -0300 +++ b/hgext/largefiles/overrides.py Tue Sep 29 23:29:44 2015 -0400 @@ -886,9 +886,19 @@ finally: repo.unfiltered().lfstatus = False +def hgwebarchive(orig, web, req, tmpl): + web.repo.lfstatus = True + + try: + return orig(web, req, tmpl) + finally: + web.repo.lfstatus = False + def overridearchive(orig, repo, dest, node, kind, decode=True, matchfn=None, prefix='', mtime=None, subrepos=None): - if not repo.lfstatus: + # For some reason setting repo.lfstatus in hgwebarchive only changes the + # unfiltered repo's attr, so check that as well. + if not repo.lfstatus and not repo.unfiltered().lfstatus: return orig(repo, dest, node, kind, decode, matchfn, prefix, mtime, subrepos)