tests/test-merge-subrepos.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 02 Oct 2019 17:53:47 -0400
changeset 43257 675c776fbcd1
parent 42565 4764e8436b2a
child 45859 527ce85c2e60
permissions -rw-r--r--
sidedatacopies: directly fetch copies information from sidedata When using the sidedata mode, we don't need a complicated and expensive `context` object. Instead we directly fetch copies information from the sidedata (through a changelogrevision object). More optimisations coming. revision: large amount; added files: large amount; rename small amount; c3b14617fbd7 9ba6ab77fd29 filelog: ! wall 3.679613 comb 3.680000 user 3.580000 sys 0.100000 (median of 3) base: ! wall 8.884369 comb 8.880000 user 8.850000 sys 0.030000 (median of 3) before: ! wall 4.681985 comb 4.680000 user 4.640000 sys 0.040000 (median of 3) after: ! wall 3.955894 comb 3.950000 user 3.940000 sys 0.010000 (median of 3) revision: large amount; added files: small amount; rename small amount; c3b14617fbd7 f650a9b140d2 filelog: ! wall 0.003357 comb 0.010000 user 0.010000 sys 0.000000 (median of 781) base: ! wall 12.398524 comb 12.400000 user 12.330000 sys 0.070000 (median of 3) before: ! wall 6.459592 comb 6.470000 user 6.390000 sys 0.080000 (median of 3) after: ! wall 5.505774 comb 5.500000 user 5.410000 sys 0.090000 (median of 3) revision: large amount; added files: large amount; rename large amount; 08ea3258278e d9fa043f30c0 filelog: ! wall 2.754687 comb 2.760000 user 2.650000 sys 0.110000 (median of 4) base: ! wall 1.423166 comb 1.420000 user 1.400000 sys 0.020000 (median of 8) before: ! wall 0.961048 comb 0.960000 user 0.940000 sys 0.020000 (median of 11) after: ! wall 0.882950 comb 0.880000 user 0.880000 sys 0.000000 (median of 11) revision: small amount; added files: large amount; rename large amount; df6f7a526b60 a83dc6a2d56f filelog: ! wall 1.552293 comb 1.550000 user 1.510000 sys 0.040000 (median of 6 base: ! wall 0.022662 comb 0.020000 user 0.020000 sys 0.000000 (median of 128) before: ! wall 0.021649 comb 0.020000 user 0.020000 sys 0.000000 (median of 135) after: ! wall 0.020951 comb 0.020000 user 0.020000 sys 0.000000 (median of 141) revision: small amount; added files: large amount; rename small amount; 4aa4e1f8e19a 169138063d63 filelog: ! wall 1.500983 comb 1.500000 user 1.420000 sys 0.080000 (median of 7) base: ! wall 0.006956 comb 0.010000 user 0.010000 sys 0.000000 (median of 392) before: ! wall 0.004022 comb 0.000000 user 0.000000 sys 0.000000 (median of 735) after: ! wall 0.003988 comb 0.000000 user 0.000000 sys 0.000000 (median of 736) revision: small amount; added files: small amount; rename small amount; 4bc173b045a6 964879152e2e filelog: ! wall 0.011745 comb 0.020000 user 0.020000 sys 0.000000 (median of 250) base: ! wall 0.000156 comb 0.000000 user 0.000000 sys 0.000000 (median of 17180) before: ! wall 0.000118 comb 0.000000 user 0.000000 sys 0.000000 (median of 19170) after: ! wall 0.000097 comb 0.000000 user 0.000000 sys 0.000000 (median of 27276) revision: medium amount; added files: large amount; rename medium amount; c95f1ced15f2 2c68e87c3efe filelog: ! wall 3.228230 comb 3.230000 user 3.110000 sys 0.120000 (median of 4) base: ! wall 0.997640 comb 1.000000 user 0.980000 sys 0.020000 (median of 10) before: ! wall 0.679500 comb 0.680000 user 0.680000 sys 0.000000 (median of 15) after: ! wall 0.596779 comb 0.600000 user 0.600000 sys 0.000000 (median of 17) revision: medium amount; added files: medium amount; rename small amount; d343da0c55a8 d7746d32bf9d filelog: ! wall 1.052501 comb 1.060000 user 1.040000 sys 0.020000 (median of 10 base: ! wall 0.214519 comb 0.220000 user 0.220000 sys 0.000000 (median of 45) before: ! wall 0.149675 comb 0.150000 user 0.150000 sys 0.000000 (median of 66) after: ! wall 0.130786 comb 0.130000 user 0.130000 sys 0.000000 (median of 75) Differential Revision: https://phab.mercurial-scm.org/D7072
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13437
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
     1
  $ hg init
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
     2
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
     3
  $ echo a > a
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
     4
  $ hg ci -qAm 'add a'
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
     5
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
     6
  $ hg init subrepo
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
     7
  $ echo 'subrepo = http://example.net/libfoo' > .hgsub
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
     8
  $ hg ci -qAm 'added subrepo'
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
     9
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    10
  $ hg up -qC 0
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    11
  $ echo ax > a
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    12
  $ hg ci -m 'changed a'
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    13
  created new head
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    14
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    15
  $ hg up -qC 1
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    16
  $ cd subrepo
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    17
  $ echo b > b
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    18
  $ hg add b
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    19
  $ cd ..
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    20
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    21
Should fail, since there are added files to subrepo:
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    22
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    23
  $ hg merge
