tests/test-issue660.t
author Raphaël Gomès <rgomes@octobus.net>
Thu, 06 Jul 2023 14:32:07 +0200
changeset 50763 f8412da86d05
parent 49042 524819ab6fde
permissions -rw-r--r--
rust-config: add support for default config items Now that configitems.toml exists, we can read from it the default values for all core config items. We will add the devel-warning for use of undeclared config items in a later patch when we're done adding the missing entries for `rhg`.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49042
524819ab6fde test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net>
parents: 49041
diff changeset
     1
#testcases dirstate-v1 dirstate-v2
524819ab6fde test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net>
parents: 49041
diff changeset
     2
524819ab6fde test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net>
parents: 49041
diff changeset
     3
#if dirstate-v2
524819ab6fde test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net>
parents: 49041
diff changeset
     4
  $ cat >> $HGRCPATH << EOF
524819ab6fde test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net>
parents: 49041
diff changeset
     5
  > [format]
524819ab6fde test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net>
parents: 49041
diff changeset
     6
  > use-dirstate-v2=1
524819ab6fde test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net>
parents: 49041
diff changeset
     7
  > [storage]
524819ab6fde test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net>
parents: 49041
diff changeset
     8
  > dirstate-v2.slow-path=allow
524819ab6fde test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net>
parents: 49041
diff changeset
     9
  > EOF
524819ab6fde test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net>
parents: 49041
diff changeset
    10
#endif
524819ab6fde test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net>
parents: 49041
diff changeset
    11
26420
2fc86d92c4a9 urls: bulk-change BTS urls to new location
Matt Mackall <mpm@selenic.com>
parents: 19510
diff changeset
    12
https://bz.mercurial-scm.org/660 and:
2fc86d92c4a9 urls: bulk-change BTS urls to new location
Matt Mackall <mpm@selenic.com>
parents: 19510
diff changeset
    13
https://bz.mercurial-scm.org/322
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    14
49041
8309c83b6e2c test-issue660: test inside a repository, not the test dir
Raphaël Gomès <rgomes@octobus.net>
parents: 39405
diff changeset
    15
  $ hg init repo
8309c83b6e2c test-issue660: test inside a repository, not the test dir
Raphaël Gomès <rgomes@octobus.net>
parents: 39405
diff changeset
    16
  $ cd repo
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    17
  $ echo a > a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    18
  $ mkdir b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    19
  $ echo b > b/b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    20
  $ hg commit -A -m "a is file, b is dir"
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    21
  adding a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    22
  adding b/b
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    23
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    24
File replaced with directory:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    25
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    26
  $ rm a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    27
  $ mkdir a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    28
  $ echo a > a/a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    29
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    30
Should fail - would corrupt dirstate:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    31
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    32
  $ hg add a/a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    33
  abort: file 'a' in dirstate clashes with 'a/a'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12195
diff changeset
    34
  [255]
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    35
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    36
Removing shadow:
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    37
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    38
  $ hg rm --after a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    39
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    40
Should succeed - shadow removed:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    41
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    42
  $ hg add a/a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    43
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    44
Directory replaced with file:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    45
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    46
  $ rm -r b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    47
  $ echo b > b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    48
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    49
Should fail - would corrupt dirstate:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    50
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    51
  $ hg add b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    52
  abort: directory 'b' already in dirstate
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12195
diff changeset
    53
  [255]
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    54
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    55
Removing shadow:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    56
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    57
  $ hg rm --after b/b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    58
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    59
Should succeed - shadow removed:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    60
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    61
  $ hg add b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    62
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    63
Look what we got:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    64
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    65
  $ hg st
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    66
  A a/a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    67
  A b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    68
  R a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    69
  R b/b
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    70
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    71
Revert reintroducing shadow - should fail:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    72
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    73
  $ rm -r a b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    74
  $ hg revert b/b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    75
  abort: file 'b' in dirstate clashes with 'b/b'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12195
