tests/test-origbackup-conflict.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 16 Apr 2019 17:26:38 +0200
changeset 42159 4f9a89837f07
parent 40230 0b46e1aa7760
child 42343 d8e55c0c642c
permissions -rw-r--r--
setdiscovery: stop limiting the number of local head we initially send In our testing this limitation provides now real gain and instead triggers pathological discovery timing for some repository with many heads. See inline documentation for details. Some timing below: Mozilla try repository, (~1M revs, ~35K heads), discovery between 2 clones with 100 head missing on each side before: ! wall 1.492111 comb 1.490000 user 1.450000 sys 0.040000 (best of 20) ! wall 1.813992 comb 1.820000 user 1.700000 sys 0.120000 (max of 20) ! wall 1.574326 comb 1.573500 user 1.522000 sys 0.051500 (avg of 20) ! wall 1.572583 comb 1.570000 user 1.520000 sys 0.050000 (median of 20) after: ! wall 1.147834 comb 1.150000 user 1.090000 sys 0.060000 (best of 20) ! wall 1.449144 comb 1.450000 user 1.330000 sys 0.120000 (max of 20) ! wall 1.204618 comb 1.202500 user 1.146500 sys 0.056000 (avg of 20) ! wall 1.194407 comb 1.190000 user 1.140000 sys 0.050000 (median of 20) pypy (~100 heads, 317 heads) discovery between clones with only 42 common heads before: ! wall 0.031653 comb 0.030000 user 0.030000 sys 0.000000 (best of 25) ! wall 0.055719 comb 0.050000 user 0.040000 sys 0.010000 (max of 25) ! wall 0.038939 comb 0.039600 user 0.038400 sys 0.001200 (avg of 25) ! wall 0.038660 comb 0.050000 user 0.040000 sys 0.010000 (median of 25) after: ! wall 0.018754 comb 0.020000 user 0.020000 sys 0.000000 (best of 49) ! wall 0.034505 comb 0.040000 user 0.030000 sys 0.010000 (max of 49) ! wall 0.019631 comb 0.019796 user 0.018367 sys 0.001429 (avg of 49) ! wall 0.019132 comb 0.020000 user 0.020000 sys 0.000000 (median of 49) Private repository (~1M revs, ~3K heads), discovery from a strip subset, about 100 changesets to be pulled. before: ! wall 1.837729 comb 1.840000 user 1.790000 sys 0.050000 (best of 20) ! wall 2.203468 comb 2.200000 user 2.100000 sys 0.100000 (max of 20) ! wall 2.049355 comb 2.048500 user 2.002500 sys 0.046000 (avg of 20) ! wall 2.035315 comb 2.040000 user 2.000000 sys 0.040000 (median of 20) after: ! wall 0.136598 comb 0.130000 user 0.110000 sys 0.020000 (best of 20) ! wall 0.330519 comb 0.330000 user 0.260000 sys 0.070000 (max of 20) ! wall 0.157254 comb 0.155500 user 0.123000 sys 0.032500 (avg of 20) ! wall 0.149870 comb 0.140000 user 0.110000 sys 0.030000 (median of 20) Same private repo, discovery between two clone with 500 different heads on each side: before: ! wall 2.372919 comb 2.370000 user 2.320000 sys 0.050000 (best of 20) ! wall 2.622422 comb 2.610000 user 2.510000 sys 0.100000 (max of 20) ! wall 2.450135 comb 2.450000 user 2.402000 sys 0.048000 (avg of 20) ! wall 2.443896 comb 2.450000 user 2.410000 sys 0.040000 (median of 20) after: ! wall 0.625497 comb 0.620000 user 0.570000 sys 0.050000 (best of 20) ! wall 0.834723 comb 0.820000 user 0.730000 sys 0.090000 (max of 20) ! wall 0.675725 comb 0.675500 user 0.628000 sys 0.047500 (avg of 20) ! wall 0.671614 comb 0.680000 user 0.640000 sys 0.040000 (median of 20)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     1
Set up repo
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     2
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     3
  $ cat << EOF >> $HGRCPATH
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     4
  > [ui]
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     5
  > origbackuppath=.hg/origbackups
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     6
  > [merge]
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     7
  > checkunknown=warn
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     8
  > EOF
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     9
  $ hg init repo
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    10
  $ cd repo
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    11
  $ echo base > base
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    12
  $ hg add base
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    13
  $ hg commit -m "base"
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    14
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    15
Make a dir named b that contains a file, and a file named d
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    16
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    17
  $ mkdir -p b
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    18
  $ echo c1 > b/c
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    19
  $ echo d1 > d
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    20
  $ hg add b/c d
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    21
  $ hg commit -m "c1"
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    22
  $ hg bookmark c1
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    23
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    24
Peform an update that causes b/c to be backed up
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    25
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    26
  $ hg up -q 0
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    27
  $ mkdir -p b
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    28
  $ echo c2 > b/c
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    29
  $ hg up --verbose c1
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    30
  resolving manifests
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    31
  b/c: replacing untracked file
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    32
  getting b/c
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35231
diff changeset
    33
  creating directory: $TESTTMP/repo/.hg/origbackups/b
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    34
  getting d
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    35
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    36
  (activating bookmark c1)
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    37
  $ test -f .hg/origbackups/b/c
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    38
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    39
Make files named b and d
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    40
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    41
  $ hg up -q 0
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    42
  $ echo b1 > b
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    43
  $ echo d2 > d
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    44
  $ hg add b d
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    45
  $ hg commit -m b1
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    46
  created new head
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    47
  $ hg bookmark b1
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    48
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    49
Perform an update that causes b to be backed up - it should replace the backup b dir
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    50
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    51
  $ hg up -q 0
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    52
  $ echo b2 > b
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    53
  $ hg up --verbose b1
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    54
  resolving manifests
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    55
  b: replacing untracked file
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    56
  getting b
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35231
diff changeset
    57
  removing conflicting directory: $TESTTMP/repo/.hg/origbackups/b
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    58
  getting d
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    59
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    60
  (activating bookmark b1)
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    61
  $ test -f .hg/origbackups/b
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    62
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    63
Perform an update the causes b/c to be backed up again - it should replace the backup b file
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    64
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    65
  $ hg up -q 0
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    66
  $ mkdir b
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    67
  $ echo c3 > b/c
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    68
  $ hg up --verbose c1
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    69
  resolving manifests
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    70
  b/c: replacing untracked file
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    71
  getting b/c
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35231
diff changeset
    72
  creating directory: $TESTTMP/repo/.hg/origbackups/b
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35231
diff changeset
    73
  removing conflicting file: $TESTTMP/repo/.hg/origbackups/b
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    74
  getting d
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    75
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    76
  (activating bookmark c1)
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    77
  $ test -d .hg/origbackups/b
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    78
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    79
Cause two symlinks to be backed up that points to a valid location from the backup dir
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    80
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    81
  $ hg up -q 0
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    82
  $ mkdir ../sym-link-target
