##// END OF EJS Templates
subrepo: calculate _relpath for hgsubrepo based on self instead of parent...
subrepo: calculate _relpath for hgsubrepo based on self instead of parent Prior to 105758d1b37b, the subrelpath() (now _relpath) for hgsubrepo was calculated by removing the root path of the outermost repo from the root path of the subrepo. Since the root paths use platform specific separators, and the relative path is printed by various commands, the output of these commands require a glob (and check-code.py enforces this). In an effort to be generic to all subrepos, 105758d1b37b started calculating this path based on the parent repo, and then joining the subrepo path in .hgsub. One of the tests in test-subrepo.t creates a subrepo inside a directory, so the path being joined contained '/' instead of '\'. This made the test fail with a '~' status, because the glob is unnecessary[1]. Removing them made the test work, but then check-code complains. We can't just drop the check-code rule, because sub-subrepos are still joined with '\'. Presumably the other subrepo types have this issue as well, but there likely isn't a test with git or svn repos inside a subdirectory. This simply restores the exact _relpath value (and output) for hgsubrepos prior to 105758d1b37b. [1] http://www.selenic.com/pipermail/mercurial-devel/2015-April/068720.html

File last commit:

r22047:8fb6844a default
r24786:56e15db9 default
Show More
test-check-code-hg.t
15 lines | 661 B | text/troff | Tads3Lexer
/ tests / test-check-code-hg.t
Matt Mackall
tests: change some #ifs to #requires
r22047 #require test-repo
Matt Mackall
test-check-code-hg: use test-repo check
r21223
Mads Kiilerich
tests: convert test-check-code-hg.py to .t
r15557 $ check_code="$TESTDIR"/../contrib/check-code.py
$ cd "$TESTDIR"/..
Mads Kiilerich
tests: run check-code with warnings and maintain a whitelist...
r15558
Simon Heimberg
tests: check-code all python files in one run
r19384 New errors are not allowed. Warnings are strongly discouraged.
Simon Heimberg
check-code: always report when a file is skipped by "no-check-code"...
r20239 (The writing "no-che?k-code" is for not skipping this file when checking.)
Simon Heimberg
tests: check-code all python files in one run
r19384
Matt Mackall
test-check-code-hg: use locate instead of manifest
r21225 $ hg locate | sed 's-\\-/-g' |
Simon Heimberg
tests: test-check-code-hg.t works for all files to check...
r19495 > xargs "$check_code" --warnings --per-file=0 || false
Simon Heimberg
check-code: always report when a file is skipped by "no-check-code"...
r20239 Skipping hgext/zeroconf/Zeroconf.py it has no-che?k-code (glob)
Skipping i18n/polib.py it has no-che?k-code (glob)
Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob)
Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob)
Skipping mercurial/httpclient/socketutil.py it has no-che?k-code (glob)