diff changeset
    76
  [255]
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    77
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    78
Revert all - should succeed:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    79
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    80
  $ hg revert --all
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 26420
diff changeset
    81
  forgetting a/a
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    82
  forgetting b
39405
cb70501d8b71 revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 35393
diff changeset
    83
  undeleting a
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 26420
diff changeset
    84
  undeleting b/b
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    85
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    86
  $ hg st
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    87
19510
8b190adb7ee3 revert: make backup when unforgetting a file (issue3423)
Matt Mackall <mpm@selenic.com>
parents: 15447
diff changeset
    88
Issue3423:
8b190adb7ee3 revert: make backup when unforgetting a file (issue3423)
Matt Mackall <mpm@selenic.com>
parents: 15447
diff changeset
    89
8b190adb7ee3 revert: make backup when unforgetting a file (issue3423)
Matt Mackall <mpm@selenic.com>
parents: 15447
diff changeset
    90
  $ hg forget a
8b190adb7ee3 revert: make backup when unforgetting a file (issue3423)
Matt Mackall <mpm@selenic.com>
parents: 15447
diff changeset
    91
  $ echo zed > a
8b190adb7ee3 revert: make backup when unforgetting a file (issue3423)
Matt Mackall <mpm@selenic.com>
parents: 15447
diff changeset
    92
  $ hg revert a
8b190adb7ee3 revert: make backup when unforgetting a file (issue3423)
Matt Mackall <mpm@selenic.com>
parents: 15447
diff changeset
    93
  $ hg st
8b190adb7ee3 revert: make backup when unforgetting a file (issue3423)
Matt Mackall <mpm@selenic.com>
parents: 15447
diff changeset
    94
  ? a.orig
8b190adb7ee3 revert: make backup when unforgetting a file (issue3423)
Matt Mackall <mpm@selenic.com>
parents: 15447
diff changeset
    95
  $ rm a.orig
8b190adb7ee3 revert: make backup when unforgetting a file (issue3423)
Matt Mackall <mpm@selenic.com>
parents: 15447
diff changeset
    96
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    97
addremove:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
    98
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    99
  $ rm -r a b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   100
  $ mkdir a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   101
  $ echo a > a/a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   102
  $ echo b > b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   103
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   104
  $ hg addremove -s 0
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   105
  removing a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   106
  adding a/a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   107
  adding b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   108
  removing b/b
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
   109
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   110
  $ hg st
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   111
  A a/a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   112
  A b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   113
  R a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   114
  R b/b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   115
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   116
commit:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
   117
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   118
  $ hg ci -A -m "a is dir, b is file"
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   119
  $ hg st --all
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   120
  C a/a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   121
  C b
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
   122
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   123
Long directory replaced with file:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
   124
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   125
  $ mkdir d
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   126
  $ mkdir d/d
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   127
  $ echo d > d/d/d
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   128
  $ hg commit -A -m "d is long directory"
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   129
  adding d/d/d
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
   130
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   131
  $ rm -r d
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   132
  $ echo d > d
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   133
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   134
Should fail - would corrupt dirstate:
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   135
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   136
  $ hg add d
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   137
  abort: directory 'd' already in dirstate
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12195
diff changeset
   138
  [255]
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
   139
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   140
Removing shadow:
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   141
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   142
  $ hg rm --after d/d/d
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
   143
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   144
Should succeed - shadow removed:
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   145
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   146
  $ hg add d
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   147
  $ hg ci -md
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
   148
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   149
Update should work at least with clean working directory:
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
   150
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   151
  $ rm -r a b d
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   152
  $ hg up -r 0
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   153
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
5516
f252ba975925 Fix dir-changed-to-file updates on clean workdir.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5487
diff changeset
   154
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   155
  $ hg st --all
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   156
  C a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   157
  C b/b
5487
7a64931e2d76 Fix file-changed-to-dir and dir-to-file commits (issue660).
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
   158
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   159
  $ rm -r a b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   160
  $ hg up -r 1
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   161
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   162
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   163
  $ hg st --all
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   164
  C a/a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   165
  C b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   166