34691
857fc3313f7b test-conflicts: conditionalize for no-symlink platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 34570
diff changeset
    83
#if symlink
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    84
  $ ln -s ../../../sym-link-target b
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    85
  $ ln -s ../../../sym-link-target d
34691
857fc3313f7b test-conflicts: conditionalize for no-symlink platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 34570
diff changeset
    86
#else
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    87
  $ touch b d
34691
857fc3313f7b test-conflicts: conditionalize for no-symlink platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 34570
diff changeset
    88
#endif
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    89
  $ hg up b1
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    90
  b: replacing untracked file
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    91
  d: replacing untracked file
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    92
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    93
  (activating bookmark b1)
34691
857fc3313f7b test-conflicts: conditionalize for no-symlink platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 34570
diff changeset
    94
#if symlink
34570
dbb2027f4974 tests: use readlink.py instead of readlink
Augie Fackler <augie@google.com>
parents: 34543
diff changeset
    95
  $ readlink.py .hg/origbackups/b
dbb2027f4974 tests: use readlink.py instead of readlink
Augie Fackler <augie@google.com>
parents: 34543
diff changeset
    96
  .hg/origbackups/b -> ../../../sym-link-target
34691
857fc3313f7b test-conflicts: conditionalize for no-symlink platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 34570
diff changeset
    97
#endif
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    98
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
    99
Perform an update that causes b/c and d to be backed up again - b/c should not go into the target dir
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   100
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   101
  $ hg up -q 0
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   102
  $ mkdir b
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   103
  $ echo c4 > b/c
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
   104
  $ echo d3 > d
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   105
  $ hg up --verbose c1
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   106
  resolving manifests
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   107
  b/c: replacing untracked file
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
   108
  d: replacing untracked file
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   109
  getting b/c
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35231
diff changeset
   110
  creating directory: $TESTTMP/repo/.hg/origbackups/b
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35231
diff changeset
   111
  removing conflicting file: $TESTTMP/repo/.hg/origbackups/b
35008
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
   112
  getting d
ad671b4cb9fc tests: add a test demonstrating issue5731
Mark Thomas <mbthomas@fb.com>
parents: 34692
diff changeset
   113
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   114
  (activating bookmark c1)
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   115
  $ cat .hg/origbackups/b/c
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   116
  c4
35009
99ab7bc944d2 scmutil: don't try to delete origbackup symlinks to directories (issue5731)
Mark Thomas <mbthomas@fb.com>
parents: 35008
diff changeset
   117
  $ cat .hg/origbackups/d
99ab7bc944d2 scmutil: don't try to delete origbackup symlinks to directories (issue5731)
Mark Thomas <mbthomas@fb.com>
parents: 35008
diff changeset
   118
  d3
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   119
  $ ls ../sym-link-target
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   120
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   121
Incorrectly configure origbackuppath to be under a file
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   122
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   123
  $ echo data > .hg/badorigbackups
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   124
  $ hg up -q 0
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   125
  $ mkdir b
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   126
  $ echo c5 > b/c
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   127
  $ hg up --verbose c1 --config ui.origbackuppath=.hg/badorigbackups
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   128
  resolving manifests
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   129
  b/c: replacing untracked file
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   130
  getting b/c
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35231
diff changeset
   131
  creating directory: $TESTTMP/repo/.hg/badorigbackups/b
40230
0b46e1aa7760 py3: add some glob to make output compatible with python 3
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 35393
diff changeset
   132
  abort: $ENOTDIR$: *$TESTTMP/repo/.hg/badorigbackups/b* (glob)
34543
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   133
  [255]
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   134
  $ cat .hg/badorigbackups
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   135
  data
6fad8059a970 scmutil: handle conflicting files and dirs in origbackuppath
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
   136