Show More
@@ -130,7 +130,9 b' class dirstate(object):' | |||||
130 | files = [self._join('.hgignore')] |
|
130 | files = [self._join('.hgignore')] | |
131 | for name, path in self._ui.configitems("ui"): |
|
131 | for name, path in self._ui.configitems("ui"): | |
132 | if name == 'ignore' or name.startswith('ignore.'): |
|
132 | if name == 'ignore' or name.startswith('ignore.'): | |
133 | files.append(util.expandpath(path)) |
|
133 | # we need to use os.path.join here rather than self._join | |
|
134 | # because path is arbitrary and user-specified | |||
|
135 | files.append(os.path.join(self._rootdir, util.expandpath(path))) | |||
134 | return ignore.ignore(self._root, files, self._ui.warn) |
|
136 | return ignore.ignore(self._root, files, self._ui.warn) | |
135 |
|
137 | |||
136 | @propertycache |
|
138 | @propertycache |
@@ -1338,11 +1338,11 b' User interface controls.' | |||||
1338 |
|
1338 | |||
1339 | ``ignore`` |
|
1339 | ``ignore`` | |
1340 | A file to read per-user ignore patterns from. This file should be |
|
1340 | A file to read per-user ignore patterns from. This file should be | |
1341 |
in the same format as a repository-wide .hgignore file. |
|
1341 | in the same format as a repository-wide .hgignore file. Filenames | |
1342 | option supports hook syntax, so if you want to specify multiple |
|
1342 | are relative to the repository root. This option supports hook syntax, | |
1343 | ignore files, you can do so by setting something like |
|
1343 | so if you want to specify multiple ignore files, you can do so by | |
1344 |
``ignore.other = ~/.hgignore2``. For details |
|
1344 | setting something like ``ignore.other = ~/.hgignore2``. For details | |
1345 | format, see the ``hgignore(5)`` man page. |
|
1345 | of the ignore file format, see the ``hgignore(5)`` man page. | |
1346 |
|
1346 | |||
1347 | ``interactive`` |
|
1347 | ``interactive`` | |
1348 | Allow to prompt the user. True or False. Default is True. |
|
1348 | Allow to prompt the user. True or False. Default is True. |
@@ -80,13 +80,23 b' Test that patterns from ui.ignore option' | |||||
80 |
|
80 | |||
81 | empty out testhgignore |
|
81 | empty out testhgignore | |
82 | $ echo > .hg/testhgignore |
|
82 | $ echo > .hg/testhgignore | |
83 | $ echo "glob:*.o" > .hgignore |
|
83 | ||
|
84 | Test relative ignore path (issue4473): | |||
|
85 | ||||
|
86 | $ cat >> $HGRCPATH << EOF | |||
|
87 | > [ui] | |||
|
88 | > ignore.relative = .hg/testhgignorerel | |||
|
89 | > EOF | |||
|
90 | $ echo "glob:*.o" > .hg/testhgignorerel | |||
|
91 | $ cd dir | |||
84 | $ hg status |
|
92 | $ hg status | |
85 | A dir/b.o |
|
93 | A dir/b.o | |
86 | ? .hgignore |
|
94 | ? .hgignore | |
87 | ? a.c |
|
95 | ? a.c | |
88 | ? syntax |
|
96 | ? syntax | |
89 |
|
97 | |||
|
98 | $ cd .. | |||
|
99 | $ echo > .hg/testhgignorerel | |||
90 | $ echo "syntax: glob" > .hgignore |
|
100 | $ echo "syntax: glob" > .hgignore | |
91 | $ echo "re:.*\.o" >> .hgignore |
|
101 | $ echo "re:.*\.o" >> .hgignore | |
92 | $ hg status |
|
102 | $ hg status |
General Comments 0
You need to be logged in to leave comments.
Login now