tests/test-rebase-cache.t
author Patrick Mezard <patrick@mezard.eu>
Fri, 03 Aug 2012 17:56:34 +0200
changeset 17448 507e8f94b26a
parent 17345 4f8054d3171b
child 18983 31bcc5112191
permissions -rw-r--r--
test-convert-darcs.t: fix elementtree test On OSX, the test succeeds because darcs aborts when trying to convert the dummy repository, and the test only grep for the output. On Windows, the darcs call succeeds for some reason but darcs fails to emit any output, which is not a valid XML output, which causes a traceback including the ElementTree string matched by the check, and makes a false positive. Check with a real repository instead. The darcs upgrade test is moved at the end so we can use our handmade darcs repository for the test.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     2
  > [extensions]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     3
  > graphlog=
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     4
  > rebase=
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
     5
  > mq=
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     6
  > 
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     7
  > [phases]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     8
  > publish=False
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     9
  > 
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    10
  > [alias]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    11
  > tglog  = log -G --template "{rev}: '{desc}' {branches}\n"
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    12
  > theads = heads --template "{rev}: '{desc}' {branches}\n"
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    13
  > EOF
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    14
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    15
  $ hg init a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    16
  $ cd a
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10547
diff changeset
    17
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    18
  $ echo a > a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    19
  $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    20
  adding a
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    21
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    22
  $ hg branch branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    23
  marked working directory as branch branch1
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14162
diff changeset
    24
  (branches are permanent and global, did you want a bookmark?)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    25
  $ hg ci -m 'branch1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    26
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    27
  $ echo b > b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    28
  $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    29
  adding b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    30
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    31
  $ hg up -q 0
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    32
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    33
  $ hg branch branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    34
  marked working directory as branch branch2
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14162
diff changeset
    35
  (branches are permanent and global, did you want a bookmark?)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    36
  $ hg ci -m 'branch2'
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    37
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    38
  $ echo c > C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    39
  $ hg ci -Am C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    40
  adding C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    41
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    42
  $ hg up -q 2
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    43
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    44
  $ hg branch -f branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    45
  marked working directory as branch branch2
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14162
diff changeset
    46
  (branches are permanent and global, did you want a bookmark?)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    47
  $ echo d > d
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    48
  $ hg ci -Am D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    49
  adding d
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    50
  created new head
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    51
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    52
  $ echo e > e
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    53
  $ hg ci -Am E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    54
  adding e
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    55
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    56
  $ hg update default
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    57
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    58
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    59
  $ hg branch branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    60
  marked working directory as branch branch3
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14162
diff changeset
    61
  (branches are permanent and global, did you want a bookmark?)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    62
  $ hg ci -m 'branch3'
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    63
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    64
  $ echo f > f
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    65
  $ hg ci -Am F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    66
  adding f
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    67
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    68
  $ cd ..
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    69
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    70
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    71
Rebase part of branch2 (5-6) onto branch3 (8):
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    72
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    73
  $ hg clone -q -u . a a1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    74
  $ cd a1
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    75
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17013
diff changeset
    76
  $ hg tglog
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    77
  @  8: 'F' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    78
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    79
  o  7: 'branch3' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    80
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    81
  | o  6: 'E' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    82
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    83
  | o  5: 'D' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    84
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    85
  | | o  4: 'C' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    86
  | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    87
  +---o  3: 'branch2' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    88
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    89
  | o  2: 'B' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    90
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    91
  | o  1: 'branch1' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    92
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    93
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    94
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    95
  $ hg branches
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 12640
diff changeset
    96
  branch3                        8:4666b71e8e32
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 12640
diff changeset
    97
  branch2                        6:5097051d331d
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 12640
diff changeset
    98
  branch1                        2:0a03079c47fd (inactive)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    99
  default                        0:1994f17a630e (inactive)
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   100
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   101
  $ hg theads
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   102
  8: 'F' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   103
  6: 'E' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   104
  4: 'C' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   105
  2: 'B' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   106
  0: 'A' 
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   107
17005
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16913
diff changeset
   108
  $ hg rebase -s 5 -d 8
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
   109
  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   110
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   111
  $ hg branches
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 12640
diff changeset
   112
  branch3                        8:466cdfb14b62
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 12640
diff changeset
   113
  branch2                        4:e4fdb121d036
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 12640
diff changeset
   114
  branch1                        2:0a03079c47fd
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   115
  default                        0:1994f17a630e (inactive)
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   116
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   117
  $ hg theads
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   118
  8: 'E' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   119
  4: 'C' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   120
  2: 'B' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   121
  0: 'A' 
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   122
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17013
diff changeset
   123
  $ hg tglog
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   124
  @  8: 'E' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   125
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   126
  o  7: 'D' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   127
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   128
  o  6: 'F' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   129
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   130
  o  5: 'branch3' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   131
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   132
  | o  4: 'C' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   133
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   134
  | o  3: 'branch2' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   135
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   136
  | o  2: 'B' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   137
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   138
  | o  1: 'branch1' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   139
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   140
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   141
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   142
  $ cd ..
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   143
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   144
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   145
Rebase head of branch3 (8) onto branch2 (6):
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   146
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   147
  $ hg clone -q -u . a a2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   148
  $ cd a2
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   149
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   150
  $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   151
  @  8: 'F' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   152
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   153
  o  7: 'branch3' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   154
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   155
  | o  6: 'E' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   156
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   157
  | o  5: 'D' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   158
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   159
  | | o  4: 'C' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   160
  | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   161
  +---o  3: 'branch2' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   162
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   163
  | o  2: 'B' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   164
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   165
  | o  1: 'branch1' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   166
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   167
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   168
  
