##// END OF EJS Templates
tests: finally fix up test-fuzz-targets.t...
tests: finally fix up test-fuzz-targets.t It's been failing on my workstation for a while, since I have a new enough LLVM that I had the fuzzer goo, but not so new that I actually had FuzzedDataProvider. This is a better solution all around in my opinion. I _believe_ this should let us run these tests on most systems, even those using GCC instead of clang. That said, my one attempt to test this on my macOS laptop failed miserably, and I don't feel like doing more work on this right now. Differential Revision: https://phab.mercurial-scm.org/D7566

File last commit:

r42143:4ea21df3 4.9.1 stable
r44267:19da643d default
Show More
test-amend-subrepo.t
167 lines | 2.8 KiB | text/troff | Tads3Lexer
/ tests / test-amend-subrepo.t
Yuya Nishihara
tests: demonstrate that .hgsubstate isn't updated on amend...
r35017 #testcases obsstore-off obsstore-on
$ cat << EOF >> $HGRCPATH
> [extensions]
> amend =
> EOF
#if obsstore-on
$ cat << EOF >> $HGRCPATH
> [experimental]
> evolution.createmarkers = True
> EOF
#endif
Prepare parent repo
-------------------
$ hg init r
$ cd r
$ echo a > a
$ hg ci -Am0
adding a
Link first subrepo
------------------
$ echo 's = s' >> .hgsub
$ hg add .hgsub
$ hg init s
amend without .hgsub
$ hg amend s
Yuya Nishihara
amend: update .hgsubstate before committing a memctx (issue5677)...
r35019 abort: can't commit subrepos without .hgsub
[255]
Yuya Nishihara
tests: demonstrate that .hgsubstate isn't updated on amend...
r35017
amend with subrepo
$ hg amend
saved backup bundle to * (glob) (obsstore-off !)
$ hg status --change .
A .hgsub
Yuya Nishihara
amend: update .hgsubstate before committing a memctx (issue5677)...
r35019 A .hgsubstate
Yuya Nishihara
tests: demonstrate that .hgsubstate isn't updated on amend...
r35017 A a
$ cat .hgsubstate
0000000000000000000000000000000000000000 s
Update subrepo
--------------
add new commit to be amended
$ echo a >> a
$ hg ci -m1
amend with dirty subrepo
$ echo a >> s/a
$ hg add -R s
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 adding s/a
Yuya Nishihara
tests: demonstrate that .hgsubstate isn't updated on amend...
r35017 $ hg amend
Yuya Nishihara
amend: update .hgsubstate before committing a memctx (issue5677)...
r35019 abort: uncommitted changes in subrepository "s"
(use --subrepos for recursive commit)
[255]
Yuya Nishihara
tests: demonstrate that .hgsubstate isn't updated on amend...
r35017
amend with modified subrepo
$ hg ci -R s -m0
$ hg amend
saved backup bundle to * (glob) (obsstore-off !)
Yuya Nishihara
amend: update .hgsubstate before committing a memctx (issue5677)...
r35019 $ hg status --change .
M .hgsubstate
M a
Yuya Nishihara
tests: demonstrate that .hgsubstate isn't updated on amend...
r35017 $ cat .hgsubstate
f7b1eb17ad24730a1651fccd46c43826d1bbc2ac s
revert subrepo change
$ hg up -R s -q null
$ hg amend
saved backup bundle to * (glob) (obsstore-off !)
$ hg status --change .
M a
Link another subrepo
--------------------
add new commit to be amended
$ echo b >> b
$ hg ci -qAm2
also checks if non-subrepo change is included
$ echo a >> a
amend with another subrepo
$ hg init t
$ echo b >> t/b
$ hg ci -R t -Am0
adding b
$ echo 't = t' >> .hgsub
$ hg amend
saved backup bundle to * (glob) (obsstore-off !)
$ hg status --change .
M .hgsub
Yuya Nishihara
amend: update .hgsubstate before committing a memctx (issue5677)...
r35019 M .hgsubstate
Yuya Nishihara
tests: demonstrate that .hgsubstate isn't updated on amend...
r35017 M a
A b
$ cat .hgsubstate
0000000000000000000000000000000000000000 s
bfb1a4fb358498a9533dabf4f2043d94162f1fcd t
Unlink one subrepo
------------------
add new commit to be amended
$ echo a >> a
$ hg ci -m3
Matt Harbison
record: prevent commits that don't pick up dirty subrepo changes (issue6102)...
r42143 $ echo 't = t' > .hgsub
--interactive won't silently ignore dirty subrepos
$ echo modified > t/b
$ hg amend --interactive --config ui.interactive=True
abort: uncommitted changes in subrepository "t"
[255]
$ hg amend --interactive --config ui.interactive=True --config ui.commitsubrepos=True
abort: uncommitted changes in subrepository "t"
[255]
$ hg -R t revert -q --all --no-backup
Yuya Nishihara
tests: demonstrate that .hgsubstate isn't updated on amend...
r35017 amend with one subrepo dropped
$ hg amend
saved backup bundle to * (glob) (obsstore-off !)
$ hg status --change .
M .hgsub
Yuya Nishihara
amend: update .hgsubstate before committing a memctx (issue5677)...
r35019 M .hgsubstate
Yuya Nishihara
tests: demonstrate that .hgsubstate isn't updated on amend...
r35017 M a
$ cat .hgsubstate
bfb1a4fb358498a9533dabf4f2043d94162f1fcd t
Unlink subrepos completely
--------------------------
add new commit to be amended
$ echo a >> a
$ hg ci -m3
amend with .hgsub removed
$ hg rm .hgsub
$ hg amend
saved backup bundle to * (glob) (obsstore-off !)
$ hg status --change .
M a
R .hgsub
R .hgsubstate
$ cd ..