tests/test-copytrace-heuristics.t
author Boris Feld <boris.feld@octobus.net>
Fri, 13 Oct 2017 21:50:43 +0200
changeset 34754 a0a727104eed
parent 34567 1b261be2033b
child 34846 f05a6e015ecc
permissions -rw-r--r--
configitem: register the 'notify.changegroup' config
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     1
Test for the heuristic copytracing algorithm
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     2
============================================
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     3
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     4
  $ cat >> $TESTTMP/copytrace.sh << '__EOF__'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     5
  > initclient() {
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     6
  > cat >> $1/.hg/hgrc <<EOF
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     7
  > [experimental]
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     8
  > copytrace = heuristics
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
     9
  > copytrace.sourcecommitlimit = -1
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    10
  > EOF
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    11
  > }
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    12
  > __EOF__
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    13
  $ . "$TESTTMP/copytrace.sh"
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    14
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    15
  $ cat >> $HGRCPATH << EOF
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    16
  > [extensions]
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    17
  > rebase=
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    18
  > shelve=
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    19
  > EOF
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    20
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    21
NOTE: calling initclient() set copytrace.sourcecommitlimit=-1 as we want to
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    22
prevent the full copytrace algorithm to run and test the heuristic algorithm
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    23
without complexing the test cases with public and draft commits.
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    24
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    25
Check filename heuristics (same dirname and same basename)
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    26
----------------------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    27
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    28
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    29
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    30
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    31
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    32
  $ mkdir dir
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    33
  $ echo a > dir/file.txt
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    34
  $ hg addremove
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    35
  adding a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    36
  adding dir/file.txt
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    37
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    38
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    39
  $ hg mv -q dir dir2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    40
  $ hg ci -m 'mv a b, mv dir/ dir2/'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    41
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    42
  $ echo b > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    43
  $ echo b > dir/file.txt
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    44
  $ hg ci -qm 'mod a, mod dir/file.txt'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    45
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    46
  $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    47
  @  changeset: 557f403c0afd2a3cf15d7e2fb1f1001a8b85e081
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    48
  |   desc: mod a, mod dir/file.txt
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    49
  | o  changeset: 928d74bc9110681920854d845c06959f6dfc9547
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    50
  |/    desc: mv a b, mv dir/ dir2/
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    51
  o  changeset: 3c482b16e54596fed340d05ffaf155f156cda7ee
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    52
      desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    53
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    54
  $ hg rebase -s . -d 1
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    55
  rebasing 2:557f403c0afd "mod a, mod dir/file.txt" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    56
  merging b and a to b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    57
  merging dir2/file.txt and dir/file.txt to dir2/file.txt
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    58
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/557f403c0afd-9926eeff-rebase.hg (glob)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    59
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    60
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    61
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    62
Make sure filename heuristics do not when they are not related
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    63
--------------------------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    64
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    65
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    66
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    67
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    68
  $ echo 'somecontent' > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    69
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    70
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    71
  $ hg rm a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    72
  $ echo 'completelydifferentcontext' > b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    73
  $ hg add b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    74
  $ hg ci -m 'rm a, add b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    75
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    76
  $ printf 'somecontent\nmoarcontent' > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    77
  $ hg ci -qm 'mode a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    78
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    79
  $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    80
  @  changeset: d526312210b9e8f795d576a77dc643796384d86e
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    81
  |   desc: mode a
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    82
  | o  changeset: 46985f76c7e5e5123433527f5c8526806145650b
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    83
  |/    desc: rm a, add b
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    84
  o  changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    85
      desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    86
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    87
  $ hg rebase -s . -d 1
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    88
  rebasing 2:d526312210b9 "mode a" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    89
  other [source] changed a which local [dest] deleted
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    90
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    91
  unresolved conflicts (see hg resolve, then hg rebase --continue)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    92
  [1]
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    93
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    94
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    95
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    96
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    97
Test when lca didn't modified the file that was moved
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    98
-----------------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    99
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   100
  $ hg init repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   101
  $ initclient repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   102
  $ cd repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   103
  $ echo 'somecontent' > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   104
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   105
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   106
  $ echo c > c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   107
  $ hg add c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   108
  $ hg ci -m randomcommit
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   109
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   110
  $ hg ci -m 'mv a b'
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   111
  $ hg up -q 1
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   112
  $ echo b > a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   113
  $ hg ci -qm 'mod a'
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   114
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   115
  $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n'
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   116
  @  changeset: 9d5cf99c3d9f8e8b05ba55421f7f56530cfcf3bc
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   117
  |   desc: mod a, phase: draft
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   118
  | o  changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   119
  |/    desc: mv a b, phase: draft
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   120
  o  changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   121
  |   desc: randomcommit, phase: draft
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   122
  o  changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   123
      desc: initial, phase: draft
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   124
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   125
  $ hg rebase -s . -d 2
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   126
  rebasing 3:9d5cf99c3d9f "mod a" (tip)
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   127
  merging b and a to b
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   128
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9d5cf99c3d9f-f02358cc-rebase.hg (glob)
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   129
  $ cd ..
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   130
  $ rm -rf repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   131
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   132
Rebase "backwards"
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   133
------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   134
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   135
  $ hg init repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   136
  $ initclient repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   137
  $ cd repo
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   138
  $ echo 'somecontent' > a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   139
  $ hg add a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   140
  $ hg ci -m initial
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   141
  $ echo c > c
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   142
  $ hg add c
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   143
  $ hg ci -m randomcommit
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   144
  $ hg mv a b
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   145
  $ hg ci -m 'mv a b'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   146
  $ hg up -q 2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   147
  $ echo b > b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   148
  $ hg ci -qm 'mod b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   149
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   150
  $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   151
  @  changeset: fbe97126b3969056795c462a67d93faf13e4d298
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   152
  |   desc: mod b
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   153
  o  changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   154
  |   desc: mv a b
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   155
  o  changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   156
  |   desc: randomcommit
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   157
  o  changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   158
      desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   159
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   160
  $ hg rebase -s . -d 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   161
  rebasing 3:fbe97126b396 "mod b" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   162
  merging a and b to a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   163
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fbe97126b396-cf5452a1-rebase.hg (glob)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   164
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   165
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   166
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   167
Check a few potential move candidates
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   168
-------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   169
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   170
  $ hg init repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   171
  $ initclient repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   172
  $ cd repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   173
  $ mkdir dir
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   174
  $ echo a > dir/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   175
  $ hg add dir/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   176
  $ hg ci -qm initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   177
  $ hg mv dir/a dir/b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   178
  $ hg ci -qm 'mv dir/a dir/b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   179
  $ mkdir dir2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   180
  $ echo b > dir2/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   181
  $ hg add dir2/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   182
  $ hg ci -qm 'create dir2/a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   183
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   184
  $ echo b > dir/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   185
  $ hg ci -qm 'mod dir/a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   186
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   187
  $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   188
  @  changeset: 6b2f4cece40fd320f41229f23821256ffc08efea
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   189
  |   desc: mod dir/a
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   190
  | o  changeset: 4494bf7efd2e0dfdd388e767fb913a8a3731e3fa
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   191
  | |   desc: create dir2/a
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   192
  | o  changeset: b1784dfab6ea6bfafeb11c0ac50a2981b0fe6ade
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   193
  |/    desc: mv dir/a dir/b
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   194
  o  changeset: 36859b8907c513a3a87ae34ba5b1e7eea8c20944
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   195
      desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   196
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   197
  $ hg rebase -s . -d 2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   198
  rebasing 3:6b2f4cece40f "mod dir/a" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   199
  merging dir/b and dir/a to dir/b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   200
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/6b2f4cece40f-503efe60-rebase.hg (glob)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   201
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   202
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   203
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   204
Move file in one branch and delete it in another
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   205
-----------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   206
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   207
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   208
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   209
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   210
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   211
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   212
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   213
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   214
  $ hg ci -m 'mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   215
  $ hg up -q ".^"
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   216
  $ hg rm a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   217
  $ hg ci -m 'del a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   218
  created new head
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   219
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   220
  $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   221
  @  changeset: 7d61ee3b1e48577891a072024968428ba465c47b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   222
  |   desc: del a, phase: draft
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   223
  | o  changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   224
  |/    desc: mv a b, phase: draft
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   225
  o  changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   226
      desc: initial, phase: draft
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   227
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   228
  $ hg rebase -s 1 -d 2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   229
  rebasing 1:472e38d57782 "mv a b"
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   230
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-17d50e29-rebase.hg (glob)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   231
  $ hg up -q c492ed3c7e35dcd1dc938053b8adf56e2cfbd062
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   232
  $ ls
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   233
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   234
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   235
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   236
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   237
Move a directory in draft branch
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   238
--------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   239
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   240
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   241
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   242
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   243
  $ mkdir dir
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   244
  $ echo a > dir/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   245
  $ hg add dir/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   246
  $ hg ci -qm initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   247
  $ echo b > dir/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   248
  $ hg ci -qm 'mod dir/a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   249
  $ hg up -q ".^"
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   250
  $ hg mv -q dir/ dir2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   251
  $ hg ci -qm 'mv dir/ dir2/'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   252
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   253
  $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   254
  @  changeset: a33d80b6e352591dfd82784e1ad6cdd86b25a239
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   255
  |   desc: mv dir/ dir2/
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   256
  | o  changeset: 6b2f4cece40fd320f41229f23821256ffc08efea
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   257
  |/    desc: mod dir/a
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   258
  o  changeset: 36859b8907c513a3a87ae34ba5b1e7eea8c20944
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   259
      desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   260
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   261
  $ hg rebase -s . -d 1
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   262
  rebasing 2:a33d80b6e352 "mv dir/ dir2/" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   263
  merging dir/a and dir2/a to dir2/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   264
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a33d80b6e352-fecb9ada-rebase.hg (glob)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   265
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   266
  $ rm -rf server
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   267
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   268
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   269
Move file twice and rebase mod on top of moves
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   270
----------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   271
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   272
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   273
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   274
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   275
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   276
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   277
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   278
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   279
  $ hg ci -m 'mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   280
  $ hg mv b c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   281
  $ hg ci -m 'mv b c'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   282
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   283
  $ echo c > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   284
  $ hg ci -m 'mod a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   285
  created new head
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   286
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   287
  $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   288
  @  changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   289
  |   desc: mod a
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   290
  | o  changeset: d3efd280421d24f9f229997c19e654761c942a71
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   291
  | |   desc: mv b c
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   292
  | o  changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   293
  |/    desc: mv a b
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   294
  o  changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   295
      desc: initial
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   296
  $ hg rebase -s . -d 2
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   297
  rebasing 3:d41316942216 "mod a" (tip)
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   298
  merging c and a to c
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   299
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d41316942216-2b5949bc-rebase.hg (glob)
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   300
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   301
  $ cd ..
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   302
  $ rm -rf repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   303
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   304
Move file twice and rebase moves on top of mods
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   305
-----------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   306
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   307
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   308
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   309
  $ cd repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   310
  $ echo a > a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   311
  $ hg add a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   312
  $ hg ci -m initial
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   313
  $ hg mv a b
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   314
  $ hg ci -m 'mv a b'
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   315
  $ hg mv b c
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   316
  $ hg ci -m 'mv b c'
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   317
  $ hg up -q 0
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   318
  $ echo c > a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   319
  $ hg ci -m 'mod a'
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   320
  created new head
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   321
  $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   322
  @  changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   323
  |   desc: mod a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   324
  | o  changeset: d3efd280421d24f9f229997c19e654761c942a71
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   325
  | |   desc: mv b c
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   326
  | o  changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   327
  |/    desc: mv a b
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   328
  o  changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   329
      desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   330
  $ hg rebase -s 1 -d .
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   331
  rebasing 1:472e38d57782 "mv a b"
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   332
  merging a and b to b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   333
  rebasing 2:d3efd280421d "mv b c"
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   334
  merging b and c to c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   335
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-ab8d3c58-rebase.hg (glob)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   336
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   337
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   338
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   339
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   340
Move one file and add another file in the same folder in one branch, modify file in another branch
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   341
--------------------------------------------------------------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   342
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   343
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   344
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   345
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   346
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   347
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   348
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   349
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   350
  $ hg ci -m 'mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   351
  $ echo c > c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   352
  $ hg add c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   353
  $ hg ci -m 'add c'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   354
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   355
  $ echo b > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   356
  $ hg ci -m 'mod a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   357
  created new head
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   358
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   359
  $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   360
  @  changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   361
  |   desc: mod a
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   362
  | o  changeset: b1a6187e79fbce851bb584eadcb0cc4a80290fd9
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   363
  | |   desc: add c
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   364
  | o  changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   365
  |/    desc: mv a b
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   366
  o  changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   367
      desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   368
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   369
  $ hg rebase -s . -d 2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   370
  rebasing 3:ef716627c70b "mod a" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   371
  merging b and a to b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   372
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg (glob)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   373
  $ ls
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   374
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   375
  c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   376
  $ cat b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   377
  b
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   378
  $ rm -rf repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   379
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   380
Merge test
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   381
----------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   382
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   383
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   384
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   385
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   386
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   387
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   388
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   389
  $ echo b > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   390
  $ hg ci -m 'modify a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   391
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   392
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   393
  $ hg ci -m 'mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   394
  created new head
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   395
  $ hg up -q 2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   396
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   397
  $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   398
  @  changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   399
  |   desc: mv a b
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   400
  | o  changeset: b0357b07f79129a3d08a68621271ca1352ae8a09
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   401
  |/    desc: modify a
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   402
  o  changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   403
      desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   404
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   405
  $ hg merge 1
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   406
  merging b and a to b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   407
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   408
  (branch merge, don't forget to commit)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   409
  $ hg ci -m merge
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   410
  $ ls
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   411
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   412
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   413
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   414
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   415
Copy and move file
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   416
------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   417
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   418
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   419
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   420
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   421
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   422
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   423
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   424
  $ hg cp a c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   425
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   426
  $ hg ci -m 'cp a c, mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   427
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   428
  $ echo b > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   429
  $ hg ci -m 'mod a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   430
  created new head
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   431
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   432
  $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   433
  @  changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   434
  |   desc: mod a
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   435
  | o  changeset: 4fc3fd13fbdb89ada6b75bfcef3911a689a0dde8
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   436
  |/    desc: cp a c, mv a b
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   437
  o  changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   438
      desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   439
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   440
  $ hg rebase -s . -d 1
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   441
  rebasing 2:ef716627c70b "mod a" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   442
  merging b and a to b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   443
  merging c and a to c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   444
  saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg (glob)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   445
  $ ls
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   446
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   447
  c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   448
  $ cat b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   449
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   450
  $ cat c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   451
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   452
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   453
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   454
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   455
Do a merge commit with many consequent moves in one branch
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   456
----------------------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   457
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   458
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   459
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   460
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   461
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   462
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   463
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   464
  $ echo b > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   465
  $ hg ci -qm 'mod a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   466
  $ hg up -q ".^"
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   467
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   468
  $ hg ci -qm 'mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   469
  $ hg mv b c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   470
  $ hg ci -qm 'mv b c'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   471
  $ hg up -q 1
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   472
  $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   473
  o  changeset: d3efd280421d24f9f229997c19e654761c942a71
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   474
  |   desc: mv b c
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   475
  o  changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   476
  |   desc: mv a b
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   477
  | @  changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   478
  |/    desc: mod a
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   479
  o  changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   480
      desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   481
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   482
  $ hg merge 3
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   483
  merging a and c to c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   484
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   485
  (branch merge, don't forget to commit)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   486
  $ hg ci -qm 'merge'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   487
  $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   488
  @    changeset: cd29b0d08c0f39bfed4cde1b40e30f419db0c825
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   489
  |\    desc: merge, phase: draft
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   490
  | o  changeset: d3efd280421d24f9f229997c19e654761c942a71
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   491
  | |   desc: mv b c, phase: draft
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   492
  | o  changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   493
  | |   desc: mv a b, phase: draft
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   494
  o |  changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   495
  |/    desc: mod a, phase: draft
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   496
  o  changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   497
      desc: initial, phase: draft
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   498
  $ ls
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   499
  c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   500
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   501
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   502
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   503
Test shelve/unshelve
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   504
-------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   505
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   506
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   507
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   508
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   509
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   510
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   511
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   512
  $ echo b > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   513
  $ hg shelve
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   514
  shelved as default
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   515
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   516
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   517
  $ hg ci -m 'mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   518
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   519
  $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   520
  @  changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   521
  |   desc: mv a b
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   522
  o  changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   523
      desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   524
  $ hg unshelve
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   525
  unshelving change 'default'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   526
  rebasing shelved changes
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   527
  rebasing 2:45f63161acea "changes to: initial" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   528
  merging b and a to b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   529
  $ ls
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   530
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   531
  $ cat b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   532
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   533
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   534
  $ rm -rf repo
34288
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   535
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   536
Test full copytrace ability on draft branch
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   537
-------------------------------------------
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   538
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   539
File directory and base name changed in same move
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   540
  $ hg init repo
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   541
  $ initclient repo
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   542
  $ mkdir repo/dir1
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   543
  $ cd repo/dir1
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   544
  $ echo a > a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   545
  $ hg add a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   546
  $ hg ci -qm initial
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   547
  $ cd ..
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   548
  $ hg mv -q dir1 dir2
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   549
  $ hg mv dir2/a dir2/b
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   550
  $ hg ci -qm 'mv a b; mv dir1 dir2'
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   551
  $ hg up -q '.^'
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   552
  $ cd dir1
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   553
  $ echo b >> a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   554
  $ cd ..
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   555
  $ hg ci -qm 'mod a'
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   556
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   557
  $ hg log -G -T 'changeset {node}\n desc {desc}, phase: {phase}\n'
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   558
  @  changeset 6207d2d318e710b882e3d5ada2a89770efc42c96
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   559
  |   desc mod a, phase: draft
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   560
  | o  changeset abffdd4e3dfc04bc375034b970299b2a309a1cce
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   561
  |/    desc mv a b; mv dir1 dir2, phase: draft
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   562
  o  changeset 81973cd24b58db2fdf18ce3d64fb2cc3284e9ab3
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   563
      desc initial, phase: draft
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   564
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   565
  $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100
34288
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   566
  rebasing 2:6207d2d318e7 "mod a" (tip)
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   567
  merging dir2/b and dir1/a to dir2/b
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   568
  saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/6207d2d318e7-1c9779ad-rebase.hg (glob)
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   569
  $ cat dir2/b
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   570
  a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   571
  b
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   572
  $ cd ..
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   573
  $ rm -rf repo
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   574
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   575
Move directory in one merge parent, while adding file to original directory
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   576
in other merge parent. File moved on rebase.
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   577
34288
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   578
  $ hg init repo
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   579
  $ initclient repo
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   580
  $ mkdir repo/dir1
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   581
  $ cd repo/dir1
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   582
  $ echo dummy > dummy
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   583
  $ hg add dummy
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   584
  $ cd ..
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   585
  $ hg ci -qm initial
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   586
  $ cd dir1
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   587
  $ echo a > a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   588
  $ hg add a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   589
  $ cd ..
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   590
  $ hg ci -qm 'hg add dir1/a'
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   591
  $ hg up -q '.^'
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   592
  $ hg mv -q dir1 dir2
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   593
  $ hg ci -qm 'mv dir1 dir2'
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   594
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   595
  $ hg log -G -T 'changeset {node}\n desc {desc}, phase: {phase}\n'
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   596
  @  changeset e8919e7df8d036e07b906045eddcd4a42ff1915f
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   597
  |   desc mv dir1 dir2, phase: draft
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   598
  | o  changeset 7c7c6f339be00f849c3cb2df738ca91db78b32c8
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   599
  |/    desc hg add dir1/a, phase: draft
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   600
  o  changeset a235dcce55dcf42034c4e374cb200662d0bb4a13
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   601
      desc initial, phase: draft
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   602
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   603
  $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100
34288
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   604
  rebasing 2:e8919e7df8d0 "mv dir1 dir2" (tip)
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   605
  saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/e8919e7df8d0-f62fab62-rebase.hg (glob)
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   606
  $ ls dir2
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   607
  a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   608
  dummy
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   609
  $ rm -rf repo
34311
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   610
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   611
Testing the sourcecommitlimit config
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   612
-----------------------------------
34311
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   613
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   614
  $ hg init repo
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   615
  $ initclient repo
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   616
  $ cd repo
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   617
  $ echo a > a
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   618
  $ hg ci -Aqm "added a"
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   619
  $ echo "more things" >> a
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   620
  $ hg ci -qm "added more things to a"
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   621
  $ hg up 0
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   622
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   623
  $ echo b > b
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   624
  $ hg ci -Aqm "added b"
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   625
  $ mkdir foo
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   626
  $ hg mv a foo/bar
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   627
  $ hg ci -m "Moved a to foo/bar"
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   628
  $ hg log -G -T 'changeset {node}\n desc {desc}, phase: {phase}\n'
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   629
  @  changeset b4b0f7880e500b5c364a5f07b4a2b167de7a6fb0
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   630
  |   desc Moved a to foo/bar, phase: draft
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   631
  o  changeset 5f6d8a4bf34ab274ccc9f631c2536964b8a3666d
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   632
  |   desc added b, phase: draft
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   633
  | o  changeset 8b6e13696c38e8445a759516474640c2f8dddef6
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   634
  |/    desc added more things to a, phase: draft
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   635
  o  changeset 9092f1db7931481f93b37d5c9fbcfc341bcd7318
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   636
      desc added a, phase: draft
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   637
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   638
When the sourcecommitlimit is small and we have more drafts, we use heuristics only
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   639
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   640
  $ hg rebase -s 8b6e13696 -d .
34311
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   641
  rebasing 1:8b6e13696c38 "added more things to a"
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   642
  other [source] changed a which local [dest] deleted
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   643
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   644
  unresolved conflicts (see hg resolve, then hg rebase --continue)
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   645
  [1]
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   646
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   647
But when we have "sourcecommitlimit > (no. of drafts from base to c1)", we do
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   648
fullcopytracing
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   649
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   650
  $ hg rebase --abort
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   651
  rebase aborted
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   652
  $ hg rebase -s 8b6e13696 -d . --config experimental.copytrace.sourcecommitlimit=100
34311
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   653
  rebasing 1:8b6e13696c38 "added more things to a"
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   654
  merging foo/bar and a to foo/bar
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   655
  saved backup bundle to $TESTTMP/repo/repo/repo/.hg/strip-backup/8b6e13696c38-fc14ac83-rebase.hg (glob)
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   656
  $ cd ..
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   657
  $ rm -rf repo