##// END OF EJS Templates
localrepo: use the path relative to "self.vfs" instead of "path" argument...
localrepo: use the path relative to "self.vfs" instead of "path" argument As a part of migration to vfs, this patch uses "self.root", which can be recognized as the path relative to "self.vfs", instead of "path" argument. This fix allows to make invocations of "util.makedirs()" and "os.path.exists()" while ensuring repository directory in "localrepository.__init__()" ones indirectly via vfs. But this fix also raises issue 2528: "hg clone" with empty destination. "path" argument is empty in many cases, so this issue can't be fixed in the view of "localrepository.__init__()". Before this patch, it is fixed by empty-ness check ("not name") of exception handler in "util.makedirs()". try: os.mkdir(name) except OSError, err: if err.errno == errno.EEXIST: return if err.errno != errno.ENOENT or not name: raise This requires "localrepository.__init__()" to invoke "util.makedirs()" with "path" instead of "self.root", because empty "path" is treated as "current directory" and "self.root" becomes valid path. But "hg clone" with empty destination can be detected also in "hg.clone()" before "localrepository.__init__()" invocation, so this patch re-fixes issue2528 by checking it in "hg.clone()".

File last commit:

r16914:2030dec7 default
r17159:36a30168 default
Show More
test-run-tests.t
99 lines | 1.2 KiB | text/troff | Tads3Lexer
Brodie Rao
tests: require regexes in unified tests to be marked with " (re)"...
r12375 Simple commands:
$ echo foo
foo
Mads Kiilerich
tests: (no-eol) markup for command output without trailing LF...
r12940 $ printf 'oh no'
oh no (no-eol)
Matt Mackall
tests: various fixes for new unified test pattern format
r12377 $ printf 'bar\nbaz\n' | cat
Brodie Rao
tests: require regexes in unified tests to be marked with " (re)"...
r12375 bar
baz
Multi-line command:
$ foo() {
> echo bar
> }
$ foo
bar
Matt Mackall
run-tests: replace inline python handling with more native scheme...
r15434 Return codes before inline python:
Mads Kiilerich
tests: don't rely on 'false' exit code in test-run-tests.t...
r16014 $ sh -c 'exit 1'
Matt Mackall
run-tests: replace inline python handling with more native scheme...
r15434 [1]
Idan Kamara
tests: add basic tests for doctest syntax
r15249 Doctest commands:
>>> print 'foo'
foo
$ echo interleaved
interleaved
>>> for c in 'xyz':
... print c
x
y
z
>>> print
Matt Mackall
run-tests: replace inline python handling with more native scheme...
r15434
Idan Kamara
tests: add basic tests for doctest syntax
r15249
Brodie Rao
tests: require regexes in unified tests to be marked with " (re)"...
r12375 Regular expressions:
$ echo foobarbaz
foobar.* (re)
$ echo barbazquux
.*quux.* (re)
Brodie Rao
tests: add glob matching for unified tests...
r12376 Globs:
Matt Mackall
tests: various fixes for new unified test pattern format
r12377 $ printf '* \\foobarbaz {10}\n'
Brodie Rao
tests: add glob matching for unified tests...
r12376 \* \\fo?bar* {10} (glob)
Brodie Rao
tests: require regexes in unified tests to be marked with " (re)"...
r12375 Literal match ending in " (re)":
$ echo 'foo (re)'
foo (re)
Adrian Buehlmann
tests/hghave: implement #if true / #if false...
r16891 testing hghave
$ "$TESTDIR/hghave" true
$ "$TESTDIR/hghave" false
skipped: missing feature: nail clipper
[1]
$ "$TESTDIR/hghave" no-true
skipped: system supports yak shaving
[1]
$ "$TESTDIR/hghave" no-false
Mads Kiilerich
tests: introduce c-style conditional sections in .t tests...
r16842 Conditional sections based on hghave:
Adrian Buehlmann
tests/hghave: implement #if true / #if false...
r16891 #if true
$ echo tested
tested
#else
$ echo skipped
#endif
#if false
Mads Kiilerich
tests: introduce c-style conditional sections in .t tests...
r16842 $ echo skipped
#else
$ echo tested
tested
#endif
Adrian Buehlmann
test-run-tests: add tests for "#if no-false" and no-true
r16914 #if no-false
$ echo tested
tested
#else
$ echo skipped
#endif
#if no-true
$ echo skipped
#else
$ echo tested
tested
#endif
Brodie Rao
tests: require regexes in unified tests to be marked with " (re)"...
r12375 Exit code:
Mads Kiilerich
tests: avoid checking the exitcode of false...
r12406 $ (exit 1)
Brodie Rao
tests: require regexes in unified tests to be marked with " (re)"...
r12375 [1]