Mercurial > public > mercurial-scm > hg
comparison mercurial/dispatch.py @ 18303:4d1671b39168
clfilter: enforce hidden filtering on all repository accesses
We ensure all repositores created through `mercurial.hg.repository`
are "hidden" filtered. This is an even stronger enforcement than
5bb610f87d1d.
Citing Matt's response to changeset 5bb610f87d1d installing filtering
in dispatch:
> Unfortunately, this means that code that doesn't go through dispatch (ie all
> those crazy misguided people using Mercurial as a library) are going to see
> these hidden changesets.
>
> Might be better to instead install the filter in localrepo construction by
> default and disable it in dispatch.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Fri, 11 Jan 2013 20:34:54 +0100 |
parents | 5bb610f87d1d |
children | e71c2ff93167 |
comparison
equal
deleted
inserted
replaced
18302:16c642a6f07d | 18303:4d1671b39168 |
---|---|
708 else: | 708 else: |
709 try: | 709 try: |
710 repo = hg.repository(ui, path=path) | 710 repo = hg.repository(ui, path=path) |
711 if not repo.local(): | 711 if not repo.local(): |
712 raise util.Abort(_("repository '%s' is not local") % path) | 712 raise util.Abort(_("repository '%s' is not local") % path) |
713 if not options['hidden']: | 713 if options['hidden']: |
714 repo = repo.filtered('hidden') | |
715 else: | |
716 repo = repo.unfiltered() | 714 repo = repo.unfiltered() |
717 repo.ui.setconfig("bundle", "mainreporoot", repo.root) | 715 repo.ui.setconfig("bundle", "mainreporoot", repo.root) |
718 except error.RequirementError: | 716 except error.RequirementError: |
719 raise | 717 raise |
720 except error.RepoError: | 718 except error.RepoError: |