Commit Graph

14 Commits

Author SHA1 Message Date
Mads Kiilerich
2fc7d0133f match: fix root calculation for combining regexps with simple paths
The fall-back root for walking is the repo root, not no root.

The "roots" do however also end up in m.files() which is used in various ways,
for instance to indicate whether matches are exact. The change could thus have
other impacts.
2013-04-30 01:04:35 +02:00
Patrick Mezard
302b8a957f test-status.t: test ui.slash on Windows 2012-08-18 16:35:36 +02:00
FUJIWARA Katsunori
4798ea4198 localrepository: use 'changectx.dirs()' in 'status()' for directory patterns
when pattern which does not match against any files in working context
is specified, current implementation of 'localrepository.status()'
decides whether warning message about it should be shown or not by
'f not in context'

this works correctly for 'file pattern', but not for 'directory
pattern', because 'f not in context' always returns True for
directories, even if they are related to the context.

this patch uses 'changectx.dirs()' to examine whether specified
pattern is related to the context as a directory or not.
2012-02-23 00:07:54 +09:00
Jim Hague
78a686772b tests: tighten checks for octal escapes in shell printf.
printf on AIX default shell ksh (89) says \1 is an invalid escape. It insists
on at least 2 digits. This causes failures in test-keyword.t and test-status.t.

check-code.py already looks out for \NNN and recommends using Python
for outputting octal values. Extend the check to \NN and \N and fix up
resulting failures.
2012-02-08 16:56:00 +00:00
Matt Mackall
e0479875b3 merge with stable 2012-01-13 11:29:53 -06:00
Yuya Nishihara
0bf3f9f6fd filectx: fix cmp() of file starting with '\1\n'
If file data starts with '\1\n', it will be escaped in the revlog to
create an empty metadata block, thus adding four bytes to the size in
the revlog size index. There's no way to detect that this has happened
in filelog.size() faster than decompressing each revision [1].

For filectx.cmp(), we have the size of the file in the working directory
available. If it differs by exactly four bytes, it may be this case, so
do a full comparison.

 [1]: http://markmail.org/message/5akdbmmqx7vq2fsg
2012-01-12 00:49:45 +09:00
Patrick Mezard
a50918f3cf status: support revsets with --change 2011-11-24 11:38:16 +01:00
Mads Kiilerich
637e2ecde2 tests: hide 'No such file or directory' messages
Windows will use a different and localized message.
2011-11-16 03:45:14 +01:00
Mads Kiilerich
ec46d5bf4d backout a3900c75ca8c - the "unreachable code" was apparently not unreachable
All tests repeatedly passes with a3900c75ca8c on some machines, but on other
machines it regularly causes failure in test-mv-cp-st-diff.t, such as:

@@ -203,6 +203,7 @@

   - working to root: --rev 0
   M a
+  M x/x
   A b
     a
2011-05-01 19:51:28 +02:00
Mads Kiilerich
8c1c7b8a31 status: remove unreachable code for status between revisions
The manifest value of a file will never be false when "not parentworking", and
the expensive content comparision would thus fortunately never be reached. (If
it was reached it would be wrong for example in case of renames.)

This code once handled status against working directory, but that has been done
elsewhere for a long time.
2011-02-24 14:06:08 +01:00
Matt Mackall
ac660e9f65 tests: cleanup exit code handling in unified tests 2010-09-21 16:00:02 -05:00
Matt Mackall
200e89394d tests: fix a bunch of pointless #s in unified tests 2010-09-17 17:03:08 -05:00
Martin Geisler
cc612c476f tests: remove unneeded -d flags
Many tests fixed the commit date of their changesets at '1000000 0' or
similar. However testing with "Mon Jan 12 13:46:40 1970 +0000" is not
better than testing with "Thu Jan 01 00:00:00 1970 +0000", which is
the default run-tests.py installs.

Removing the unnecessary flag removes some clutter and will hopefully
make it clearer what the tests are really trying to test. Some tests
did not even change their output when the dates were changed, in which
case the -d flag was truly irrelevant.

Dates used in sequence (such as '0 0', '1 0', etc...) were left alone
since they may make the test easier to understand.
2010-09-02 23:22:51 +02:00
Nicolas Dumazet
8ea7989b02 tests: unify test-status 2010-08-12 14:54:10 +09:00