Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/webcommands.py @ 23232:a0ccb66f344d stable
hgweb: fix a crash when using web.archivesubrepos
A matcher is required when enabling the subrepo option on archival.archive(),
because that calls match.narrowmatcher(), which accesses fields on the object.
It's therefore probably a bad idea to default the matcher to None on archive(),
but that's a fix for default.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 05 Nov 2014 21:33:45 -0500 |
parents | e48a5d3996c2 |
children | 4fedf2a9b538 |
comparison
equal
deleted
inserted
replaced
23231:32dadb2637f4 | 23232:a0ccb66f344d |
---|---|
899 arch_version = short(cnode) | 899 arch_version = short(cnode) |
900 name = "%s-%s" % (reponame, arch_version) | 900 name = "%s-%s" % (reponame, arch_version) |
901 | 901 |
902 ctx = webutil.changectx(web.repo, req) | 902 ctx = webutil.changectx(web.repo, req) |
903 pats = [] | 903 pats = [] |
904 matchfn = None | 904 matchfn = scmutil.match(ctx, []) |
905 file = req.form.get('file', None) | 905 file = req.form.get('file', None) |
906 if file: | 906 if file: |
907 pats = ['path:' + file[0]] | 907 pats = ['path:' + file[0]] |
908 matchfn = scmutil.match(ctx, pats, default='path') | 908 matchfn = scmutil.match(ctx, pats, default='path') |
909 if pats: | 909 if pats: |