tests/test-merge-subrepos.t
author Gregory Szorc <gregory.szorc@gmail.com>
Thu, 06 Sep 2018 18:04:27 -0700
changeset 39586 f296c0b366c8
parent 39312 a3fd84f4fb38
child 41002 1de3364320af
permissions -rw-r--r--
util: lower water mark when removing nodes after cost limit reached See the inline comment for the reasoning here. This is a pretty common strategy for garbage collectors, other cache-like primtives. The performance impact is substantial: $ hg perflrucachedict --size 4 --gets 1000000 --sets 1000000 --mixed 1000000 --costlimit 100 ! inserts w/ cost limit ! wall 1.659181 comb 1.650000 user 1.650000 sys 0.000000 (best of 7) ! wall 1.722122 comb 1.720000 user 1.720000 sys 0.000000 (best of 6) ! mixed w/ cost limit ! wall 1.139955 comb 1.140000 user 1.140000 sys 0.000000 (best of 9) ! wall 1.182513 comb 1.180000 user 1.180000 sys 0.000000 (best of 9) $ hg perflrucachedict --size 1000 --gets 1000000 --sets 1000000 --mixed 1000000 --costlimit 10000 ! inserts ! wall 0.679546 comb 0.680000 user 0.680000 sys 0.000000 (best of 15) ! sets ! wall 0.825147 comb 0.830000 user 0.830000 sys 0.000000 (best of 13) ! inserts w/ cost limit ! wall 25.105273 comb 25.080000 user 25.080000 sys 0.000000 (best of 3) ! wall 1.724397 comb 1.720000 user 1.720000 sys 0.000000 (best of 6) ! mixed ! wall 0.807096 comb 0.810000 user 0.810000 sys 0.000000 (best of 13) ! mixed w/ cost limit ! wall 12.104470 comb 12.070000 user 12.070000 sys 0.000000 (best of 3) ! wall 1.190563 comb 1.190000 user 1.190000 sys 0.000000 (best of 9) $ hg perflrucachedict --size 1000 --gets 1000000 --sets 1000000 --mixed 1000000 --costlimit 10000 --mixedgetfreq 90 ! inserts ! wall 0.711177 comb 0.710000 user 0.710000 sys 0.000000 (best of 14) ! sets ! wall 0.846992 comb 0.850000 user 0.850000 sys 0.000000 (best of 12) ! inserts w/ cost limit ! wall 25.963028 comb 25.960000 user 25.960000 sys 0.000000 (best of 3) ! wall 2.184311 comb 2.180000 user 2.180000 sys 0.000000 (best of 5) ! mixed ! wall 0.728256 comb 0.730000 user 0.730000 sys 0.000000 (best of 14) ! mixed w/ cost limit ! wall 3.174256 comb 3.170000 user 3.170000 sys 0.000000 (best of 4) ! wall 0.773186 comb 0.770000 user 0.770000 sys 0.000000 (best of 13) $ hg perflrucachedict --size 100000 --gets 1000000 --sets 1000000 --mixed 1000000 --mixedgetfreq 90 --costlimit 5000000 ! gets ! wall 1.191368 comb 1.190000 user 1.190000 sys 0.000000 (best of 9) ! wall 1.195304 comb 1.190000 user 1.190000 sys 0.000000 (best of 9) ! inserts ! wall 0.950995 comb 0.950000 user 0.950000 sys 0.000000 (best of 11) ! inserts w/ cost limit ! wall 1.589732 comb 1.590000 user 1.590000 sys 0.000000 (best of 7) ! sets ! wall 1.094941 comb 1.100000 user 1.090000 sys 0.010000 (best of 9) ! mixed ! wall 0.936420 comb 0.940000 user 0.930000 sys 0.010000 (best of 10) ! mixed w/ cost limit ! wall 0.882780 comb 0.870000 user 0.870000 sys 0.000000 (best of 11) This puts us ~2x slower than caches without cost accounting. And for read-heavy workloads (the prime use cases for caches), performance is nearly identical. In the worst case (pure write workloads with cost accounting enabled), we're looking at ~1.5us per insert on large caches. That seems "fast enough." Differential Revision: https://phab.mercurial-scm.org/D4505
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
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    60
  $ hg id --config extensions.blackbox= --config blackbox.dirty=True
