This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 130135 - HgUtils.isIgnored does not match patterns starting with ^ correctly
Summary: HgUtils.isIgnored does not match patterns starting with ^ correctly
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@versioncontrol
Depends on:
Reported: 2008-03-14 12:06 UTC by Padraig Obriain
Modified: 2008-03-20 09:50 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

proposed patch (832 bytes, patch)
2008-03-14 12:22 UTC, Padraig Obriain
Details | Diff
additional patch (1.59 KB, patch)
2008-03-19 16:42 UTC, Padraig Obriain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Padraig Obriain 2008-03-14 12:06:33 UTC
If .hgignore contain a pattern starting with ^, e.g. ^nbbulid/netbeans Hgutils.isIgnored does not match this correctly.
Comment 1 Padraig Obriain 2008-03-14 12:07:43 UTC
The problem is that the matching is done against the absolute path name and not the path name relative to the location
of the .hgignore directory.
Comment 2 Padraig Obriain 2008-03-14 12:22:26 UTC
Created attachment 58383 [details]
proposed patch
Comment 3 Padraig Obriain 2008-03-14 14:55:30 UTC
In there is the statement that a "file is ignored if its path or the path
of any of its subcomponents is matched by a pattern in .hgignore".

HgUtils.isIgnored does not implement that.
Comment 4 Padraig Obriain 2008-03-18 10:29:01 UTC
Patch applied in changeset 73896:46a24feca988.
Comment 5 Padraig Obriain 2008-03-19 16:42:00 UTC
Created attachment 58679 [details]
additional patch
Comment 6 Padraig Obriain 2008-03-20 09:42:58 UTC
Additional patch pushed in changeset 74440:ddf405473eeb.