tests/test-sparse-merges.t
author Raphaël Gomès <rgomes@octobus.net>
Wed, 11 Jan 2023 16:42:29 +0100
changeset 49981 364e78389653
parent 49359 76b4b36cd5d0
permissions -rw-r--r--
rust-ui: refactor ui code for printing narrow/sparse warnings This will be used elsewhere in the code, starting from the next commit.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     1
test merging things outside of the sparse checkout
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     3
  $ hg init myrepo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     4
  $ cd myrepo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     5
  $ cat > .hg/hgrc <<EOF
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     6
  > [extensions]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     7
  > sparse=
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     8
  > EOF
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     9
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    10
  $ echo foo > foo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    11
  $ echo bar > bar
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    12
  $ hg add foo bar
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    13
  $ hg commit -m initial
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    14
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    15
  $ hg branch feature
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    16
  marked working directory as branch feature
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    17
  (branches are permanent and global, did you want a bookmark?)
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    18
  $ echo bar2 >> bar
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    19
  $ hg commit -m 'feature - bar2'
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    20
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    21
  $ hg update -q default
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
    22
  $ hg debugsparse --exclude 'bar**'
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    23
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    24
  $ hg merge feature
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    25
  temporarily included 1 file(s) in the sparse checkout for merging
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    26
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    27
  (branch merge, don't forget to commit)
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    28
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    29
Verify bar was merged temporarily
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    30
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 42565
diff changeset
    31
  $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 42565
diff changeset
    32
  .hg
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    33
  bar
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    34
  foo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    35
  $ hg status
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    36
  M bar
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    37
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    38
Verify bar disappears automatically when the working copy becomes clean
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    39
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    40
  $ hg commit -m "merged"
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    41
  cleaned up 1 temporarily added file(s) from the sparse checkout
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    42
  $ hg status
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 42565
diff changeset
    43
  $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 42565
diff changeset
    44
  .hg
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    45
  foo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    46
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    47
  $ hg cat -r . bar
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    48
  bar
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    49
  bar2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    50
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    51
Test merging things outside of the sparse checkout that are not in the working
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    52
copy
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    53
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    54
  $ hg strip -q -r . --config extensions.strip=
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    55
  $ hg up -q feature
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    56
  $ touch branchonly
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    57
  $ hg ci -Aqm 'add branchonly'
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    58
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    59
  $ hg up -q default
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
    60
  $ hg debugsparse -X branchonly
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    61
  $ hg merge feature
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    62
  temporarily included 2 file(s) in the sparse checkout for merging
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    63
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    64
  (branch merge, don't forget to commit)
38756
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    65
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    66
  $ cd ..
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    67
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    68
Tests merging a file which is modified in one branch and deleted in another and
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    69
file is excluded from sparse checkout
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    70
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    71
  $ hg init ytest
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    72
  $ cd ytest
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    73
  $ echo "syntax: glob" >> .hgignore
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    74
  $ echo "*.orig" >> .hgignore
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    75
  $ hg ci -Aqm "added .hgignore"
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    76
  $ for ch in a d; do echo foo > $ch; hg ci -Aqm "added "$ch; done;
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    77
  $ cat >> .hg/hgrc <<EOF
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    78
  > [alias]
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    79
  > glog = log -GT "{rev}:{node|short} {desc}"
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    80
  > [extensions]
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    81
  > sparse =
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    82
  > EOF
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    83
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    84
  $ hg glog
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    85
  @  2:f29feff37cfc added d
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    86
  |
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    87
  o  1:617125d27d6b added a
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    88
  |
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    89
  o  0:53f3774ed939 added .hgignore
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    90
  
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    91
  $ hg rm d
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    92
  $ hg ci -m "removed d"
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    93
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    94
  $ hg up '.^'
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    95
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    96
  $ hg debugsparse --reset
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    97
  $ echo bar >> d
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    98
  $ hg ci -Am "added bar to d"
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
    99
  created new head
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   100
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   101
  $ hg glog
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   102
  @  4:6527874a90e4 added bar to d
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   103
  |
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   104
  | o  3:372c8558de45 removed d
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   105
  |/
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   106
  o  2:f29feff37cfc added d
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   107
  |
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   108
  o  1:617125d27d6b added a
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   109
  |
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   110
  o  0:53f3774ed939 added .hgignore
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   111
  
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   112
  $ hg debugsparse --exclude "d"
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 42565
diff changeset
   113
  $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 42565
diff changeset
   114
  .hg
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 42565
diff changeset
   115
  .hgignore
38756
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   116
  a
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   117
91c405f84cf7 sparse: add test showing `hg merge` is broken while using sparse extension
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 33293
diff changeset
   118
  $ hg merge
38757
d49e490a9e85 merge: do the trivial resolution after updating sparse checkout
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 38756
diff changeset
   119
  temporarily included 1 file(s) in the sparse checkout for merging
39285
a3fd84f4fb38 filemerge: fix the wrong placements of messages in prompt
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39284
diff changeset
   120
  file 'd' was deleted in other [merge rev] but was modified in local [working copy].
42565
4764e8436b2a filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 39527
diff changeset
   121
  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
4764e8436b2a filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 39527
diff changeset
   122
  What do you want to do? u
38757
d49e490a9e85 merge: do the trivial resolution after updating sparse checkout
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 38756
diff changeset
   123
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
d49e490a9e85 merge: do the trivial resolution after updating sparse checkout
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 38756
diff changeset
   124
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
d49e490a9e85 merge: do the trivial resolution after updating sparse checkout
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 38756
diff changeset
   125
  [1]
39526
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   126
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   127
  $ cd ..
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   128
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   129
Testing merging of a file which is renamed+modified on one side and modified on
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   130
another
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   131
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   132
  $ hg init mvtest
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   133
  $ cd mvtest
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   134
  $ echo "syntax: glob" >> .hgignore
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   135
  $ echo "*.orig" >> .hgignore
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   136
  $ hg ci -Aqm "added .hgignore"
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   137
  $ for ch in a d; do echo foo > $ch; hg ci -Aqm "added "$ch; done;
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   138
  $ cat >> .hg/hgrc <<EOF
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   139
  > [alias]
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   140
  > glog = log -GT "{rev}:{node|short} {desc}"
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   141
  > [extensions]
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   142
  > sparse =
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   143
  > EOF
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   144
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   145
  $ hg glog
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   146
  @  2:f29feff37cfc added d
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   147
  |
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   148
  o  1:617125d27d6b added a
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   149
  |
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   150
  o  0:53f3774ed939 added .hgignore
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   151
  
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   152
  $ echo babar >> a
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   153
  $ hg ci -m "added babar to a"
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   154
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   155
  $ hg up '.^'
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   156
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   157
  $ hg mv a amove
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   158
  $ hg ci -m "moved a to amove"
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   159
  created new head
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   160
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   161
  $ hg up 3
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   162
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   163
  $ hg glog
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   164
  o  4:5d1e85955f6d moved a to amove
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   165
  |
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   166
  | @  3:a06e41a6c16c added babar to a
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   167
  |/
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   168
  o  2:f29feff37cfc added d
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   169
  |
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   170
  o  1:617125d27d6b added a
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   171
  |
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   172
  o  0:53f3774ed939 added .hgignore
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   173
  
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   174
  $ hg debugsparse --exclude "a"
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 42565
diff changeset
   175
  $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 42565
diff changeset
   176
  .hg
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 42565
diff changeset
   177
  .hgignore
39526
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   178
  d
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   179
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   180
  $ hg merge
39527
9db856446298 sparse: add local files to temporaryfiles if they exist out of sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39526
diff changeset
   181
  temporarily included 1 file(s) in the sparse checkout for merging
9db856446298 sparse: add local files to temporaryfiles if they exist out of sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39526
diff changeset
   182
  merging a and amove to amove
9db856446298 sparse: add local files to temporaryfiles if they exist out of sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39526
diff changeset
   183
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9db856446298 sparse: add local files to temporaryfiles if they exist out of sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39526
diff changeset
   184
  (branch merge, don't forget to commit)
49359
76b4b36cd5d0 spares: clarify some test about merging copies
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44724
diff changeset
   185
  $ hg status --copies
76b4b36cd5d0 spares: clarify some test about merging copies
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44724
diff changeset
   186
  M amove
76b4b36cd5d0 spares: clarify some test about merging copies
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44724
diff changeset
   187
    a
76b4b36cd5d0 spares: clarify some test about merging copies
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44724
diff changeset
   188
  R a
39526
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   189
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   190
  $ hg up -C 4
39527
9db856446298 sparse: add local files to temporaryfiles if they exist out of sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39526
diff changeset
   191
  cleaned up 1 temporarily added file(s) from the sparse checkout
39526
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   192
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   193
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   194
  $ hg merge
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   195
  merging amove and a to amove
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   196
  abort: cannot add 'a' - it is outside the sparse checkout
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   197
  (include file with `hg debugsparse --include <pattern>` or use `hg add -s <file>` to include file directory while adding)
c6eb2118f44f tests: show that merging with sparse is broken when rename is involved
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39285
diff changeset
   198
  [255]