33364
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
    61
  9bfe45a197d7+ tip
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    62
  $ cat .hg/blackbox.log
34451
6981d120c9d7 test-merge-subrepos: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 33366
diff changeset
    63
  * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> serve --cmdserver chgunix * (glob) (chg !)
34986
02845f7441af dispatch: verify result of early command parsing
Yuya Nishihara <yuya@tcha.org>
parents: 34451
diff changeset
    64
  * @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
    65
  * @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
    66
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    67
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
    68
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    69
  $ hg sum
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    70
  parent: 4:9bfe45a197d7 tip
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    71
   change b
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    72
  branch: default
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    73
  commit: (clean)
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    74
  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
    75
  phases: 5 draft
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    76
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    77
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
    78
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    79
  $ echo mod > subrepo/b
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    80
  $ hg st -S
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    81
  M subrepo/b
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    82
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    83
  $ hg up -r '.^' --check
33365
6d88468d435b subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com>
parents: 33364
diff changeset
    84
  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
    85
  [255]
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    86
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    87
  $ hg sum
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    88
  parent: 4:9bfe45a197d7 tip
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
    89
   change b
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    90
  branch: default
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    91
  commit: 1 subrepos
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    92
  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
    93
  phases: 5 draft
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    94
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    95
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
    96
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
    97
  $ 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
    98
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
    99
  $ rm subrepo/b
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   100
  $ hg st -S
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   101
  ! subrepo/b
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   102
33364
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
   103
`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
   104
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
   105
33364
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
   106
  $ hg up -r '.^' --check
33365
6d88468d435b subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com>
parents: 33364
diff changeset
   107
  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
   108
  [255]
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
   109
bf2daeddd42b subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 33359
diff changeset
   110
  $ 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
   111
  > d
33359
583aa1e3658b tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 33198
diff changeset
   112
  > EOF
39312
a3fd84f4fb38 filemerge: fix the wrong placements of messages in prompt
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39311
diff changeset
   113
  file 'b' was deleted in local [working copy] but was modified in other [destination].
39304
f785073f792c merge: improve interactive one-changed one-deleted message (issue5550)
Augie Fackler <augie@google.com>
parents: 35400
diff changeset
   114
  What do you want to do?
33366
062c1bde1781 test-subrepo: demonstrate a status problem when merge deletes a file
Matt Harbison <matt_harbison@yahoo.com>
parents: 33365
diff changeset
   115
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? d
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   116
  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
   117
33366
062c1bde1781 test-subrepo: demonstrate a status problem when merge deletes a file
Matt Harbison <matt_harbison@yahoo.com>
parents: 33365
diff changeset
   118
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
   119
`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
   120
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   121
  $ 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
   122
  $ 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
   123
  $ 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
   124
  [1]
062c1bde1781 test-subrepo: demonstrate a status problem when merge deletes a file
Matt Harbison <matt_harbison@yahoo.com>
parents: 33365
diff changeset
   125
  $ 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
   126
  subrepo/b
33198
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   127
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   128
  $ 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
   129
  $ echo xyz > subrepo/c
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   130
  $ 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
   131
  adding subrepo/c
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   132
  committing subrepository subrepo
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   133
  created new head
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   134
  $ rm subrepo/c
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   135
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   136
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
   137
439b4d005b4a tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com>
parents: 19803
diff changeset
   138
  $ hg merge @other
33365
6d88468d435b subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com>
parents: 33364
diff changeset
   139
  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
   140
  [255]