tests/test-copytrace-heuristics.t
author Denis Laxalde <denis.laxalde@logilab.fr>
Fri, 25 Oct 2019 14:02:40 +0200
branchstable
changeset 43332 8fda98a68427
parent 42565 4764e8436b2a
child 44724 5c2a4f37eace
permissions -rw-r--r--
packaging: remove version info from Breaks+Replaces in Debian package The versioned Breaks: and Replaces: cause problem when trying to install our package over the one in Debian. $ sudo apt install ./packages/debian-buster/mercurial_5.2~rc0+15-buster-a2ff3aff81d2_amd64.deb Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'mercurial' instead of './packages/debian-buster/mercurial_5.2~rc0+15-buster-a2ff3aff81d2_amd64.deb' Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: mercurial : Breaks: mercurial-common (< 5.2~rc0+15-buster-a2ff3aff81d2) but 5.2~rc0-1 is to be installed E: Unable to correct problems, you have held broken packages. Removing version information resolves the situation.
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=
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
    18
  > [alias]
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    19
  > l = log -G -T 'rev: {rev}\ndesc: {desc}\n'
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    20
  > pl = log -G -T 'rev: {rev}, phase: {phase}\ndesc: {desc}\n'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    21
  > EOF
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    22
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    23
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
    24
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
    25
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
    26
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    27
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
    28
----------------------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    29
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    30
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    31
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    32
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    33
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    34
  $ mkdir dir
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    35
  $ echo a > dir/file.txt
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    36
  $ hg addremove
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    37
  adding a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    38
  adding dir/file.txt
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    39
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    40
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    41
  $ hg mv -q dir dir2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    42
  $ 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
    43
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    44
  $ echo b > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    45
  $ echo b > dir/file.txt
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    46
  $ 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
    47
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
    48
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    49
  @  rev: 2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    50
  |  desc: mod a, mod dir/file.txt
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    51
  | o  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    52
  |/   desc: mv a b, mv dir/ dir2/
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    53
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    54
     desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    55
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    56
  $ hg rebase -s . -d 1
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    57
  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
    58
  merging b and a to b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    59
  merging dir2/file.txt and dir/file.txt to dir2/file.txt
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
    60
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/557f403c0afd-9926eeff-rebase.hg
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    61
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    62
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    63
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    64
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
    65
--------------------------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    66
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    67
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    68
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
    69
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    70
  $ echo 'somecontent' > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    71
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    72
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    73
  $ hg rm a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    74
  $ echo 'completelydifferentcontext' > b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    75
  $ hg add b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    76
  $ hg ci -m 'rm a, add b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    77
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    78
  $ printf 'somecontent\nmoarcontent' > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    79
  $ hg ci -qm 'mode a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    80
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
    81
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    82
  @  rev: 2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    83
  |  desc: mode a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    84
  | o  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    85
  |/   desc: rm a, add b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    86
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
    87
     desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    88
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    89
  $ hg rebase -s . -d 1
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    90
  rebasing 2:d526312210b9 "mode a" (tip)
39285
a3fd84f4fb38 filemerge: fix the wrong placements of messages in prompt
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39284
diff changeset
    91
  file 'a' was deleted in local [dest] but was modified in other [source].
42565
4764e8436b2a filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
    92
  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
4764e8436b2a filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
    93
  What do you want to do? u
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    94
  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
    95
  [1]
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
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    98
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    99
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   100
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
   101