17005
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16913
diff changeset
   169
  $ hg rebase -s 8 -d 6
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
   170
  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   171
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   172
  $ hg branches
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 12640
diff changeset
   173
  branch2                        8:6b4bdc1b5ac0
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 12640
diff changeset
   174
  branch3                        7:653b9feb4616
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 12640
diff changeset
   175
  branch1                        2:0a03079c47fd (inactive)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   176
  default                        0:1994f17a630e (inactive)
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   177
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   178
  $ hg theads
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   179
  8: 'F' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   180
  7: 'branch3' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   181
  4: 'C' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   182
  2: 'B' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   183
  0: 'A' 
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   184
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   185
  $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   186
  @  8: 'F' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   187
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   188
  | o  7: 'branch3' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   189
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   190
  o |  6: 'E' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   191
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   192
  o |  5: 'D' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   193
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   194
  | | o  4: 'C' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   195
  | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   196
  | | o  3: 'branch2' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   197
  | |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   198
  o |  2: 'B' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   199
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   200
  o |  1: 'branch1' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   201
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   202
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   203
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   204
  $ hg verify -q
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   205
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   206
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   207
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   208
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   209
Rebase entire branch3 (7-8) onto branch2 (6):
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   210
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   211
  $ hg clone -q -u . a a3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   212
  $ cd a3
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   213
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   214
  $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   215
  @  8: 'F' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   216
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   217
  o  7: 'branch3' branch3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   218
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   219
  | o  6: 'E' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   220
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   221
  | o  5: 'D' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   222
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   223
  | | o  4: 'C' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   224
  | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   225
  +---o  3: 'branch2' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   226
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   227
  | o  2: 'B' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   228
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   229
  | o  1: 'branch1' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   230
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   231
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   232
  
17005
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16913
diff changeset
   233
  $ hg rebase -s 7 -d 6
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
   234
  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   235
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   236
  $ hg branches
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 12640
diff changeset
   237
  branch2                        7:6b4bdc1b5ac0
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 12640
diff changeset
   238
  branch1                        2:0a03079c47fd (inactive)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   239
  default                        0:1994f17a630e (inactive)
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   240
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   241
  $ hg theads
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   242
  7: 'F' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   243
  4: 'C' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   244
  2: 'B' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   245
  0: 'A' 
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   246
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17013
diff changeset
   247
  $ hg tglog
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   248
  @  7: 'F' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   249
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   250
  o  6: 'E' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   251
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   252
  o  5: 'D' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   253
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   254
  | o  4: 'C' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   255
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   256
  | o  3: 'branch2' branch2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   257
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   258
  o |  2: 'B' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   259
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   260
  o |  1: 'branch1' branch1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   261
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   262
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   263
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   264
  $ hg verify -q
