[Bug 4154] New: checkallhook does not respect settings in .hgeol
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Fri Jan 24 08:20:44 CST 2014
http://bz.selenic.com/show_bug.cgi?id=4154
Priority: normal
Bug ID: 4154
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: checkallhook does not respect settings in .hgeol
Severity: bug
Classification: Unclassified
OS: Windows
Reporter: grazhopper at gmail.com
Hardware: PC
Status: UNCONFIRMED
Version: 2.8.2
Component: eol
Product: Mercurial
Hi,
I noticed strange behavior of the checkallhook in which it does not take into
account the settings of the .hgeol file.
The problem setting is the following:
- checkallhook is activated for my repository as a pretxnchangegroup hook.
- Clone the repository and create/edit .hgeol so that it contains:
[patterns]
** = native
myimage.png = BIN
- Add, commit and push. This works without a problem.
- Next add myimage.png and commit.
When trying to push, this fails because the hook does not accept the image. Or
in other words, it does not realize that it should ignore it for being a
'binary' file.
I had a look at eol.py, and I have the feeling the problem is line 194 in
eol.py. Now it says:
if not match.match(repo.root, '', [pattern])(f):
It looks like that the include/exclude patterns are not taken into account
here. A possible fix would be to replace the above line with
if not match.match(repo.root, '', [pattern], self.include,
self.exclude)(f):
in which self.include and self.exclude could be set at the end of __init__(). I
checked this for my test setup and this change indeed seems to fix the problem.
Hope to have been of help.
Best regards,
Yves
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list