-----------------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   102
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   103
  $ hg init repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   104
  $ initclient repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   105
  $ cd repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   106
  $ echo 'somecontent' > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   107
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   108
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   109
  $ echo c > c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   110
  $ hg add c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   111
  $ hg ci -m randomcommit
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   112
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   113
  $ hg ci -m 'mv a b'
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   114
  $ hg up -q 1
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   115
  $ echo b > a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   116
  $ hg ci -qm 'mod a'
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   117
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   118
  $ hg pl
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   119
  @  rev: 3, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   120
  |  desc: mod a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   121
  | o  rev: 2, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   122
  |/   desc: mv a b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   123
  o  rev: 1, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   124
  |  desc: randomcommit
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   125
  o  rev: 0, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   126
     desc: initial
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   127
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   128
  $ hg rebase -s . -d 2
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   129
  rebasing 3:9d5cf99c3d9f "mod a" (tip)
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   130
  merging b and a to b
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   131
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9d5cf99c3d9f-f02358cc-rebase.hg
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   132
  $ cd ..
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   133
  $ rm -rf repo
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
Rebase "backwards"
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   136
------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   137
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   138
  $ hg init repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   139
  $ initclient repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   140
  $ cd repo
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   141
  $ echo 'somecontent' > a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   142
  $ hg add a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   143
  $ hg ci -m initial
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   144
  $ echo c > c
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   145
  $ hg add c
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   146
  $ hg ci -m randomcommit
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   147
  $ hg mv a b
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   148
  $ hg ci -m 'mv a b'
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   149
  $ hg up -q 2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   150
  $ echo b > b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   151
  $ hg ci -qm 'mod b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   152
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   153
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   154
  @  rev: 3
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   155
  |  desc: mod b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   156
  o  rev: 2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   157
  |  desc: mv a b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   158
  o  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   159
  |  desc: randomcommit
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   160
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   161
     desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   162
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   163
  $ hg rebase -s . -d 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   164
  rebasing 3:fbe97126b396 "mod b" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   165
  merging a and b to a
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   166
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fbe97126b396-cf5452a1-rebase.hg
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   167
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   168
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   169
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   170
Check a few potential move candidates
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   171
-------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   172
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   173
  $ hg init repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   174
  $ initclient repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   175
  $ cd repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   176
  $ mkdir dir
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   177
  $ echo a > dir/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   178
  $ hg add dir/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   179
  $ hg ci -qm initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   180
  $ hg mv dir/a dir/b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   181
  $ 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
   182
  $ mkdir dir2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   183
  $ echo b > dir2/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   184
  $ hg add dir2/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   185
  $ hg ci -qm 'create dir2/a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   186
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   187
  $ echo b > dir/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   188
  $ hg ci -qm 'mod dir/a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   189
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   190
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   191
  @  rev: 3
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   192
  |  desc: mod dir/a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   193
  | o  rev: 2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   194
  | |  desc: create dir2/a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   195
  | o  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   196
  |/   desc: mv dir/a dir/b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   197
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   198
     desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   199
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   200
  $ hg rebase -s . -d 2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   201
  rebasing 3:6b2f4cece40f "mod dir/a" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   202
  merging dir/b and dir/a to dir/b
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   203
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/6b2f4cece40f-503efe60-rebase.hg
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   204
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   205
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   206
34846
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   207
Test the copytrace.movecandidateslimit with many move candidates
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   208
----------------------------------------------------------------
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   209
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   210
  $ hg init repo
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   211
  $ initclient repo
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   212
  $ cd repo
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   213
  $ echo a > a
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   214
  $ hg add a
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   215
  $ hg ci -m initial
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   216
  $ hg mv a foo
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   217
  $ echo a > b
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   218
  $ echo a > c
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   219
  $ echo a > d
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   220
  $ echo a > e
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   221
  $ echo a > f
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   222
  $ echo a > g
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   223
  $ hg add b
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   224
  $ hg add c
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   225
  $ hg add d
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   226
  $ hg add e
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   227
  $ hg add f
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   228
  $ hg add g
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   229
  $ hg ci -m 'mv a foo, add many files'
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   230
  $ hg up -q ".^"
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   231
  $ echo b > a
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   232
  $ hg ci -m 'mod a'
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   233
  created new head
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   234
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   235
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   236
  @  rev: 2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   237
  |  desc: mod a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   238
  | o  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   239
  |/   desc: mv a foo, add many files
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   240
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   241
     desc: initial
34846
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   242
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   243
With small limit
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   244
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   245
  $ hg rebase -s 2 -d 1 --config experimental.copytrace.movecandidateslimit=0
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   246
  rebasing 2:ef716627c70b "mod a" (tip)
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   247
  skipping copytracing for 'a', more candidates than the limit: 7
39285
a3fd84f4fb38 filemerge: fix the wrong placements of messages in prompt
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39284
diff changeset
   248
  file 'a' was deleted in local [dest] but was modified in other [source].
42565
4764e8436b2a filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
   249
  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
4764e8436b2a filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
   250
  What do you want to do? u
34846
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   251
  unresolved conflicts (see hg resolve, then hg rebase --continue)
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   252
  [1]
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   253
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   254
  $ hg rebase --abort
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   255
  rebase aborted
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   256
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   257
With default limit which is 100
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   258
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   259
  $ hg rebase -s 2 -d 1
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   260
  rebasing 2:ef716627c70b "mod a" (tip)
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   261
  merging foo and a to foo
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   262
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
34846
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   263
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   264
  $ cd ..
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   265
  $ rm -rf repo
