annotate tests/test-bdiff.py.out @ 21566:a01988cd9b61 stable

subrepo: make "_sanitize()" take absolute path to the root of subrepo Before this patch, "hg update" doesn't sanitize ".hg/hgrc" in non-hg subrepos correctly, if "hg update" is executed not at the root of the parent repository. "_sanitize()" takes relative path to subrepo from the root of the parent repository, and passes it to "os.walk()". In this case, "os.walk()" expects CWD to be equal to the root of the parent repository. So, "os.walk()" can't find specified path (or may scan unexpected path), if CWD isn't equal to the root of the parent repository. Non-hg subrepo under nested hg-subrepos may cause same problem, too: CWD may be equal to the root of the outer most repository, or so. This patch makes "_sanitize()" take absolute path to the root of subrepo to sanitize correctly in such cases. This patch doesn't normalize the path to hostile files as the one relative to CWD (or the root of the outer most repository), to fix the problem in the simple way suitable for "stable". Normalizing should be done in the future: maybe as a part of the migration to vfs.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Thu, 08 May 2014 19:03:00 +0900
parents eeac5e179243
children 9a8363d23419
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
400
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
1 *** 'a\nc\n\n\n\n' 'a\nb\n\n\n'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
2 *** 'a\nb\nc\n' 'a\nc\n'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
3 *** '' ''
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
4 *** 'a\nb\nc' 'a\nb\nc'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
5 *** 'a\nb\nc\nd\n' 'a\nd\n'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
6 *** 'a\nb\nc\nd\n' 'a\nc\ne\n'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
7 *** 'a\nb\nc\n' 'a\nc\n'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
8 *** 'a\n' 'c\na\nb\n'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
9 *** 'a\n' ''
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
10 *** 'a\n' 'b\nc\n'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
11 *** 'a\n' 'c\na\n'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
12 *** '' 'adjfkjdjksdhfksj'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
13 *** '' 'ab'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
14 *** '' 'abc'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
15 *** 'a' 'a'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
16 *** 'ab' 'ab'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
17 *** 'abc' 'abc'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
18 *** 'a\n' 'a\n'
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
19 *** 'a\nb' 'a\nb'
7104
9514cbb6e4f6 bdiff: normalize the diff (issue1295)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 400
diff changeset
20 6 6 'y\n\n'
9514cbb6e4f6 bdiff: normalize the diff (issue1295)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 400
diff changeset
21 6 6 'y\n\n'
9514cbb6e4f6 bdiff: normalize the diff (issue1295)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 400
diff changeset
22 9 9 'y\n\n'
400
8b067bde6679 Add a fast binary diff extension (not yet used)
mpm@selenic.com
parents:
diff changeset
23 done
15530
eeac5e179243 mdiff: replace wscleanup() regexps with C loops
Patrick Mezard <pmezard@gmail.com>
parents: 8449
diff changeset
24 done