10547
bae9bb09166b strip: invalidate all caches after stripping (fixes issue1951)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
   265
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   266
Stripping multiple branches in one go bypasses the fast-case code to
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   267
update the branch cache.
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   268
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   269
  $ hg strip 2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   270
  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   271
  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   272
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   273
  $ hg tglog
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   274
  o  3: 'C' branch2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   275
  |
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   276
  o  2: 'branch2' branch2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   277
  |
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   278
  | @  1: 'branch1' branch1
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   279
  |/
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   280
  o  0: 'A'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   281
  
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   282
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   283
  $ hg branches
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   284
  branch2                        3:e4fdb121d036
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   285
  branch1                        1:63379ac49655
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   286
  default                        0:1994f17a630e (inactive)
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   287
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   288
  $ hg theads
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   289
  3: 'C' branch2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   290
  1: 'branch1' branch1
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   291
  0: 'A' 
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   292
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   293
Fast path branchcache code should not be invoked if branches stripped is not
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   294
the same as branches remaining.
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   295
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   296
  $ hg init b
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   297
  $ cd b
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   298
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   299
  $ hg branch branch1
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   300
  marked working directory as branch branch1
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   301
  (branches are permanent and global, did you want a bookmark?)
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   302
  $ hg ci -m 'branch1'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   303
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   304
  $ hg branch branch2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   305
  marked working directory as branch branch2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   306
  (branches are permanent and global, did you want a bookmark?)
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   307
  $ hg ci -m 'branch2'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   308
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   309
  $ hg branch -f branch1
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   310
  marked working directory as branch branch1
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   311
  (branches are permanent and global, did you want a bookmark?)
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   312
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   313
  $ echo a > A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   314
  $ hg ci -Am A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   315
  adding A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   316
  created new head
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   317
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   318
  $ hg tglog
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   319
  @  2: 'A' branch1
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   320
  |
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   321
  o  1: 'branch2' branch2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   322
  |
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   323
  o  0: 'branch1' branch1
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   324
  
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   325
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   326
  $ hg theads
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   327
  2: 'A' branch1
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   328
  1: 'branch2' branch2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   329
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   330
  $ hg strip 2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   331
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   332
  saved backup bundle to $TESTTMP/a3/b/.hg/strip-backup/*-backup.hg (glob)
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   333
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   334
  $ hg theads
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   335
  1: 'branch2' branch2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   336
  0: 'branch1' branch1
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   337
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   338
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   339
Make sure requesting to strip a revision already stripped does not confuse things.
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   340
Try both orders.
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   341
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15742
diff changeset
   342
  $ cd ..
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   343
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   344
  $ hg init c
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   345
  $ cd c
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   346
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   347
  $ echo a > a
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   348
  $ hg ci -Am A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   349
  adding a
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   350
  $ echo b > b
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   351
  $ hg ci -Am B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   352
  adding b
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   353
  $ echo c > c
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   354
  $ hg ci -Am C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   355
  adding c
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   356
  $ echo d > d
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   357
  $ hg ci -Am D
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   358
  adding d
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   359
  $ echo e > e
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   360
  $ hg ci -Am E
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   361
  adding e
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   362
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   363
  $ hg tglog
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   364
  @  4: 'E'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   365
  |
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   366
  o  3: 'D'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   367
  |
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   368
  o  2: 'C'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   369
  |
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   370
  o  1: 'B'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   371
  |
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   372
  o  0: 'A'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   373
  
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   374
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   375
  $ hg strip 3 4
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   376
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   377
  saved backup bundle to $TESTTMP/a3/c/.hg/strip-backup/*-backup.hg (glob)
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   378
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   379
  $ hg theads
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   380
  2: 'C' 
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   381
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   382
  $ hg strip 2 1
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   383
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   384
  saved backup bundle to $TESTTMP/a3/c/.hg/strip-backup/*-backup.hg (glob)
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   385
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   386
  $ hg theads
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   387
  0: 'A'