largefiles: teach log to handle patterns
Adding the standin to the patterns list was (possibly) harmless before, but was
wrong, because the pattern list was already updated above that code. Now that
patterns are handled, it was actually harmful. For example, in this test:
$ hg log -G glob:**another*
the adjusted pattern list would have been:
['glob:**another*', '.hglf/.', 'glob:.hglf/**another*']
which causes every largefile in the root to be matched.
I'm not sure why 'glob:a*' picks up the rename of a -> b commit in test-log.t,
but a simple 'a' doesn't. But it doesn't appear to be caused by the largefiles
extension.
$ cat > abortcommit.py <<EOF
> from mercurial import util
> def hook(**args):
> raise util.Abort("no commits allowed")
> def reposetup(ui, repo):
> repo.ui.setconfig("hooks", "pretxncommit.nocommits", hook)
> EOF
$ abspath=`pwd`/abortcommit.py
$ cat <<EOF >> $HGRCPATH
> [extensions]
> mq =
> abortcommit = $abspath
> EOF
$ hg init foo
$ cd foo
$ echo foo > foo
$ hg add foo
mq may keep a reference to the repository so __del__ will not be
called and .hg/journal.dirstate will not be deleted:
$ hg ci -m foo
error: pretxncommit.nocommits hook failed: no commits allowed
transaction abort!
rollback completed
abort: no commits allowed
[255]
$ hg ci -m foo
error: pretxncommit.nocommits hook failed: no commits allowed
transaction abort!
rollback completed
abort: no commits allowed
[255]
$ cd ..