Show More
@@ -130,7 +130,9 b' class dirstate(object):' | |||
|
130 | 130 | files = [self._join('.hgignore')] |
|
131 | 131 | for name, path in self._ui.configitems("ui"): |
|
132 | 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 | 136 | return ignore.ignore(self._root, files, self._ui.warn) |
|
135 | 137 | |
|
136 | 138 | @propertycache |
@@ -1338,11 +1338,11 b' User interface controls.' | |||
|
1338 | 1338 | |
|
1339 | 1339 | ``ignore`` |
|
1340 | 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. |
|
|
1342 | option supports hook syntax, so if you want to specify multiple | |
|
1343 | ignore files, you can do so by setting something like | |
|
1344 |
``ignore.other = ~/.hgignore2``. For details |
|
|
1345 | format, see the ``hgignore(5)`` man page. | |
|
1341 | in the same format as a repository-wide .hgignore file. Filenames | |
|
1342 | are relative to the repository root. This option supports hook syntax, | |
|
1343 | so if you want to specify multiple ignore files, you can do so by | |
|
1344 | setting something like ``ignore.other = ~/.hgignore2``. For details | |
|
1345 | of the ignore file format, see the ``hgignore(5)`` man page. | |
|
1346 | 1346 | |
|
1347 | 1347 | ``interactive`` |
|
1348 | 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 | 81 | empty out testhgignore |
|
82 | 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 | 92 | $ hg status |
|
85 | 93 | A dir/b.o |
|
86 | 94 | ? .hgignore |
|
87 | 95 | ? a.c |
|
88 | 96 | ? syntax |
|
89 | 97 | |
|
98 | $ cd .. | |
|
99 | $ echo > .hg/testhgignorerel | |
|
90 | 100 | $ echo "syntax: glob" > .hgignore |
|
91 | 101 | $ echo "re:.*\.o" >> .hgignore |
|
92 | 102 | $ hg status |
General Comments 0
You need to be logged in to leave comments.
Login now