##// END OF EJS Templates
tests: use pattern matching to mask `ECONNREFUSED` messages...
tests: use pattern matching to mask `ECONNREFUSED` messages The second and third one of these in `test-http-proxy.t` was failing on Windows. The others were found by grep and by failed tests when output was matched and an attempt was made to emit the mask pattern. The first clonebundles failure on Windows emitted: error fetching bundle: [WinError 10061] $ECONNREFUSED$ We should probably stringify that better to get rid of the "[WinError 10061]" part.

File last commit:

r50516:55c6ebd1 stable
r52835:73a43fe3 default
Show More
test-merge-subrepos.t
149 lines | 3.8 KiB | text/troff | Tads3Lexer
/ tests / test-merge-subrepos.t
Arseniy Alekseyev
tests: run many tests in $TESTTMP/repo instead of $TESTTMP...
r50516 $ hg init repo
$ cd repo
Oleg Stepanov
Do not allow merging with uncommitted changes in a subrepo
r13437
$ echo a > a
$ hg ci -qAm 'add a'
$ hg init subrepo
$ echo 'subrepo = http://example.net/libfoo' > .hgsub
$ hg ci -qAm 'added subrepo'
$ hg up -qC 0
$ echo ax > a
$ hg ci -m 'changed a'
created new head
$ hg up -qC 1
$ cd subrepo
$ echo b > b
$ hg add b
$ cd ..
Should fail, since there are added files to subrepo:
$ hg merge
Matt Harbison
subrepo: make the output references to subrepositories consistent...
r33365 abort: uncommitted changes in subrepository "subrepo"
Oleg Stepanov
Do not allow merging with uncommitted changes in a subrepo
r13437 [255]
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193
Deleted files trigger a '+' marker in top level repos. Deleted files are also
noticed by `update --check` in the top level repo.
$ hg ci -Sqm 'add b'
Matt Harbison
tests: tweak the subrepo dirty state tests...
r33359 $ echo change > subrepo/b
$ hg ci -Sm 'change b'
committing subrepository subrepo
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193 $ rm a
$ hg id
Matt Harbison
tests: tweak the subrepo dirty state tests...
r33359 9bfe45a197d7+ tip
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193 $ hg sum
Matt Harbison
tests: tweak the subrepo dirty state tests...
r33359 parent: 4:9bfe45a197d7 tip
change b
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193 branch: default
commit: 1 deleted (clean)
update: 1 new changesets, 2 branch heads (merge)
Matt Harbison
tests: tweak the subrepo dirty state tests...
r33359 phases: 5 draft
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193
$ hg up --check -r '.^'
abort: uncommitted changes
Martin von Zweigbergk
errors: introduce StateError and use it from commands and cmdutil...
r46444 [20]
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193 $ hg st -S
! a
$ hg up -Cq .
Test that dirty is consistent through subrepos
$ rm subrepo/b
Matt Harbison
subrepo: consider the parent repo dirty when a file is missing...
r33364 A deleted subrepo file is flagged as dirty, like the top level repo
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193
Yuya Nishihara
tests: filter out uninteresting log events...
r41028 $ hg id --config extensions.blackbox= --config blackbox.dirty=True \
> --config blackbox.track='command commandfinish'
Matt Harbison
subrepo: consider the parent repo dirty when a file is missing...
r33364 9bfe45a197d7+ tip
Matt Harbison
tests: tweak the subrepo dirty state tests...
r33359 $ cat .hg/blackbox.log
Kyle Lippincott
chg: pass --no-profile to disable profiling when starting hg serve...
r47798 * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> serve --no-profile --cmdserver chgunix * (glob) (chg !)
Yuya Nishihara
dispatch: verify result of early command parsing...
r35063 * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* (glob)
Matt Harbison
subrepo: consider the parent repo dirty when a file is missing...
r33364 * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* exited 0 * (glob)
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193
TODO: a deleted file should be listed as such, like the top level repo
$ hg sum
Matt Harbison
tests: tweak the subrepo dirty state tests...
r33359 parent: 4:9bfe45a197d7 tip
change b
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193 branch: default
commit: (clean)
update: 1 new changesets, 2 branch heads (merge)
Matt Harbison
tests: tweak the subrepo dirty state tests...
r33359 phases: 5 draft
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193
Modified subrepo files are noticed by `update --check` and `summary`
$ echo mod > subrepo/b
$ hg st -S
M subrepo/b
$ hg up -r '.^' --check
Matt Harbison
subrepo: make the output references to subrepositories consistent...
r33365 abort: uncommitted changes in subrepository "subrepo"
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193 [255]
$ hg sum
Matt Harbison
tests: tweak the subrepo dirty state tests...
r33359 parent: 4:9bfe45a197d7 tip
change b
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193 branch: default
commit: 1 subrepos
update: 1 new changesets, 2 branch heads (merge)
Matt Harbison
tests: tweak the subrepo dirty state tests...
r33359 phases: 5 draft
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193
TODO: why is -R needed here? If it's because the subrepo is treated as a
discrete unit, then this should probably warn or something.
$ hg revert -R subrepo --no-backup subrepo/b -r .
$ rm subrepo/b
$ hg st -S
! subrepo/b
Matt Harbison
subrepo: consider the parent repo dirty when a file is missing...
r33364 `hg update --check` notices a subrepo with a missing file, like it notices a
missing file in the top level repo.
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193
Matt Harbison
subrepo: consider the parent repo dirty when a file is missing...
r33364 $ hg up -r '.^' --check
Matt Harbison
subrepo: make the output references to subrepositories consistent...
r33365 abort: uncommitted changes in subrepository "subrepo"
Matt Harbison
subrepo: consider the parent repo dirty when a file is missing...
r33364 [255]
$ hg up -r '.^' --config ui.interactive=True << EOF
Matt Harbison
test-subrepo: demonstrate a status problem when merge deletes a file...
r33366 > d
Matt Harbison
tests: tweak the subrepo dirty state tests...
r33359 > EOF
Pulkit Goyal
filemerge: fix the wrong placements of messages in prompt...
r39321 file 'b' was deleted in local [working copy] but was modified in other [destination].
Kyle Lippincott
filemerge: make last line of prompts <40 english chars (issue6158)...
r42765 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
What do you want to do? d
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Matt Harbison
test-subrepo: demonstrate a status problem when merge deletes a file...
r33366 XXX: There's a difference between wdir() and '.', so there should be a status.
tests: clarify some missing output in test-merge-subrepos...
r47472 `hg files -S` from the top is also missing 'subrepo/b'. The files should be
seen as deleted (and, maybe even missing? in which case `hg files` should list
it)
Matt Harbison
test-subrepo: demonstrate a status problem when merge deletes a file...
r33366
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193 $ hg st -S
tests: clarify some missing output in test-merge-subrepos...
r47472 R subrepo/b (missing-correct-output !)
Matt Harbison
test-subrepo: demonstrate a status problem when merge deletes a file...
r33366 $ hg st -R subrepo
tests: clarify some missing output in test-merge-subrepos...
r47472 R subrepo/b (missing-correct-output !)
(note: return [1] because no files "match" since the list is empty)
Matt Harbison
test-subrepo: demonstrate a status problem when merge deletes a file...
r33366 $ hg files -R subrepo
[1]
$ hg files -R subrepo -r '.'
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 subrepo/b
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193
$ hg bookmark -r tip @other
$ echo xyz > subrepo/c
$ hg ci -SAm 'add c'
adding subrepo/c
committing subrepository subrepo
created new head
$ rm subrepo/c
Merge sees deleted subrepo files as an uncommitted change
$ hg merge @other
Matt Harbison
subrepo: make the output references to subrepositories consistent...
r33365 abort: uncommitted changes in subrepository "subrepo"
Matt Harbison
tests: demonstrate inconsistencies with dirty state in various commands...
r33193 [255]