33365
6d88468d435b subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com>
parents: 33364
diff changeset
    24
  abort: uncommitted changes in subrepository "subrepo"
13437
6169493ac3f9 Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents:
diff changeset
    25
  [255]
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    26
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    27
Deleted files trigger a '+' marker in top level repos.  Deleted files are also
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    28
noticed by `update --check` in the top level repo.
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    29
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    30
  $ hg ci -Sqm 'add b'
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    31
  $ echo change > subrepo/b
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    32
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    33
  $ hg ci -Sm 'change b'
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    34
  committing subrepository subrepo
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    35
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    36
  $ rm a
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    37
  $ hg id
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    38
  9bfe45a197d7+ tip
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    39
  $ hg sum
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    40
  parent: 4:9bfe45a197d7 tip
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    41
   change b
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    42
  branch: default
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    43
  commit: 1 deleted (clean)
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    44
  update: 1 new changesets, 2 branch heads (merge)
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    45
  phases: 5 draft
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    46
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    47
  $ hg up --check -r '.^'
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    48
  abort: uncommitted changes
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    49
  [255]
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    50
  $ hg st -S
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    51
  ! a
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    52
  $ hg up -Cq .
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    53
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    54
Test that dirty is consistent through subrepos
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    55
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    56
  $ rm subrepo/b
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    57
33364
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
    58
A deleted subrepo file is flagged as dirty, like the top level repo
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    59
41002
1de3364320af tests: filter out uninteresting log events
Yuya Nishihara <yuya@tcha.org>
parents: 39312
diff changeset
    60
  $ hg id --config extensions.blackbox= --config blackbox.dirty=True \
1de3364320af tests: filter out uninteresting log events
Yuya Nishihara <yuya@tcha.org>
parents: 39312
diff changeset
    61
  > --config blackbox.track='command commandfinish'
33364
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
    62
  9bfe45a197d7+ tip
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    63
  $ cat .hg/blackbox.log
34451
6981d120c9d7 test-merge-subrepos: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 33366
diff changeset
    64
  * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> serve --cmdserver chgunix * (glob) (chg !)
34986
02845f7441af dispatch: verify result of early command parsing
Yuya Nishihara <yuya@tcha.org>
parents: 34451
diff changeset
    65
  * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* (glob)
33364
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
    66
  * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* exited 0 * (glob)
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    67
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    68
TODO: a deleted file should be listed as such, like the top level repo
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    69
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    70
  $ hg sum
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    71
  parent: 4:9bfe45a197d7 tip
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    72
   change b
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    73
  branch: default
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    74
  commit: (clean)
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    75
  update: 1 new changesets, 2 branch heads (merge)
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    76
  phases: 5 draft
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    77
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    78
Modified subrepo files are noticed by `update --check` and `summary`
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    79
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    80
  $ echo mod > subrepo/b
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    81
  $ hg st -S
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    82
  M subrepo/b
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    83
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    84
  $ hg up -r '.^' --check