f05a6e015ecc copies: add a config to limit the number of candidates to check in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34567
diff changeset
   266
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   267
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
   268
-----------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   269
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   270
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   271
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   272
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   273
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   274
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   275
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   276
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   277
  $ hg ci -m 'mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   278
  $ hg up -q ".^"
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   279
  $ hg rm a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   280
  $ hg ci -m 'del a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   281
  created new head
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   282
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   283
  $ hg pl
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   284
  @  rev: 2, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   285
  |  desc: del a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   286
  | o  rev: 1, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   287
  |/   desc: mv a b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   288
  o  rev: 0, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   289
     desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   290
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   291
  $ hg rebase -s 1 -d 2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   292
  rebasing 1:472e38d57782 "mv a b"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   293
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-17d50e29-rebase.hg
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   294
  $ hg up -q c492ed3c7e35dcd1dc938053b8adf56e2cfbd062
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   295
  $ ls
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   296
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   297
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   298
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   299
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   300
Move a directory in draft branch
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   301
--------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   302
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   303
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   304
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   305
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   306
  $ mkdir dir
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   307
  $ echo a > dir/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   308
  $ hg add dir/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   309
  $ hg ci -qm initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   310
  $ echo b > dir/a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   311
  $ hg ci -qm 'mod dir/a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   312
  $ hg up -q ".^"
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   313
  $ hg mv -q dir/ dir2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   314
  $ hg ci -qm 'mv dir/ dir2/'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   315
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   316
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   317
  @  rev: 2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   318
  |  desc: mv dir/ dir2/
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   319
  | o  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   320
  |/   desc: mod dir/a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   321
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   322
     desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   323
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   324
  $ hg rebase -s . -d 1
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   325
  rebasing 2:a33d80b6e352 "mv dir/ dir2/" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   326
  merging dir/a and dir2/a to dir2/a
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   327
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a33d80b6e352-fecb9ada-rebase.hg
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   328
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   329
  $ rm -rf server
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   330
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   331
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   332
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
   333
----------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   334
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   335
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   336
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   337
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   338
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   339
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   340
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   341
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   342
  $ hg ci -m 'mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   343
  $ hg mv b c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   344
  $ hg ci -m 'mv b c'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   345
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   346
  $ echo c > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   347
  $ hg ci -m 'mod a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   348
  created new head
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   349
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   350
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   351
  @  rev: 3
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   352
  |  desc: mod a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   353
  | o  rev: 2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   354
  | |  desc: mv b c
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   355
  | o  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   356
  |/   desc: mv a b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   357
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   358
     desc: initial
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   359
  $ hg rebase -s . -d 2
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   360
  rebasing 3:d41316942216 "mod a" (tip)
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   361
  merging c and a to c
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   362
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d41316942216-2b5949bc-rebase.hg
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   363
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   364
  $ cd ..
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   365
  $ rm -rf repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   366
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   367
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
   368
-----------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   369
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   370
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   371
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   372
  $ cd repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   373
  $ echo a > a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   374
  $ hg add a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   375
  $ hg ci -m initial
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   376
  $ hg mv a b
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   377
  $ hg ci -m 'mv a b'
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   378
  $ hg mv b c
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   379
  $ hg ci -m 'mv b c'
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   380
  $ hg up -q 0
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   381
  $ echo c > a
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   382
  $ hg ci -m 'mod a'
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   383
  created new head
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   384
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   385
  @  rev: 3
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   386
  |  desc: mod a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   387
  | o  rev: 2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   388
  | |  desc: mv b c
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   389
  | o  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   390
  |/   desc: mv a b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   391
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   392
     desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   393
  $ hg rebase -s 1 -d .
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   394
  rebasing 1:472e38d57782 "mv a b"
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   395
  merging a and b to b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   396
  rebasing 2:d3efd280421d "mv b c"
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   397
  merging b and c to c
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   398
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-ab8d3c58-rebase.hg
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   399
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   400
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   401
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   402
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   403
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
   404
