##// END OF EJS Templates
tests: fix test-sparse-revlog...
tests: fix test-sparse-revlog This one is not covered by the CIbecause I requires an expensive artifact to be cached. So it goes out of think on regular basis (we should fix that…) The test ouput was affected by e706bb41fdb3 as we filtering now happens sooner, removing for the output.

File last commit:

r49186:6a454e70 default
r50521:da636e7a default
Show More
test-import-unknown.t
69 lines | 1.4 KiB | text/troff | Tads3Lexer
/ tests / test-import-unknown.t
$ cat <<EOF >> $HGRCPATH
> [extensions]
> purge =
> EOF
$ hg init test
$ cd test
$ echo a > changed
$ echo a > removed
$ echo a > source
$ hg ci -Am addfiles
adding changed
adding removed
adding source
$ echo a >> changed
$ echo a > added
$ hg add added
$ hg rm removed
$ hg cp source copied
$ hg diff --git > ../unknown.diff
Test adding on top of an unknown file
$ hg up -qC 0
$ hg purge
$ echo a > added
$ hg import --no-commit ../unknown.diff
applying ../unknown.diff
file added already exists
1 out of 1 hunks FAILED -- saving rejects to file added.rej
abort: patch failed to apply
[20]
Test modifying an unknown file
$ hg revert -aq
$ hg purge
$ hg rm changed
$ hg ci -m removechanged
$ echo a > changed
$ hg import --no-commit ../unknown.diff
applying ../unknown.diff
abort: cannot patch changed: file is not tracked
[20]
Test removing an unknown file
$ hg up -qC 0
$ hg purge
$ hg rm removed
$ hg ci -m removeremoved
created new head
$ echo a > removed
$ hg import --no-commit ../unknown.diff
applying ../unknown.diff
abort: cannot patch removed: file is not tracked
[20]
Test copying onto an unknown file
$ hg up -qC 0
$ hg purge
$ echo a > copied
$ hg import --no-commit ../unknown.diff
applying ../unknown.diff
abort: cannot create copied: destination already exists
[20]
$ cd ..