33365
6d88468d435b subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com>
parents: 33364
diff changeset
    85
  abort: uncommitted changes in subrepository "subrepo"
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    86
  [255]
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    87
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    88
  $ hg sum
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    89
  parent: 4:9bfe45a197d7 tip
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    90
   change b
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    91
  branch: default
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    92
  commit: 1 subrepos
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    93
  update: 1 new changesets, 2 branch heads (merge)
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    94
  phases: 5 draft
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    95
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    96
TODO: why is -R needed here?  If it's because the subrepo is treated as a
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    97
discrete unit, then this should probably warn or something.
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    98
  $ hg revert -R subrepo --no-backup subrepo/b -r .
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    99
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   100
  $ rm subrepo/b
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   101
  $ hg st -S
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   102
  ! subrepo/b
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   103
33364
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
   104
`hg update --check` notices a subrepo with a missing file, like it notices a
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
   105
missing file in the top level repo.
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   106
33364
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
   107
  $ hg up -r '.^' --check
33365
6d88468d435b subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com>
parents: 33364
diff changeset
   108
  abort: uncommitted changes in subrepository "subrepo"
33364
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
   109
  [255]
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
   110
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
   111
  $ hg up -r '.^' --config ui.interactive=True << EOF
33366
062c1bde1781 test-subrepo: demonstrate a status problem when merge deletes a file
Matt Harbison <matt_harbison@yahoo.com>
parents: 33365
diff changeset
   112
  > d
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
   113
  > EOF
39312
a3fd84f4fb38 filemerge: fix the wrong placements of messages in prompt
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39311
diff changeset
   114
  file 'b' was deleted in local [working copy] but was modified in other [destination].
42565
4764e8436b2a filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41002
diff changeset
   115
  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
4764e8436b2a filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41002
diff changeset
   116
  What do you want to do? d
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   117
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   118
33366
062c1bde1781 test-subrepo: demonstrate a status problem when merge deletes a file
Matt Harbison <matt_harbison@yahoo.com>
parents: 33365
diff changeset
   119
XXX: There's a difference between wdir() and '.', so there should be a status.
062c1bde1781 test-subrepo: demonstrate a status problem when merge deletes a file
Matt Harbison <matt_harbison@yahoo.com>
parents: 33365
diff changeset
   120
`hg files -S` from the top is also missing 'subrepo/b'.
062c1bde1781 test-subrepo: demonstrate a status problem when merge deletes a file
Matt Harbison <matt_harbison@yahoo.com>
parents: 33365
diff changeset
   121
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   122
  $ hg st -S
33366
062c1bde1781 test-subrepo: demonstrate a status problem when merge deletes a file
Matt Harbison <matt_harbison@yahoo.com>
parents: 33365
diff changeset
   123
  $ hg st -R subrepo
062c1bde1781 test-subrepo: demonstrate a status problem when merge deletes a file
Matt Harbison <matt_harbison@yahoo.com>
parents: 33365
diff changeset
   124
  $ hg files -R subrepo
062c1bde1781 test-subrepo: demonstrate a status problem when merge deletes a file
Matt Harbison <matt_harbison@yahoo.com>
parents: 33365
diff changeset
   125
  [1]
062c1bde1781 test-subrepo: demonstrate a status problem when merge deletes a file
Matt Harbison <matt_harbison@yahoo.com>
parents: 33365
diff changeset
   126
  $ hg files -R subrepo -r '.'
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34986
diff changeset
   127
  subrepo/b
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   128
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   129
  $ hg bookmark -r tip @other
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   130
  $ echo xyz > subrepo/c
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   131
  $ hg ci -SAm 'add c'
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   132
  adding subrepo/c
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   133
  committing subrepository subrepo
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   134
  created new head
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   135
  $ rm subrepo/c
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   136
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   137
Merge sees deleted subrepo files as an uncommitted change
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   138
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   139
  $ hg merge @other
33365
6d88468d435b subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com>
parents: 33364
diff changeset
   140
  abort: uncommitted changes in subrepository "subrepo"
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   141
  [255]