--------------------------------------------------------------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   405
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   406
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   407
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   408
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   409
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   410
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   411
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   412
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   413
  $ hg ci -m 'mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   414
  $ echo c > c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   415
  $ hg add c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   416
  $ hg ci -m 'add c'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   417
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   418
  $ echo b > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   419
  $ hg ci -m 'mod a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   420
  created new head
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   421
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   422
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   423
  @  rev: 3
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   424
  |  desc: mod a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   425
  | o  rev: 2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   426
  | |  desc: add c
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   427
  | o  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   428
  |/   desc: mv a b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   429
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   430
     desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   431
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   432
  $ hg rebase -s . -d 2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   433
  rebasing 3:ef716627c70b "mod a" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   434
  merging b and a to b
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   435
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   436
  $ ls
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   437
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   438
  c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   439
  $ cat b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   440
  b
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   441
  $ rm -rf repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   442
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   443
Merge test
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   444
----------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   445
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   446
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   447
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   448
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   449
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   450
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   451
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   452
  $ echo b > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   453
  $ hg ci -m 'modify a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   454
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   455
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   456
  $ hg ci -m 'mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   457
  created new head
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   458
  $ hg up -q 2
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   459
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   460
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   461
  @  rev: 2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   462
  |  desc: mv a b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   463
  | o  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   464
  |/   desc: modify a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   465
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   466
     desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   467
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   468
  $ hg merge 1
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   469
  merging b and a to b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   470
  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
   471
  (branch merge, don't forget to commit)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   472
  $ hg ci -m merge
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   473
  $ ls
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   474
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   475
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   476
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   477
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   478
Copy and move file
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   479
------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   480
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   481
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   482
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   483
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   484
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   485
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   486
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   487
  $ hg cp a c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   488
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   489
  $ 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
   490
  $ hg up -q 0
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   491
  $ echo b > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   492
  $ hg ci -m 'mod a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   493
  created new head
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   494
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   495
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   496
  @  rev: 2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   497
  |  desc: mod a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   498
  | o  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   499
  |/   desc: cp a c, mv a b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   500
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   501
     desc: initial
34179
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
  $ hg rebase -s . -d 1
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   504
  rebasing 2:ef716627c70b "mod a" (tip)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   505
  merging b and a to b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   506
  merging c and a to c
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   507
  saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   508
  $ ls
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   509
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   510
  c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   511
  $ cat b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   512
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   513
  $ cat c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   514
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   515
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   516
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   517
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   518
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
   519
----------------------------------------------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   520
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   521
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   522
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   523
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   524
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   525
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   526
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   527
  $ echo b > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   528
  $ hg ci -qm 'mod a'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   529
  $ hg up -q ".^"
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   530
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   531
  $ hg ci -qm 'mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   532
  $ hg mv b c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   533
  $ hg ci -qm 'mv b c'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   534
  $ hg up -q 1
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   535
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   536
  o  rev: 3
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   537
  |  desc: mv b c
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   538
  o  rev: 2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   539
  |  desc: mv a b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   540
  | @  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   541
  |/   desc: mod a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   542
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   543
     desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   544
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   545
  $ hg merge 3
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   546
  merging a and c to c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   547
  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
   548
  (branch merge, don't forget to commit)
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   549
  $ hg ci -qm 'merge'
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   550
  $ hg pl
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   551
  @    rev: 4, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   552
  |\   desc: merge
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   553
  | o  rev: 3, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   554
  | |  desc: mv b c
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   555
  | o  rev: 2, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   556
  | |  desc: mv a b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   557
  o |  rev: 1, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   558
  |/   desc: mod a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   559
  o  rev: 0, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   560
     desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   561
  $ ls
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   562
  c
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   563
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   564
  $ rm -rf repo
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   565
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   566
Test shelve/unshelve
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   567
-------------------
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   568
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   569
  $ hg init repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   570
  $ initclient repo
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   571
  $ cd repo
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   572
  $ echo a > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   573
  $ hg add a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   574
  $ hg ci -m initial
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   575
  $ echo b > a
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   576
  $ hg shelve
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   577
  shelved as default
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   578
  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
   579
  $ hg mv a b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   580
  $ hg ci -m 'mv a b'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   581
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   582
  $ hg l
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   583
  @  rev: 1
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   584
  |  desc: mv a b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   585
  o  rev: 0
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   586
     desc: initial
34179
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   587
  $ hg unshelve
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   588
  unshelving change 'default'
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   589
  rebasing shelved changes
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   590
  merging b and a to b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   591
  $ ls
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   592
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   593
  $ cat b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   594
  b
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   595
  $ cd ..
036d47d7cf39 copytrace: move fast heuristic copytracing algorithm to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   596
  $ 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
   597
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   598
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
   599
-------------------------------------------
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   600
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   601
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
   602
  $ hg init repo
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   603
  $ initclient repo
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   604
  $ mkdir repo/dir1
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   605
  $ cd repo/dir1
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   606
  $ echo a > a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   607
  $ hg add a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   608
  $ 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
   609
  $ cd ..
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   610
  $ 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
   611
  $ 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
   612
  $ 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
   613
  $ hg up -q '.^'
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   614
  $ cd dir1
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   615
  $ echo b >> a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   616
  $ cd ..
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   617
  $ 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
   618
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   619
  $ hg pl
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   620
  @  rev: 2, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   621
  |  desc: mod a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   622
  | o  rev: 1, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   623
  |/   desc: mv a b; mv dir1 dir2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   624
  o  rev: 0, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   625
     desc: initial
34288
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   626
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   627
  $ 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
   628
  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
   629
  merging dir2/b and dir1/a to dir2/b
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   630
  saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/6207d2d318e7-1c9779ad-rebase.hg
34288
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   631
  $ cat dir2/b
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   632
  a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   633
  b
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   634
  $ cd ..
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   635
  $ rm -rf repo
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   636
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   637
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
   638
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
   639
34288
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   640
  $ hg init repo
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   641
  $ initclient repo
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   642
  $ mkdir repo/dir1
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   643
  $ cd repo/dir1
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   644
  $ echo dummy > dummy
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   645
  $ hg add dummy
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   646
  $ cd ..
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   647
  $ 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
   648
  $ cd dir1
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   649
  $ echo a > a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   650
  $ hg add a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   651
  $ cd ..
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   652
  $ 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
   653
  $ hg up -q '.^'
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   654
  $ 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
   655
  $ 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
   656
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   657
  $ hg pl
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   658
  @  rev: 2, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   659
  |  desc: mv dir1 dir2
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   660
  | o  rev: 1, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   661
  |/   desc: hg add dir1/a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   662
  o  rev: 0, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   663
     desc: initial
34288
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   664
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   665
  $ 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
   666
  rebasing 2:e8919e7df8d0 "mv dir1 dir2" (tip)
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   667
  saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/e8919e7df8d0-f62fab62-rebase.hg
34288
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   668
  $ ls dir2
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   669
  a
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   670
  dummy
fc3b8483c6cb copytrace: use the full copytracing method if only drafts are involved
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34179
diff changeset
   671
  $ 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
   672
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   673
Testing the sourcecommitlimit config
34567
1b261be2033b tests: optimize test-copytrace-heuristics.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34311
diff changeset
   674
-----------------------------------
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
   675
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   676
  $ 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
   677
  $ 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
   678
  $ 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
   679
  $ 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
   680
  $ 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
   681
  $ 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
   682
  $ 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
   683
  $ 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
   684
  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
   685
  $ 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
   686
  $ 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
   687
  $ 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
   688
  $ 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
   689
  $ hg ci -m "Moved a to foo/bar"
42181
1afd9d1e55ca tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 39285
diff changeset
   690
  $ hg pl
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   691
  @  rev: 3, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   692
  |  desc: Moved a to foo/bar
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   693
  o  rev: 2, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   694
  |  desc: added b
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   695
  | o  rev: 1, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   696
  |/   desc: added more things to a
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   697
  o  rev: 0, phase: draft
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   698
     desc: added a
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
   699
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   700
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
   701
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   702
  $ hg rebase -s 1 -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
   703
  rebasing 1:8b6e13696c38 "added more things to a"
39285
a3fd84f4fb38 filemerge: fix the wrong placements of messages in prompt
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39284
diff changeset
   704
  file 'a' was deleted in local [dest] but was modified in other [source].
42565
4764e8436b2a filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
   705
  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
4764e8436b2a filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
   706
  What do you want to do? u
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
   707
  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
   708
  [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
   709
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   710
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
   711
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
   712
1826d695ad58 copytrace: add a a new config to limit the number of drafts in heuristics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 34288
diff changeset
   713
  $ 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
   714
  rebase aborted
42183
802ae9772ced tests: make log style a little easier to read in test-copytrace-heuristics.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 42181
diff changeset
   715
  $ hg rebase -s 1 -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
   716
  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
   717
  merging foo/bar and a to foo/bar
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34846
diff changeset
   718
  saved backup bundle to $TESTTMP/repo/repo/repo/.hg/strip-backup/8b6e13696c38-fc14ac83-rebase.hg
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
   719
  $ 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
   720
  $ rm -rf repo