tests/test-strip.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 04 Nov 2022 19:38:47 -0400
changeset 49730 266bb5c86f4b
parent 48967 42d2b31cee0b
child 50415 2cf264e9aa75
permissions -rw-r--r--
debug-delta-find: add a --source option This will help us to understand the delta-find operation in different situations.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
     1
  $ echo "[extensions]" >> $HGRCPATH
19827
8b9c73ddeec1 strip: rename test-mq-strip into test-strip
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19090
diff changeset
     2
  $ echo "strip=" >> $HGRCPATH
33099
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
     3
  $ echo "drawdag=$TESTDIR/drawdag.py" >> $HGRCPATH
8452
cb93eee1fbcd tests: add missing interpreter lines
Martin Geisler <mg@lazybytes.net>
parents: 6635
diff changeset
     4
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
     5
  $ restore() {
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
     6
  >     hg unbundle -q .hg/strip-backup/*
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
     7
  >     rm .hg/strip-backup/*
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
     8
  > }
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
     9
  $ teststrip() {
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    10
  >     hg up -C $1
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    11
  >     echo % before update $1, strip $2
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    12
  >     hg log -G -T '{rev}:{node}'
45880
d7a508a75d72 strip: move into core
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 45859
diff changeset
    13
  >     hg --traceback debugstrip $2
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    14
  >     echo % after update $1, strip $2
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    15
  >     hg log -G -T '{rev}:{node}'
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    16
  >     restore
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    17
  > }
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    18
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    19
  $ hg init test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    20
  $ cd test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    21
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    22
  $ echo foo > bar
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    23
  $ hg ci -Ama
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    24
  adding bar
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    25
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    26
  $ echo more >> bar
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    27
  $ hg ci -Amb
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    28
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    29
  $ echo blah >> bar
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    30
  $ hg ci -Amc
11200
12e5149cafca strip: improve full backup message
Matt Mackall <mpm@selenic.com>
parents: 8452
diff changeset
    31
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    32
  $ hg up 1
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    33
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    34
  $ echo blah >> bar
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    35
  $ hg ci -Amd
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    36
  created new head
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    37
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    38
  $ echo final >> bar
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    39
  $ hg ci -Ame
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    40
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    41
  $ hg log
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    42
  changeset:   4:443431ffac4f
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    43
  tag:         tip
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    44
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    45
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    46
  summary:     e
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    47
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    48
  changeset:   3:65bd5f99a4a3
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    49
  parent:      1:ef3a871183d7
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    50
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    51
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    52
  summary:     d
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    53
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    54
  changeset:   2:264128213d29
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    55
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    56
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    57
  summary:     c
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    58
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    59
  changeset:   1:ef3a871183d7
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    60
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    61
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    62
  summary:     b
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    63
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    64
  changeset:   0:9ab35a2d17cb
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    65
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    66
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    67
  summary:     a
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    68
  
6635
d90d83ebea9e mq: don't update the working copy on strip if parents aren't stripped
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    69
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    70
  $ teststrip 4 4
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    71
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    72
  % before update 4, strip 4
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    73
  @  4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    74
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    75
  o  3:65bd5f99a4a376cdea23a1153f07856b0d881d64
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    76
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    77
  | o  2:264128213d290d868c54642d13aeaa3675551a78
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    78
  |/
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    79
  o  1:ef3a871183d7199c541cc140218298bbfcc6c28a
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    80
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    81
  o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    82
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    83
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
    84
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    85
  % after update 4, strip 4
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    86
  @  3:65bd5f99a4a376cdea23a1153f07856b0d881d64
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    87
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    88
  | o  2:264128213d290d868c54642d13aeaa3675551a78
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    89
  |/
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    90
  o  1:ef3a871183d7199c541cc140218298bbfcc6c28a
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    91
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    92
  o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    93
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    94
  $ teststrip 4 3
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    95
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
    96
  % before update 4, strip 3
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    97
  @  4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    98
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
    99
  o  3:65bd5f99a4a376cdea23a1153f07856b0d881d64
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   100
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   101
  | o  2:264128213d290d868c54642d13aeaa3675551a78
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   102
  |/
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   103
  o  1:ef3a871183d7199c541cc140218298bbfcc6c28a
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   104
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   105
  o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   106
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   107
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
   108
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   109
  % after update 4, strip 3
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   110
  o  2:264128213d290d868c54642d13aeaa3675551a78
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   111
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   112
  @  1:ef3a871183d7199c541cc140218298bbfcc6c28a
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   113
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   114
  o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   115
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   116
  $ teststrip 1 4
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   117
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   118
  % before update 1, strip 4
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   119
  o  4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   120
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   121
  o  3:65bd5f99a4a376cdea23a1153f07856b0d881d64
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   122
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   123
  | o  2:264128213d290d868c54642d13aeaa3675551a78
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   124
  |/
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   125
  @  1:ef3a871183d7199c541cc140218298bbfcc6c28a
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   126
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   127
  o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   128
  
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
   129
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   130
  % after update 1, strip 4
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   131
  o  3:65bd5f99a4a376cdea23a1153f07856b0d881d64
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   132
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   133
  | o  2:264128213d290d868c54642d13aeaa3675551a78
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   134
  |/
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   135
  @  1:ef3a871183d7199c541cc140218298bbfcc6c28a
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   136
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   137
  o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   138
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   139
  $ teststrip 4 2
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   140
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   141
  % before update 4, strip 2
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   142
  @  4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   143
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   144
  o  3:65bd5f99a4a376cdea23a1153f07856b0d881d64
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   145
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   146
  | o  2:264128213d290d868c54642d13aeaa3675551a78
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   147
  |/
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   148
  o  1:ef3a871183d7199c541cc140218298bbfcc6c28a
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   149
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   150
  o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   151
  
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
   152
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   153
  % after update 4, strip 2
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   154
  @  3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   155
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   156
  o  2:65bd5f99a4a376cdea23a1153f07856b0d881d64
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   157
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   158
  o  1:ef3a871183d7199c541cc140218298bbfcc6c28a
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   159
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   160
  o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   161
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   162
  $ teststrip 4 1
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   163
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   164
  % before update 4, strip 1
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   165
  @  4:264128213d290d868c54642d13aeaa3675551a78
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   166
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   167
  | o  3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   168
  | |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   169
  | o  2:65bd5f99a4a376cdea23a1153f07856b0d881d64
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   170
  |/
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   171
  o  1:ef3a871183d7199c541cc140218298bbfcc6c28a
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   172
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   173
  o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   174
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   175
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
   176
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   177
  % after update 4, strip 1
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   178
  @  0:9ab35a2d17cb64271241ea881efcc19dd953215b
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   179
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   180
  $ teststrip null 4
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   181
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   182
  % before update null, strip 4
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   183
  o  4:264128213d290d868c54642d13aeaa3675551a78
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   184
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   185
  | o  3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   186
  | |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   187
  | o  2:65bd5f99a4a376cdea23a1153f07856b0d881d64
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   188
  |/
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   189
  o  1:ef3a871183d7199c541cc140218298bbfcc6c28a
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   190
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   191
  o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   192
  
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
   193
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   194
  % after update null, strip 4
42655
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   195
  o  3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   196
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   197
  o  2:65bd5f99a4a376cdea23a1153f07856b0d881d64
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   198
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   199
  o  1:ef3a871183d7199c541cc140218298bbfcc6c28a
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   200
  |
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   201
  o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
90d8a2a42d5c test: use a more verbose output in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42602
diff changeset
   202
  
6635
d90d83ebea9e mq: don't update the working copy on strip if parents aren't stripped
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   203
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   204
  $ hg log
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   205
  changeset:   4:264128213d29
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   206
  tag:         tip
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   207
  parent:      1:ef3a871183d7
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   208
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   209
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   210
  summary:     c
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   211
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   212
  changeset:   3:443431ffac4f
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   213
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   214
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   215
  summary:     e
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   216
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   217
  changeset:   2:65bd5f99a4a3
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   218
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   219
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   220
  summary:     d
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   221
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   222
  changeset:   1:ef3a871183d7
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   223
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   224
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   225
  summary:     b
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   226
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   227
  changeset:   0:9ab35a2d17cb
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   228
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   229
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   230
  summary:     a
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   231
  
23898
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   232
  $ hg up -C 4
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   233
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   234
  $ hg parents
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   235
  changeset:   4:264128213d29
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   236
  tag:         tip
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   237
  parent:      1:ef3a871183d7
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   238
  user:        test
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   239
  date:        Thu Jan 01 00:00:00 1970 +0000
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   240
  summary:     c
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   241
  
23939
33d1b81c6ef0 repair._bundle: fix traceback for bad config value
Eric Sumner <ericsumner@fb.com>
parents: 23898
diff changeset
   242
26423
c93f91c1db1c strip: use bundle2 + cg2 by default when repository use general delta
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26173
diff changeset
   243
  $ hg --traceback strip 4
23898
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   244
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
   245
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg
23898
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   246
  $ hg parents
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   247
  changeset:   1:ef3a871183d7
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   248
  user:        test
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   249
  date:        Thu Jan 01 00:00:00 1970 +0000
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   250
  summary:     b
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   251
  
b21c2e0ee8a3 repair: add experimental option to write bundle2 files
Eric Sumner <ericsumner@fb.com>
parents: 23835
diff changeset
   252
  $ hg debugbundle .hg/strip-backup/*
34043
626a28f30dbd debugcommands: stabilize output of debugbundle by having a custom repr
Augie Fackler <raf@durin42.com>
parents: 34005
diff changeset
   253
  Stream params: {Compression: BZ}
37836
d618558e4e8b debugbundle: also display if a part is mandatory or advisory
Boris Feld <boris.feld@octobus.net>
parents: 37416
diff changeset
   254
  changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
26929
e8e78a3d94b1 test: use generaldelta in 'test-strip.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26736
diff changeset
   255
      264128213d290d868c54642d13aeaa3675551a78
37837
326b174c6a47 bundle2: mark the bundle2 part as advisory (issue5872)
Boris Feld <boris.feld@octobus.net>
parents: 37836
diff changeset
   256
  cache:rev-branch-cache -- {} (mandatory: False)
37836
d618558e4e8b debugbundle: also display if a part is mandatory or advisory
Boris Feld <boris.feld@octobus.net>
parents: 37416
diff changeset
   257
  phase-heads -- {} (mandatory: True)
33044
8e3021fd1a44 strip: include phases in bundle (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents: 32718
diff changeset
   258
      264128213d290d868c54642d13aeaa3675551a78 draft
37336
5d10f41ddcc4 tests: use `hg unbundle` instead of `hg pull` in some tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37330
diff changeset
   259
  $ hg unbundle .hg/strip-backup/*
24073
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   260
  adding changesets
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   261
  adding manifests
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   262
  adding file changes
37336
5d10f41ddcc4 tests: use `hg unbundle` instead of `hg pull` in some tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37330
diff changeset
   263
  added 1 changesets with 0 changes to 1 files (+1 heads)
39497
89630d0b3e23 phase: report number of non-public changeset alongside the new range
Boris Feld <boris.feld@octobus.net>
parents: 38575
diff changeset
   264
  new changesets 264128213d29 (1 drafts)
24073
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   265
  (run 'hg heads' to see heads, 'hg merge' to merge)
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   266
  $ rm .hg/strip-backup/*
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   267
  $ hg log --graph
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   268
  o  changeset:   4:264128213d29
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   269
  |  tag:         tip
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   270
  |  parent:      1:ef3a871183d7
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   271
  |  user:        test
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   272
  |  date:        Thu Jan 01 00:00:00 1970 +0000
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   273
  |  summary:     c
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   274
  |
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   275
  | o  changeset:   3:443431ffac4f
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   276
  | |  user:        test
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   277
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   278
  | |  summary:     e
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   279
  | |
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   280
  | o  changeset:   2:65bd5f99a4a3
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   281
  |/   user:        test
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   282
  |    date:        Thu Jan 01 00:00:00 1970 +0000
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   283
  |    summary:     d
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   284
  |
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   285
  @  changeset:   1:ef3a871183d7
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   286
  |  user:        test
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   287
  |  date:        Thu Jan 01 00:00:00 1970 +0000
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   288
  |  summary:     b
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   289
  |
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   290
  o  changeset:   0:9ab35a2d17cb
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   291
     user:        test
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   292
     date:        Thu Jan 01 00:00:00 1970 +0000
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   293
     summary:     a
ff5caa8dfd99 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com>
parents: 23939
diff changeset
   294
  
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   295
  $ hg up -C 2
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   296
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   297
  $ hg merge 4
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   298
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   299
  (branch merge, don't forget to commit)
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   300
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   301
before strip of merge parent
6635
d90d83ebea9e mq: don't update the working copy on strip if parents aren't stripped
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   302
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   303
  $ hg parents
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   304
  changeset:   2:65bd5f99a4a3
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   305
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   306
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   307
  summary:     d
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   308
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   309
  changeset:   4:264128213d29
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   310
  tag:         tip
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   311
  parent:      1:ef3a871183d7
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   312
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   313
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   314
  summary:     c
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   315
  
42486
1acaa9f37377 strip: during merge allow strip only when -f is used
Taapas Agrawal <taapas2897@gmail.com>
parents: 40346
diff changeset
   316
##strip not allowed with merge in progress
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   317
  $ hg strip 4
42486
1acaa9f37377 strip: during merge allow strip only when -f is used
Taapas Agrawal <taapas2897@gmail.com>
parents: 40346
diff changeset
   318
  abort: outstanding uncommitted merge
42539
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 42506
diff changeset
   319
  (use 'hg commit' or 'hg merge --abort')
45859
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45219
diff changeset
   320
  [20]
42486
1acaa9f37377 strip: during merge allow strip only when -f is used
Taapas Agrawal <taapas2897@gmail.com>
parents: 40346
diff changeset
   321
##strip allowed --force with merge in progress
1acaa9f37377 strip: during merge allow strip only when -f is used
Taapas Agrawal <taapas2897@gmail.com>
parents: 40346
diff changeset
   322
  $ hg strip 4 --force
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   323
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
   324
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   325
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   326
after strip of merge parent
6635
d90d83ebea9e mq: don't update the working copy on strip if parents aren't stripped
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   327
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   328
  $ hg parents
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   329
  changeset:   1:ef3a871183d7
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   330
  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   331
  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   332
  summary:     b
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   333
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   334
  $ restore
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   335
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   336
  $ hg up
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   337
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32718
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32307
diff changeset
   338
  updated to "264128213d29: c"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 27177
diff changeset
   339
  1 other heads for branch "default"
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 19951
diff changeset
   340
  $ hg log -G
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   341
  @  changeset:   4:264128213d29
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   342
  |  tag:         tip
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   343
  |  parent:      1:ef3a871183d7
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   344
  |  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   345
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   346
  |  summary:     c
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   347
  |
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   348
  | o  changeset:   3:443431ffac4f
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   349
  | |  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   350
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   351
  | |  summary:     e
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   352
  | |
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   353
  | o  changeset:   2:65bd5f99a4a3
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   354
  |/   user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   355
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   356
  |    summary:     d
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   357
  |
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   358
  o  changeset:   1:ef3a871183d7
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   359
  |  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   360
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   361
  |  summary:     b
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   362
  |
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   363
  o  changeset:   0:9ab35a2d17cb
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   364
     user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   365
     date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   366
     summary:     a
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   367
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   368
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   369
2 is parent of 3, only one strip should happen
11789
e2bce1c717fa strip: support multiple revisions
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11637
diff changeset
   370
12767
c3316b6a3219 strip: support revision sets
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 12682
diff changeset
   371
  $ hg strip "roots(2)" 3
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
   372
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 19951
diff changeset
   373
  $ hg log -G
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   374
  @  changeset:   2:264128213d29
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   375
  |  tag:         tip
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   376
  |  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   377
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   378
  |  summary:     c
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   379
  |
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   380
  o  changeset:   1:ef3a871183d7
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   381
  |  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   382
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   383
  |  summary:     b
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   384
  |
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   385
  o  changeset:   0:9ab35a2d17cb
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   386
     user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   387
     date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   388
     summary:     a
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   389
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   390
  $ restore
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 19951
diff changeset
   391
  $ hg log -G
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   392
  o  changeset:   4:443431ffac4f
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   393
  |  tag:         tip
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   394
  |  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   395
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   396
  |  summary:     e
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   397
  |
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   398
  o  changeset:   3:65bd5f99a4a3
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   399
  |  parent:      1:ef3a871183d7
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   400
  |  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   401
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   402
  |  summary:     d
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   403
  |
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   404
  | @  changeset:   2:264128213d29
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   405
  |/   user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   406
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   407
  |    summary:     c
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   408
  |
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   409
  o  changeset:   1:ef3a871183d7
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   410
  |  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   411
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   412
  |  summary:     b
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   413
  |
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   414
  o  changeset:   0:9ab35a2d17cb
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   415
     user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   416
     date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   417
     summary:     a
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   418
  
29956
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   419
Failed hook while applying "saveheads" bundle.
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   420
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   421
  $ hg strip 2 --config hooks.pretxnchangegroup.bad=false
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   422
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   423
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   424
  transaction abort!
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   425
  rollback completed
29958
769aee32fae0 strip: don't use "full" and "partial" to describe bundles
Martin von Zweigbergk <martinvonz@google.com>
parents: 29957
diff changeset
   426
  strip failed, backup bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob)
29957
94ebf56db04e strip: clarify that user action is required to recover temp bundle
Martin von Zweigbergk <martinvonz@google.com>
parents: 29956
diff changeset
   427
  strip failed, unrecovered changes stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob)
94ebf56db04e strip: clarify that user action is required to recover temp bundle
Martin von Zweigbergk <martinvonz@google.com>
parents: 29956
diff changeset
   428
  (fix the problem, then recover the changesets with "hg unbundle '$TESTTMP/test/.hg/strip-backup/*-temp.hg'") (glob)
29956
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   429
  abort: pretxnchangegroup.bad hook exited with status 1
46485
768056549737 errors: use exit code 40 for when a hook fails
Martin von Zweigbergk <martinvonz@google.com>
parents: 46262
diff changeset
   430
  [40]
29956
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   431
  $ restore
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   432
  $ hg log -G
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   433
  o  changeset:   4:443431ffac4f
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   434
  |  tag:         tip
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   435
  |  user:        test
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   436
  |  date:        Thu Jan 01 00:00:00 1970 +0000
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   437
  |  summary:     e
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   438
  |
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   439
  o  changeset:   3:65bd5f99a4a3
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   440
  |  parent:      1:ef3a871183d7
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   441
  |  user:        test
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   442
  |  date:        Thu Jan 01 00:00:00 1970 +0000
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   443
  |  summary:     d
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   444
  |
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   445
  | o  changeset:   2:264128213d29
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   446
  |/   user:        test
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   447
  |    date:        Thu Jan 01 00:00:00 1970 +0000
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   448
  |    summary:     c
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   449
  |
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   450
  @  changeset:   1:ef3a871183d7
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   451
  |  user:        test
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   452
  |  date:        Thu Jan 01 00:00:00 1970 +0000
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   453
  |  summary:     b
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   454
  |
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   455
  o  changeset:   0:9ab35a2d17cb
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   456
     user:        test
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   457
     date:        Thu Jan 01 00:00:00 1970 +0000
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   458
     summary:     a
44ef21621ad7 strip: report both bundle files in case of exception (issue5368)
Martin von Zweigbergk <martinvonz@google.com>
parents: 29593
diff changeset
   459
  
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   460
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   461
2 different branches: 2 strips
11789
e2bce1c717fa strip: support multiple revisions
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11637
diff changeset
   462
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   463
  $ hg strip 2 4
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
   464
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 19951
diff changeset
   465
  $ hg log -G
18371
ff2c89ebf5d4 mq: stabilize update after strip of parent revision
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   466
  o  changeset:   2:65bd5f99a4a3
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   467
  |  tag:         tip
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   468
  |  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   469
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   470
  |  summary:     d
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   471
  |
18371
ff2c89ebf5d4 mq: stabilize update after strip of parent revision
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   472
  @  changeset:   1:ef3a871183d7
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   473
  |  user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   474
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   475
  |  summary:     b
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   476
  |
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   477
  o  changeset:   0:9ab35a2d17cb
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   478
     user:        test
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   479
     date:        Thu Jan 01 00:00:00 1970 +0000
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   480
     summary:     a
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   481
  
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   482
  $ restore
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   483
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   484
2 different branches and a common ancestor: 1 strip
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   485
12767
c3316b6a3219 strip: support revision sets
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 12682
diff changeset
   486
  $ hg strip 1 "2|4"
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   487
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
   488
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   489
  $ restore
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   490
20885
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   491
verify fncache is kept up-to-date
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   492
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   493
  $ touch a
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   494
  $ hg ci -qAm a
37415
c2c8962a9465 simplestore: use a custom store for the simple store repo
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37338
diff changeset
   495
#if repofncache
20885
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   496
  $ cat .hg/store/fncache | sort
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   497
  data/a.i
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   498
  data/bar.i
37415
c2c8962a9465 simplestore: use a custom store for the simple store repo
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37338
diff changeset
   499
#endif
37338
cbc4425e81b5 tests: conditionalize tests based on presence of revlogs for files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37336
diff changeset
   500
20885
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   501
  $ hg strip tip
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   502
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   503
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
37415
c2c8962a9465 simplestore: use a custom store for the simple store repo
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37338
diff changeset
   504
#if repofncache
20885
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   505
  $ cat .hg/store/fncache
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   506
  data/bar.i
37415
c2c8962a9465 simplestore: use a custom store for the simple store repo
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37338
diff changeset
   507
#endif
20885
f49d60fa40a5 fncache: clean up fncache during strips
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   508
12767
c3316b6a3219 strip: support revision sets
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 12682
diff changeset
   509
stripping an empty revset
c3316b6a3219 strip: support revision sets
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 12682
diff changeset
   510
c3316b6a3219 strip: support revision sets
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 12682
diff changeset
   511
  $ hg strip "1 and not 1"
c3316b6a3219 strip: support revision sets
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 12682
diff changeset
   512
  abort: empty revision set
c3316b6a3219 strip: support revision sets
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 12682
diff changeset
   513
  [255]
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   514
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   515
remove branchy history for qimport tests
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   516
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   517
  $ hg strip 3
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
   518
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
11637
64f284da1278 mq: cleanup status if applied mq is stripped (issue1881)
Vishakh H <vsh426@gmail.com>
parents: 11208
diff changeset
   519
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   520
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   521
strip of applied mq should cleanup status file
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   522
19827
8b9c73ddeec1 strip: rename test-mq-strip into test-strip
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19090
diff changeset
   523
  $ echo "mq=" >> $HGRCPATH
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   524
  $ hg up -C 3
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   525
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   526
  $ echo fooagain >> bar
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   527
  $ hg ci -mf
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   528
  $ hg qimport -r tip:2
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   529
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   530
applied patches before strip
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   531
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   532
  $ hg qapplied
26736
143b52fce68e mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents: 26429
diff changeset
   533
  d
143b52fce68e mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents: 26429
diff changeset
   534
  e
143b52fce68e mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents: 26429
diff changeset
   535
  f
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   536
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   537
stripping revision in queue
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   538
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   539
  $ hg strip 3
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   540
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
   541
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   542
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   543
applied patches after stripping rev in queue
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   544
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   545
  $ hg qapplied
26736
143b52fce68e mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents: 26429
diff changeset
   546
  d
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   547
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   548
stripping ancestor of queue
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   549
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   550
  $ hg strip 1
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   551
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
   552
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
11906
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   553
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   554
applied patches after stripping ancestor of queue
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   555
1219d019339d tests: unify test-mq-strip
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11789
diff changeset
   556
  $ hg qapplied
12682
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   557
19951
d51c4d85ec23 spelling: random spell checker fixes
Mads Kiilerich <madski@unity3d.com>
parents: 19827
diff changeset
   558
Verify strip protects against stripping wc parent when there are uncommitted mods
12682
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   559
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   560
  $ echo b > b
24709
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   561
  $ echo bb > bar
12682
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   562
  $ hg add b
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   563
  $ hg ci -m 'b'
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   564
  $ hg log --graph
24709
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   565
  @  changeset:   1:76dcf9fab855
12682
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   566
  |  tag:         tip
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   567
  |  user:        test
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   568
  |  date:        Thu Jan 01 00:00:00 1970 +0000
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   569
  |  summary:     b
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   570
  |
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   571
  o  changeset:   0:9ab35a2d17cb
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   572
     user:        test
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   573
     date:        Thu Jan 01 00:00:00 1970 +0000
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   574
     summary:     a
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   575
  
24709
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   576
  $ hg up 0
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   577
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   578
  $ echo c > bar
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   579
  $ hg up -t false
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   580
  merging bar
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   581
  merging bar failed!
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   582
  1 files updated, 0 files merged, 0 files removed, 1 files unresolved
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   583
  use 'hg resolve' to retry unresolved file merges
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   584
  [1]
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   585
  $ hg sum
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   586
  parent: 1:76dcf9fab855 tip
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   587
   b
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   588
  branch: default
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   589
  commit: 1 modified, 1 unknown, 1 unresolved
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   590
  update: (current)
25382
6084926366b9 summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents: 25111
diff changeset
   591
  phases: 2 draft
24709
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   592
  mq:     3 unapplied
12682
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   593
44378
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 42655
diff changeset
   594
  $ hg log --graph
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 42655
diff changeset
   595
  @  changeset:   1:76dcf9fab855
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 42655
diff changeset
   596
  |  tag:         tip
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 42655
diff changeset
   597
  |  user:        test
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 42655
diff changeset
   598
  |  date:        Thu Jan 01 00:00:00 1970 +0000
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 42655
diff changeset
   599
  |  summary:     b
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 42655
diff changeset
   600
  |
44379
14d0e89520a2 graphlog: use '%' for other context in merge conflict
Martin von Zweigbergk <martinvonz@google.com>
parents: 44378
diff changeset
   601
  %  changeset:   0:9ab35a2d17cb
44378
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 42655
diff changeset
   602
     user:        test
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 42655
diff changeset
   603
     date:        Thu Jan 01 00:00:00 1970 +0000
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 42655
diff changeset
   604
     summary:     a
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 42655
diff changeset
   605
  
12682
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   606
  $ echo c > b
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   607
  $ hg strip tip
42506
1474f5d84662 strip: use bailifchanged() instead of reimplementing it
Martin von Zweigbergk <martinvonz@google.com>
parents: 42486
diff changeset
   608
  abort: uncommitted changes
45859
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45219
diff changeset
   609
  [20]
12682
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   610
  $ hg strip tip --keep
13572
1bb2a56a9d73 tests: use $TESTTMP more and use (glob) less
Martin Geisler <mg@aragost.com>
parents: 12767
diff changeset
   611
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
12682
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   612
  $ hg log --graph
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   613
  @  changeset:   0:9ab35a2d17cb
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   614
     tag:         tip
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   615
     user:        test
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   616
     date:        Thu Jan 01 00:00:00 1970 +0000
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   617
     summary:     a
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   618
  
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   619
  $ hg status
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   620
  M bar
58a3e2608ae4 strip: add --keep flag to avoid modifying wc during strip
Augie Fackler <durin42@gmail.com>
parents: 12640
diff changeset
   621
  ? b
24709
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   622
  ? bar.orig
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   623
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   624
  $ rm bar.orig
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   625
  $ hg sum
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   626
  parent: 0:9ab35a2d17cb tip
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   627
   a
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   628
  branch: default
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   629
  commit: 1 modified, 1 unknown
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   630
  update: (current)
25382
6084926366b9 summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents: 25111
diff changeset
   631
  phases: 1 draft
24709
69154e0ae384 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com>
parents: 24686
diff changeset
   632
  mq:     3 unapplied
18760
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   633
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   634
Strip adds, removes, modifies with --keep
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   635
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   636
  $ touch b
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   637
  $ hg add b
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   638
  $ hg commit -mb
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   639
  $ touch c
19090
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   640
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   641
... with a clean working dir
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   642
18760
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   643
  $ hg add c
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   644
  $ hg rm bar
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   645
  $ hg commit -mc
19090
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   646
  $ hg status
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   647
  $ hg strip --keep tip
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   648
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   649
  $ hg status
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   650
  ! bar
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   651
  ? c
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   652
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   653
... with a dirty working dir
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   654
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   655
  $ hg add c
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   656
  $ hg rm bar
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   657
  $ hg commit -mc
ff01506c6852 test-mq-strip.t: add a test for strip --keep with clean working dir
Siddharth Agarwal <sid0@fb.com>
parents: 18760
diff changeset
   658
  $ hg status
18760
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   659
  $ echo b > b
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   660
  $ echo d > d
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   661
  $ hg strip --keep tip
27177
e76b27a642ca strip: add a --keep test related to removing files from dirstate
Christian Delahousse <cdelahousse@fb.com>
parents: 27030
diff changeset
   662
  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
18760
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   663
  $ hg status
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   664
  M b
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   665
  ! bar
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   666
  ? c
e74704c33e24 strip: make --keep option not set all dirstate times to 0
Durham Goode <durham@fb.com>
parents: 18371
diff changeset
   667
  ? d
27177
e76b27a642ca strip: add a --keep test related to removing files from dirstate
Christian Delahousse <cdelahousse@fb.com>
parents: 27030
diff changeset
   668
e76b27a642ca strip: add a --keep test related to removing files from dirstate
Christian Delahousse <cdelahousse@fb.com>
parents: 27030
diff changeset
   669
... after updating the dirstate
e76b27a642ca strip: add a --keep test related to removing files from dirstate
Christian Delahousse <cdelahousse@fb.com>
parents: 27030
diff changeset
   670
  $ hg add c
e76b27a642ca strip: add a --keep test related to removing files from dirstate
Christian Delahousse <cdelahousse@fb.com>
parents: 27030
diff changeset
   671
  $ hg commit -mc
e76b27a642ca strip: add a --keep test related to removing files from dirstate
Christian Delahousse <cdelahousse@fb.com>
parents: 27030
diff changeset
   672
  $ hg rm c
e76b27a642ca strip: add a --keep test related to removing files from dirstate
Christian Delahousse <cdelahousse@fb.com>
parents: 27030
diff changeset
   673
  $ hg commit -mc
e76b27a642ca strip: add a --keep test related to removing files from dirstate
Christian Delahousse <cdelahousse@fb.com>
parents: 27030
diff changeset
   674
  $ hg strip --keep '.^' -q
16252
cf17e76be4dd strip: enhance repair.strip to receive a list of nodes (issue3299)
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 13572
diff changeset
   675
  $ cd ..
cf17e76be4dd strip: enhance repair.strip to receive a list of nodes (issue3299)
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 13572
diff changeset
   676
cf17e76be4dd strip: enhance repair.strip to receive a list of nodes (issue3299)
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 13572
diff changeset
   677
stripping many nodes on a complex graph (issue3299)
cf17e76be4dd strip: enhance repair.strip to receive a list of nodes (issue3299)
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 13572
diff changeset
   678
cf17e76be4dd strip: enhance repair.strip to receive a list of nodes (issue3299)
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 13572
diff changeset
   679
  $ hg init issue3299
cf17e76be4dd strip: enhance repair.strip to receive a list of nodes (issue3299)
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 13572
diff changeset
   680
  $ cd issue3299
cf17e76be4dd strip: enhance repair.strip to receive a list of nodes (issue3299)
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 13572
diff changeset
   681
  $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a'
cf17e76be4dd strip: enhance repair.strip to receive a list of nodes (issue3299)
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 13572
diff changeset
   682
  $ hg strip 'not ancestors(x)'
cf17e76be4dd strip: enhance repair.strip to receive a list of nodes (issue3299)
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 13572
diff changeset
   683
  saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob)
cf17e76be4dd strip: enhance repair.strip to receive a list of nodes (issue3299)
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 13572
diff changeset
   684
16718
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   685
test hg strip -B bookmark
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   686
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   687
  $ cd ..
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   688
  $ hg init bookmarks
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   689
  $ cd bookmarks
27030
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   690
  $ hg debugbuilddag '..<2.*1/2:m<2+3:c<m+3:a<2.:b<m+2:d<2.:e<m+1:f'
16718
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   691
  $ hg bookmark -r 'a' 'todelete'
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   692
  $ hg bookmark -r 'b' 'B'
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   693
  $ hg bookmark -r 'b' 'nostrip'
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   694
  $ hg bookmark -r 'c' 'delete'
27030
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   695
  $ hg bookmark -r 'd' 'multipledelete1'
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   696
  $ hg bookmark -r 'e' 'multipledelete2'
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   697
  $ hg bookmark -r 'f' 'singlenode1'
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   698
  $ hg bookmark -r 'f' 'singlenode2'
16718
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   699
  $ hg up -C todelete
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   700
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
21503
10f15e34d86c update: show message when a bookmark is activated by update
Stephen Lee <sphen.lee@gmail.com>
parents: 20885
diff changeset
   701
  (activating bookmark todelete)
16718
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   702
  $ hg strip -B nostrip
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   703
  bookmark 'nostrip' deleted
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   704
  abort: empty revision set
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   705
  [255]
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   706
  $ hg strip -B todelete
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   707
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   708
  saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
21847
f6f122f4813b strip: remove bookmarks after strip succeed (issue4295)
David Soria Parra <davidsp@fb.com>
parents: 21503
diff changeset
   709
  bookmark 'todelete' deleted
16718
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   710
  $ hg id -ir dcbb326fdec2
45921
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45880
diff changeset
   711
  abort: unknown revision 'dcbb326fdec2'
48130
5105a9975407 errors: raise InputError from revsingle() iff revset provided by the user
Martin von Zweigbergk <martinvonz@google.com>
parents: 46485
diff changeset
   712
  [10]
16718
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   713
  $ hg id -ir d62d843c9a01
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   714
  d62d843c9a01
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   715
  $ hg bookmarks
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   716
     B                         9:ff43616e5d0f
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   717
     delete                    6:2702dd0c91e7
27030
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   718
     multipledelete1           11:e46a4836065c
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   719
     multipledelete2           12:b4594d867745
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   720
     singlenode1               13:43227190fef8
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   721
     singlenode2               13:43227190fef8
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   722
  $ hg strip -B multipledelete1 -B multipledelete2
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
   723
  saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/e46a4836065c-89ec65c2-backup.hg
27030
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   724
  bookmark 'multipledelete1' deleted
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   725
  bookmark 'multipledelete2' deleted
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   726
  $ hg id -ir e46a4836065c
45921
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45880
diff changeset
   727
  abort: unknown revision 'e46a4836065c'
48130
5105a9975407 errors: raise InputError from revsingle() iff revset provided by the user
Martin von Zweigbergk <martinvonz@google.com>
parents: 46485
diff changeset
   728
  [10]
27030
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   729
  $ hg id -ir b4594d867745
45921
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45880
diff changeset
   730
  abort: unknown revision 'b4594d867745'
48130
5105a9975407 errors: raise InputError from revsingle() iff revset provided by the user
Martin von Zweigbergk <martinvonz@google.com>
parents: 46485
diff changeset
   731
  [10]
27030
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   732
  $ hg strip -B singlenode1 -B singlenode2
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
   733
  saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/43227190fef8-8da858f2-backup.hg
27030
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   734
  bookmark 'singlenode1' deleted
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   735
  bookmark 'singlenode2' deleted
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   736
  $ hg id -ir 43227190fef8
45921
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45880
diff changeset
   737
  abort: unknown revision '43227190fef8'
48130
5105a9975407 errors: raise InputError from revsingle() iff revset provided by the user
Martin von Zweigbergk <martinvonz@google.com>
parents: 46485
diff changeset
   738
  [10]
27030
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   739
  $ hg strip -B unknownbookmark
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   740
  abort: bookmark 'unknownbookmark' not found
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   741
  [255]
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   742
  $ hg strip -B unknownbookmark1 -B unknownbookmark2
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   743
  abort: bookmark 'unknownbookmark1,unknownbookmark2' not found
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   744
  [255]
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   745
  $ hg strip -B delete -B unknownbookmark
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   746
  abort: bookmark 'unknownbookmark' not found
cf9ed6d32ccb strip: changing bookmark argument to be a list
Shubhanshu Agrawal <agrawal.shubhanshu@gmail.com>
parents: 26929
diff changeset
   747
  [255]
16718
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   748
  $ hg strip -B delete
21847
f6f122f4813b strip: remove bookmarks after strip succeed (issue4295)
David Soria Parra <davidsp@fb.com>
parents: 21503
diff changeset
   749
  saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
16829
6403fdd716fe strip: move bookmark deletion before strip to deal with filecache invalidation
Matt Mackall <mpm@selenic.com>
parents: 16718
diff changeset
   750
  bookmark 'delete' deleted
16718
3290e24bb3f0 strip: introduce -B option to remove a bookmark
David Soria Parra <dsp@php.net>
parents: 16252
diff changeset
   751
  $ hg id -ir 6:2702dd0c91e7
45921
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45880
diff changeset
   752
  abort: unknown revision '2702dd0c91e7'
48130
5105a9975407 errors: raise InputError from revsingle() iff revset provided by the user
Martin von Zweigbergk <martinvonz@google.com>
parents: 46485
diff changeset
   753
  [10]
21847
f6f122f4813b strip: remove bookmarks after strip succeed (issue4295)
David Soria Parra <davidsp@fb.com>
parents: 21503
diff changeset
   754
  $ hg update B
f6f122f4813b strip: remove bookmarks after strip succeed (issue4295)
David Soria Parra <davidsp@fb.com>
parents: 21503
diff changeset
   755
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
f6f122f4813b strip: remove bookmarks after strip succeed (issue4295)
David Soria Parra <davidsp@fb.com>
parents: 21503
diff changeset
   756
  (activating bookmark B)
f6f122f4813b strip: remove bookmarks after strip succeed (issue4295)
David Soria Parra <davidsp@fb.com>
parents: 21503
diff changeset
   757
  $ echo a > a
f6f122f4813b strip: remove bookmarks after strip succeed (issue4295)
David Soria Parra <davidsp@fb.com>
parents: 21503
diff changeset
   758
  $ hg add a
f6f122f4813b strip: remove bookmarks after strip succeed (issue4295)
David Soria Parra <davidsp@fb.com>
parents: 21503
diff changeset
   759
  $ hg strip -B B
42506
1474f5d84662 strip: use bailifchanged() instead of reimplementing it
Martin von Zweigbergk <martinvonz@google.com>
parents: 42486
diff changeset
   760
  abort: uncommitted changes
45859
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45219
diff changeset
   761
  [20]
21847
f6f122f4813b strip: remove bookmarks after strip succeed (issue4295)
David Soria Parra <davidsp@fb.com>
parents: 21503
diff changeset
   762
  $ hg bookmarks
f6f122f4813b strip: remove bookmarks after strip succeed (issue4295)
David Soria Parra <davidsp@fb.com>
parents: 21503
diff changeset
   763
   * B                         6:ff43616e5d0f
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16829
diff changeset
   764
21854
ba3bc6474bbf strip: drop -b/--backup option (BC)
Matt Mackall <mpm@selenic.com>
parents: 21847
diff changeset
   765
Make sure no one adds back a -b option:
ba3bc6474bbf strip: drop -b/--backup option (BC)
Matt Mackall <mpm@selenic.com>
parents: 21847
diff changeset
   766
ba3bc6474bbf strip: drop -b/--backup option (BC)
Matt Mackall <mpm@selenic.com>
parents: 21847
diff changeset
   767
  $ hg strip -b tip
45880
d7a508a75d72 strip: move into core
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 45859
diff changeset
   768
  hg debugstrip: option -b not recognized
d7a508a75d72 strip: move into core
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 45859
diff changeset
   769
  hg debugstrip [-k] [-f] [-B bookmark] [-r] REV...
21854
ba3bc6474bbf strip: drop -b/--backup option (BC)
Matt Mackall <mpm@selenic.com>
parents: 21847
diff changeset
   770
  
ba3bc6474bbf strip: drop -b/--backup option (BC)
Matt Mackall <mpm@selenic.com>
parents: 21847
diff changeset
   771
  strip changesets and all their descendants from the repository
ba3bc6474bbf strip: drop -b/--backup option (BC)
Matt Mackall <mpm@selenic.com>
parents: 21847
diff changeset
   772
  
22117
c1d93edcf004 help: fold repeatable option message into option table header
Matt Mackall <mpm@selenic.com>
parents: 22112
diff changeset
   773
  options ([+] can be repeated):
21854
ba3bc6474bbf strip: drop -b/--backup option (BC)
Matt Mackall <mpm@selenic.com>
parents: 21847
diff changeset
   774
  
40346
943248e47864 commands: adjust metavariables as appropriate
Anton Shestakov <av6@dwimlabs.net>
parents: 39921
diff changeset
   775
   -r --rev REV [+]           strip specified revision (optional, can specify
943248e47864 commands: adjust metavariables as appropriate
Anton Shestakov <av6@dwimlabs.net>
parents: 39921
diff changeset
   776
                              revisions without this option)
943248e47864 commands: adjust metavariables as appropriate
Anton Shestakov <av6@dwimlabs.net>
parents: 39921
diff changeset
   777
   -f --force                 force removal of changesets, discard uncommitted
943248e47864 commands: adjust metavariables as appropriate
Anton Shestakov <av6@dwimlabs.net>
parents: 39921
diff changeset
   778
                              changes (no backup)
943248e47864 commands: adjust metavariables as appropriate
Anton Shestakov <av6@dwimlabs.net>
parents: 39921
diff changeset
   779
      --no-backup             do not save backup bundle
943248e47864 commands: adjust metavariables as appropriate
Anton Shestakov <av6@dwimlabs.net>
parents: 39921
diff changeset
   780
   -k --keep                  do not modify working directory during strip
943248e47864 commands: adjust metavariables as appropriate
Anton Shestakov <av6@dwimlabs.net>
parents: 39921
diff changeset
   781
   -B --bookmark BOOKMARK [+] remove revs only reachable from given bookmark
943248e47864 commands: adjust metavariables as appropriate
Anton Shestakov <av6@dwimlabs.net>
parents: 39921
diff changeset
   782
      --mq                    operate on patch repository
21854
ba3bc6474bbf strip: drop -b/--backup option (BC)
Matt Mackall <mpm@selenic.com>
parents: 21847
diff changeset
   783
  
45880
d7a508a75d72 strip: move into core
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 45859
diff changeset
   784
  (use 'hg debugstrip -h' to show more help)
46262
9c9e0b4b2ca7 error: use detailed exit code 10 for command errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 45921
diff changeset
   785
  [10]
23835
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   786
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   787
  $ cd ..
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   788
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   789
Verify bundles don't get overwritten:
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   790
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   791
  $ hg init doublebundle
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   792
  $ cd doublebundle
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   793
  $ touch a
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   794
  $ hg commit -Aqm a
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   795
  $ touch b
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   796
  $ hg commit -Aqm b
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   797
  $ hg strip -r 0
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   798
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
   799
  saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg
23835
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   800
  $ ls .hg/strip-backup
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   801
  3903775176ed-e68910bd-backup.hg
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37415
diff changeset
   802
#if repobundlerepo
23835
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   803
  $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-e68910bd-backup.hg
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   804
  $ hg strip -r 0
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
   805
  saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg
23835
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   806
  $ ls .hg/strip-backup
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   807
  3903775176ed-54390173-backup.hg
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 22117
diff changeset
   808
  3903775176ed-e68910bd-backup.hg
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37415
diff changeset
   809
#endif
25677
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   810
  $ cd ..
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   811
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   812
Test that we only bundle the stripped changesets (issue4736)
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   813
------------------------------------------------------------
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   814
26173
0f14c40a05c4 test-strip: fix spelling of initialization (en-US)
timeless@mozdev.org
parents: 26012
diff changeset
   815
initialization (previous repo is empty anyway)
25677
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   816
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   817
  $ hg init issue4736
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   818
  $ cd issue4736
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   819
  $ echo a > a
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   820
  $ hg add a
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   821
  $ hg commit -m commitA
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   822
  $ echo b > b
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   823
  $ hg add b
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   824
  $ hg commit -m commitB
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   825
  $ echo c > c
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   826
  $ hg add c
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   827
  $ hg commit -m commitC
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   828
  $ hg up 'desc(commitB)'
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   829
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   830
  $ echo d > d
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   831
  $ hg add d
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   832
  $ hg commit -m commitD
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   833
  created new head
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   834
  $ hg up 'desc(commitC)'
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   835
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   836
  $ hg merge 'desc(commitD)'
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   837
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   838
  (branch merge, don't forget to commit)
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   839
  $ hg ci -m 'mergeCD'
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   840
  $ hg log -G
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   841
  @    changeset:   4:d8db9d137221
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   842
  |\   tag:         tip
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   843
  | |  parent:      2:5c51d8d6557d
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   844
  | |  parent:      3:6625a5168474
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   845
  | |  user:        test
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   846
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   847
  | |  summary:     mergeCD
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   848
  | |
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   849
  | o  changeset:   3:6625a5168474
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   850
  | |  parent:      1:eca11cf91c71
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   851
  | |  user:        test
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   852
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   853
  | |  summary:     commitD
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   854
  | |
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   855
  o |  changeset:   2:5c51d8d6557d
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   856
  |/   user:        test
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   857
  |    date:        Thu Jan 01 00:00:00 1970 +0000
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   858
  |    summary:     commitC
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   859
  |
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   860
  o  changeset:   1:eca11cf91c71
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   861
  |  user:        test
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   862
  |  date:        Thu Jan 01 00:00:00 1970 +0000
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   863
  |  summary:     commitB
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   864
  |
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   865
  o  changeset:   0:105141ef12d0
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   866
     user:        test
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   867
     date:        Thu Jan 01 00:00:00 1970 +0000
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   868
     summary:     commitA
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   869
  
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   870
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   871
Check bundle behavior:
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   872
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   873
  $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   874
  2 changesets found
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37415
diff changeset
   875
#if repobundlerepo
25677
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   876
  $ hg log -r 'bundle()' -R ../issue4736.hg
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   877
  changeset:   3:6625a5168474
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   878
  parent:      1:eca11cf91c71
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   879
  user:        test
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   880
  date:        Thu Jan 01 00:00:00 1970 +0000
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   881
  summary:     commitD
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   882
  
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   883
  changeset:   4:d8db9d137221
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   884
  tag:         tip
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   885
  parent:      2:5c51d8d6557d
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   886
  parent:      3:6625a5168474
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   887
  user:        test
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   888
  date:        Thu Jan 01 00:00:00 1970 +0000
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   889
  summary:     mergeCD
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   890
  
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37415
diff changeset
   891
#endif
25677
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   892
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   893
check strip behavior
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   894
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   895
  $ hg --config extensions.strip= strip 'desc(commitD)' --debug
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   896
  resolving manifests
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   897
   branchmerge: False, force: True, partial: False
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   898
   ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   899
   c: other deleted -> r
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   900
  removing c
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   901
   d: other deleted -> r
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   902
  removing d
28318
564a354f7f35 tests: flag Windows specific lines about background closing as optional
Matt Harbison <matt_harbison@yahoo.com>
parents: 28029
diff changeset
   903
  starting 4 threads for background file closing (?)
25677
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   904
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   905
  2 changesets found
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   906
  list of changesets:
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   907
  6625a516847449b6f0fa3737b9ba56e9f0f3032c
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   908
  d8db9d1372214336d2b5570f20ee468d2c72fa8b
36971
b89a7ef29013 bundle: include advisory rev branch cache part in bundle2 bundle
Boris Feld <boris.feld@octobus.net>
parents: 35886
diff changeset
   909
  bundle2-output-bundle: "HG20", (1 params) 3 parts total
29593
953839de96ab bundle2: store changeset count when creating file bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29592
diff changeset
   910
  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
37837
326b174c6a47 bundle2: mark the bundle2 part as advisory (issue5872)
Boris Feld <boris.feld@octobus.net>
parents: 37836
diff changeset
   911
  bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload
33044
8e3021fd1a44 strip: include phases in bundle (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents: 32718
diff changeset
   912
  bundle2-output-part: "phase-heads" 24 bytes payload
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
   913
  saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg
32307
c2380b448265 caches: move the 'updating the branch cache' message in 'updatecaches'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30152
diff changeset
   914
  updating the branch cache
42602
c7d236b55a3e py3: fix formatting of branchmap log messages with repo.filtername=None
Martin von Zweigbergk <martinvonz@google.com>
parents: 42539
diff changeset
   915
  invalid branch cache (served): tip differs
25677
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   916
  $ hg log -G
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   917
  o  changeset:   2:5c51d8d6557d
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   918
  |  tag:         tip
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   919
  |  user:        test
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   920
  |  date:        Thu Jan 01 00:00:00 1970 +0000
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   921
  |  summary:     commitC
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   922
  |
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   923
  @  changeset:   1:eca11cf91c71
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   924
  |  user:        test
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   925
  |  date:        Thu Jan 01 00:00:00 1970 +0000
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   926
  |  summary:     commitB
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   927
  |
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   928
  o  changeset:   0:105141ef12d0
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   929
     user:        test
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   930
     date:        Thu Jan 01 00:00:00 1970 +0000
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   931
     summary:     commitA
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   932
  
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   933
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   934
strip backup content
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   935
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37415
diff changeset
   936
#if repobundlerepo
25677
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   937
  $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   938
  changeset:   3:6625a5168474
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   939
  parent:      1:eca11cf91c71
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   940
  user:        test
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   941
  date:        Thu Jan 01 00:00:00 1970 +0000
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   942
  summary:     commitD
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   943
  
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   944
  changeset:   4:d8db9d137221
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   945
  tag:         tip
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   946
  parent:      2:5c51d8d6557d
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   947
  parent:      3:6625a5168474
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   948
  user:        test
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   949
  date:        Thu Jan 01 00:00:00 1970 +0000
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   950
  summary:     mergeCD
af5b2f4ed594 changegroup: properly compute common base in changeggroupsubset (issue4736)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24709
diff changeset
   951
  
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37415
diff changeset
   952
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37415
diff changeset
   953
#endif
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37415
diff changeset
   954
29196
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   955
Check that the phase cache is properly invalidated after a strip with bookmark.
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   956
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   957
  $ cat > ../stripstalephasecache.py << EOF
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   958
  > from mercurial import extensions, localrepo
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   959
  > def transactioncallback(orig, repo, desc, *args, **kwargs):
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   960
  >     def test(transaction):
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   961
  >         # observe cache inconsistency
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   962
  >         try:
35870
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
   963
  >             [repo.changelog.node(r) for r in repo.revs(b"not public()")]
29196
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   964
  >         except IndexError:
35870
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
   965
  >             repo.ui.status(b"Index error!\n")
29196
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   966
  >     transaction = orig(repo, desc, *args, **kwargs)
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   967
  >     # warm up the phase cache
35870
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
   968
  >     list(repo.revs(b"not public()"))
35886
c4c1e3334bcb tests: fix a missed b prefix in a test extension in test-strip.t
Augie Fackler <augie@google.com>
parents: 35870
diff changeset
   969
  >     if desc != b'strip':
35870
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
   970
  >          transaction.addpostclose(b"phase invalidation test", test)
29196
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   971
  >     return transaction
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   972
  > def extsetup(ui):
35870
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
   973
  >     extensions.wrapfunction(localrepo.localrepository, b"transaction",
29196
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   974
  >                             transactioncallback)
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   975
  > EOF
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   976
  $ hg up -C 2
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   977
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   978
  $ echo k > k
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   979
  $ hg add k
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   980
  $ hg commit -m commitK
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   981
  $ echo l > l
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   982
  $ hg add l
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   983
  $ hg commit -m commitL
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   984
  $ hg book -r tip blah
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   985
  $ hg strip ".^" --config extensions.crash=$TESTTMP/stripstalephasecache.py
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   986
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
   987
  saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/8f0b4384875c-4fa10deb-backup.hg
29196
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   988
  $ hg up -C 1
bf7b8157c483 strip: invalidate phase cache after stripping changeset (issue5235)
Laurent Charignon <lcharignon@fb.com>
parents: 28324
diff changeset
   989
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
26012
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
   990
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
   991
Error during post-close callback of the strip transaction
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
   992
(They should be gracefully handled and reported)
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
   993
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
   994
  $ cat > ../crashstrip.py << EOF
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
   995
  > from mercurial import error
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
   996
  > def reposetup(ui, repo):
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
   997
  >     class crashstriprepo(repo.__class__):
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
   998
  >         def transaction(self, desc, *args, **kwargs):
33540
e07c5740eaaa test-strip: fix call to super class in crashstriprepo
Boris Feld <boris.feld@octobus.net>
parents: 33331
diff changeset
   999
  >             tr = super(crashstriprepo, self).transaction(desc, *args, **kwargs)
35870
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1000
  >             if desc == b'strip':
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1001
  >                 def crash(tra): raise error.Abort(b'boom')
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1002
  >                 tr.addpostclose(b'crash', crash)
26012
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
  1003
  >             return tr
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
  1004
  >     repo.__class__ = crashstriprepo
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
  1005
  > EOF
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
  1006
  $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
  1007
  saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
  1008
  strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg'
26012
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
  1009
  abort: boom
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
  1010
  [255]
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
  1011
34621
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1012
test stripping a working directory parent doesn't switch named branches
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1013
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1014
  $ hg log -G
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1015
  @  changeset:   1:eca11cf91c71
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1016
  |  tag:         tip
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1017
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1018
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1019
  |  summary:     commitB
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1020
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1021
  o  changeset:   0:105141ef12d0
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1022
     user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1023
     date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1024
     summary:     commitA
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1025
  
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1026
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1027
  $ hg branch new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1028
  marked working directory as branch new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1029
  (branches are permanent and global, did you want a bookmark?)
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1030
  $ hg ci -m "start new branch"
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1031
  $ echo 'foo' > foo.txt
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1032
  $ hg ci -Aqm foo
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1033
  $ hg up default
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1034
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1035
  $ echo 'bar' > bar.txt
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1036
  $ hg ci -Aqm bar
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1037
  $ hg up new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1038
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1039
  $ hg merge default
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1040
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1041
  (branch merge, don't forget to commit)
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1042
  $ hg log -G
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1043
  @  changeset:   4:35358f982181
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1044
  |  tag:         tip
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1045
  |  parent:      1:eca11cf91c71
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1046
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1047
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1048
  |  summary:     bar
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1049
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1050
  | @  changeset:   3:f62c6c09b707
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1051
  | |  branch:      new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1052
  | |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1053
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1054
  | |  summary:     foo
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1055
  | |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1056
  | o  changeset:   2:b1d33a8cadd9
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1057
  |/   branch:      new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1058
  |    user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1059
  |    date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1060
  |    summary:     start new branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1061
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1062
  o  changeset:   1:eca11cf91c71
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1063
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1064
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1065
  |  summary:     commitB
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1066
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1067
  o  changeset:   0:105141ef12d0
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1068
     user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1069
     date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1070
     summary:     commitA
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1071
  
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1072
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1073
  $ hg strip --force -r 35358f982181
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1074
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
  1075
  saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-50d992d4-backup.hg
34621
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1076
  $ hg log -G
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1077
  @  changeset:   3:f62c6c09b707
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1078
  |  branch:      new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1079
  |  tag:         tip
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1080
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1081
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1082
  |  summary:     foo
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1083
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1084
  o  changeset:   2:b1d33a8cadd9
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1085
  |  branch:      new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1086
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1087
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1088
  |  summary:     start new branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1089
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1090
  o  changeset:   1:eca11cf91c71
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1091
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1092
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1093
  |  summary:     commitB
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1094
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1095
  o  changeset:   0:105141ef12d0
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1096
     user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1097
     date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1098
     summary:     commitA
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1099
  
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1100
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1101
  $ hg up default
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1102
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1103
  $ echo 'bar' > bar.txt
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1104
  $ hg ci -Aqm bar
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1105
  $ hg up new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1106
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1107
  $ hg merge default
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1108
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1109
  (branch merge, don't forget to commit)
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1110
  $ hg ci -m merge
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1111
  $ hg log -G
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1112
  @    changeset:   5:4cf5e92caec2
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1113
  |\   branch:      new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1114
  | |  tag:         tip
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1115
  | |  parent:      3:f62c6c09b707
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1116
  | |  parent:      4:35358f982181
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1117
  | |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1118
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1119
  | |  summary:     merge
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1120
  | |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1121
  | o  changeset:   4:35358f982181
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1122
  | |  parent:      1:eca11cf91c71
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1123
  | |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1124
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1125
  | |  summary:     bar
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1126
  | |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1127
  o |  changeset:   3:f62c6c09b707
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1128
  | |  branch:      new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1129
  | |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1130
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1131
  | |  summary:     foo
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1132
  | |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1133
  o |  changeset:   2:b1d33a8cadd9
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1134
  |/   branch:      new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1135
  |    user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1136
  |    date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1137
  |    summary:     start new branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1138
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1139
  o  changeset:   1:eca11cf91c71
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1140
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1141
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1142
  |  summary:     commitB
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1143
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1144
  o  changeset:   0:105141ef12d0
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1145
     user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1146
     date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1147
     summary:     commitA
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1148
  
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1149
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1150
  $ hg strip -r 35358f982181
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1151
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
  1152
  saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
34621
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1153
  $ hg log -G
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1154
  @  changeset:   3:f62c6c09b707
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1155
  |  branch:      new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1156
  |  tag:         tip
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1157
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1158
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1159
  |  summary:     foo
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1160
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1161
  o  changeset:   2:b1d33a8cadd9
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1162
  |  branch:      new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1163
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1164
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1165
  |  summary:     start new branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1166
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1167
  o  changeset:   1:eca11cf91c71
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1168
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1169
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1170
  |  summary:     commitB
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1171
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1172
  o  changeset:   0:105141ef12d0
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1173
     user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1174
     date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1175
     summary:     commitA
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1176
  
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1177
45218
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1178
stripping a set containing a merge properly reset file content, including items on other branches
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1179
45219
2bc978921e8a strip: with --keep, consider all revs "removed" from the wcp (issue6270)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45218
diff changeset
  1180
The added file is moved to unknown, which is the behavior we have been seeing for other `hg strip --keep` call.
2bc978921e8a strip: with --keep, consider all revs "removed" from the wcp (issue6270)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45218
diff changeset
  1181
2bc978921e8a strip: with --keep, consider all revs "removed" from the wcp (issue6270)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45218
diff changeset
  1182
stripping a set containing a merge properly reset file content, including items on other branches
2bc978921e8a strip: with --keep, consider all revs "removed" from the wcp (issue6270)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45218
diff changeset
  1183
2bc978921e8a strip: with --keep, consider all revs "removed" from the wcp (issue6270)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45218
diff changeset
  1184
The added file is moved to unknown, which is the behavior we have been seeing for other `hg strip --keep` call.
45218
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1185
37336
5d10f41ddcc4 tests: use `hg unbundle` instead of `hg pull` in some tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37330
diff changeset
  1186
  $ hg unbundle -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
34621
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1187
  adding changesets
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1188
  adding manifests
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1189
  adding file changes
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1190
  added 2 changesets with 1 changes to 1 files
39497
89630d0b3e23 phase: report number of non-public changeset alongside the new range
Boris Feld <boris.feld@octobus.net>
parents: 38575
diff changeset
  1191
  new changesets 35358f982181:4cf5e92caec2 (2 drafts)
34621
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1192
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1193
45218
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1194
  $ hg id
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1195
  4cf5e92caec2 (new-branch) tip
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1196
  $ hg status --rev "f62c6c09b707"
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1197
  A bar.txt
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1198
  $ hg diff --rev "f62c6c09b707"
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1199
  diff -r f62c6c09b707 bar.txt
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1200
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1201
  +++ b/bar.txt	Thu Jan 01 00:00:00 1970 +0000
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1202
  @@ -0,0 +1,1 @@
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1203
  +bar
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1204
  $ hg log -G -v --rev 35358f982181:: --patch
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1205
  @    changeset:   5:4cf5e92caec2
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1206
  |\   branch:      new-branch
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1207
  | ~  tag:         tip
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1208
  |    parent:      3:f62c6c09b707
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1209
  |    parent:      4:35358f982181
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1210
  |    user:        test
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1211
  |    date:        Thu Jan 01 00:00:00 1970 +0000
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1212
  |    description:
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1213
  |    merge
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1214
  |
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1215
  |
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1216
  |    diff -r f62c6c09b707 -r 4cf5e92caec2 bar.txt
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1217
  |    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1218
  |    +++ b/bar.txt	Thu Jan 01 00:00:00 1970 +0000
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1219
  |    @@ -0,0 +1,1 @@
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1220
  |    +bar
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1221
  |
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1222
  o  changeset:   4:35358f982181
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1223
  |  parent:      1:eca11cf91c71
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1224
  ~  user:        test
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1225
     date:        Thu Jan 01 00:00:00 1970 +0000
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1226
     files:       bar.txt
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1227
     description:
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1228
     bar
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1229
  
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1230
  
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1231
     diff -r eca11cf91c71 -r 35358f982181 bar.txt
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1232
     --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1233
     +++ b/bar.txt	Thu Jan 01 00:00:00 1970 +0000
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1234
     @@ -0,0 +1,1 @@
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1235
     +bar
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1236
  
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1237
34621
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1238
  $ hg strip -k -r 35358f982181
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
  1239
  saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
34621
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1240
  $ hg log -G
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1241
  @  changeset:   3:f62c6c09b707
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1242
  |  branch:      new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1243
  |  tag:         tip
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1244
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1245
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1246
  |  summary:     foo
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1247
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1248
  o  changeset:   2:b1d33a8cadd9
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1249
  |  branch:      new-branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1250
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1251
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1252
  |  summary:     start new branch
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1253
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1254
  o  changeset:   1:eca11cf91c71
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1255
  |  user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1256
  |  date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1257
  |  summary:     commitB
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1258
  |
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1259
  o  changeset:   0:105141ef12d0
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1260
     user:        test
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1261
     date:        Thu Jan 01 00:00:00 1970 +0000
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1262
     summary:     commitA
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1263
  
45218
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1264
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1265
  $ hg status -A
45219
2bc978921e8a strip: with --keep, consider all revs "removed" from the wcp (issue6270)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45218
diff changeset
  1266
  ? bar.txt
45218
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1267
  C a
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1268
  C b
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1269
  C foo.txt
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1270
  $ cat bar.txt
27822b8436bf test-strip: display more information highlight buggy behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44379
diff changeset
  1271
  bar
34621
5613fb1583d6 strip: take branch into account when selecting update target (issue5540)
Paul Morelle <paul.morelle@octobus.net>
parents: 34454
diff changeset
  1272
33099
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1273
Use delayedstrip to strip inside a transaction
26012
d815a5997576 strip: use the 'finally: tr.release' pattern during stripping
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25695
diff changeset
  1274
33099
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1275
  $ cd $TESTTMP
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1276
  $ hg init delayedstrip
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1277
  $ cd delayedstrip
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1278
  $ hg debugdrawdag <<'EOS'
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1279
  >   D
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1280
  >   |
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1281
  >   C F H    # Commit on top of "I",
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1282
  >   | |/|    # Strip B+D+I+E+G+H+Z
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1283
  > I B E G
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1284
  >  \|/
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1285
  >   A   Z
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1286
  > EOS
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1287
  $ cp -R . ../scmutilcleanup
33099
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1288
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1289
  $ hg up -C I
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1290
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1291
  $ echo 3 >> I
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1292
  $ cat > $TESTTMP/delayedstrip.py <<EOF
34454
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1293
  > from mercurial import commands, registrar, repair
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1294
  > cmdtable = {}
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1295
  > command = registrar.command(cmdtable)
35870
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1296
  > @command(b'testdelayedstrip')
34454
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1297
  > def testdelayedstrip(ui, repo):
33099
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1298
  >     def getnodes(expr):
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1299
  >         return [repo.changelog.node(r) for r in repo.revs(expr)]
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1300
  >     with repo.wlock():
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1301
  >         with repo.lock():
35870
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1302
  >             with repo.transaction(b'delayedstrip'):
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1303
  >                 repair.delayedstrip(ui, repo, getnodes(b'B+I+Z+D+E'), b'J')
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1304
  >                 repair.delayedstrip(ui, repo, getnodes(b'G+H+Z'), b'I')
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1305
  >                 commands.commit(ui, repo, message=b'J', date=b'0 0')
33099
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1306
  > EOF
34454
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1307
  $ hg testdelayedstrip --config extensions.t=$TESTTMP/delayedstrip.py
33099
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1308
  warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
  1309
  saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-17475721-I.hg
34454
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1310
33099
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1311
  $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)'
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1312
  @  6:2f2d51af6205 J
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1313
  |
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1314
  o  3:08ebfeb61bac I
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1315
  |
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1316
  | o  5:64a8289d2492 F
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1317
  | |
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1318
  | o  2:7fb047a69f22 E
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1319
  |/
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1320
  | o  4:26805aba1e60 C
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1321
  | |
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1322
  | o  1:112478962961 B
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1323
  |/
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1324
  o  0:426bada5c675 A
fcd1c483f5ea strip: add a delayedstrip method that works in a transaction
Jun Wu <quark@fb.com>
parents: 33044
diff changeset
  1325
  
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1326
Test high-level scmutil.cleanupnodes API
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1327
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1328
  $ cd $TESTTMP/scmutilcleanup
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1329
  $ hg debugdrawdag <<'EOS'
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1330
  >   D2  F2  G2   # D2, F2, G2 are replacements for D, F, G
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1331
  >   |   |   |
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1332
  >   C   H   G
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1333
  > EOS
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1334
  $ for i in B C D F G I Z; do
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1335
  >     hg bookmark -i -r $i b-$i
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1336
  > done
33331
4bae3c117b57 scmutil: make cleanupnodes delete divergent bookmarks
Jun Wu <quark@fb.com>
parents: 33100
diff changeset
  1337
  $ hg bookmark -i -r E 'b-F@divergent1'
4bae3c117b57 scmutil: make cleanupnodes delete divergent bookmarks
Jun Wu <quark@fb.com>
parents: 33100
diff changeset
  1338
  $ hg bookmark -i -r H 'b-F@divergent2'
4bae3c117b57 scmutil: make cleanupnodes delete divergent bookmarks
Jun Wu <quark@fb.com>
parents: 33100
diff changeset
  1339
  $ hg bookmark -i -r G 'b-F@divergent3'
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1340
  $ cp -R . ../scmutilcleanup.obsstore
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1341
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1342
  $ cat > $TESTTMP/scmutilcleanup.py <<EOF
34454
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1343
  > from mercurial import registrar, scmutil
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1344
  > cmdtable = {}
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1345
  > command = registrar.command(cmdtable)
35870
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1346
  > @command(b'testnodescleanup')
34454
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1347
  > def testnodescleanup(ui, repo):
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1348
  >     def nodes(expr):
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1349
  >         return [repo.changelog.node(r) for r in repo.revs(expr)]
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1350
  >     def node(expr):
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1351
  >         return nodes(expr)[0]
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1352
  >     with repo.wlock():
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1353
  >         with repo.lock():
35870
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1354
  >             with repo.transaction(b'delayedstrip'):
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1355
  >                 mapping = {node(b'F'): [node(b'F2')],
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1356
  >                            node(b'D'): [node(b'D2')],
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1357
  >                            node(b'G'): [node(b'G2')]}
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1358
  >                 scmutil.cleanupnodes(repo, mapping, b'replace')
39921
1857f50a9643 cleanupnodes: drop special casing around prune markers (API)
Boris Feld <boris.feld@octobus.net>
parents: 39497
diff changeset
  1359
  >                 scmutil.cleanupnodes(repo, nodes(b'((B::)+I+Z)-D2-obsolete()'),
35870
e689d8b22728 tests: bytestring-ify all the adhoc extensions in test-strip.t
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
  1360
  >                                      b'replace')
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1361
  > EOF
34454
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1362
  $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1363
  warning: orphaned descendants detected, not stripping 112478962961, 1fc8102cda62, 26805aba1e60
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
  1364
  saved backup bundle to $TESTTMP/scmutilcleanup/.hg/strip-backup/f585351a92f8-73fb7c03-replace.hg
34454
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1365
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1366
  $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
33331
4bae3c117b57 scmutil: make cleanupnodes delete divergent bookmarks
Jun Wu <quark@fb.com>
parents: 33100
diff changeset
  1367
  o  8:1473d4b996d1 G2 b-F@divergent3 b-G
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1368
  |
33558
0103e7187237 drawdag: include files from both parents in merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 33540
diff changeset
  1369
  | o  7:d11b3456a873 F2 b-F
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1370
  | |
33558
0103e7187237 drawdag: include files from both parents in merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 33540
diff changeset
  1371
  | o  5:5cb05ba470a7 H
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1372
  |/|
33331
4bae3c117b57 scmutil: make cleanupnodes delete divergent bookmarks
Jun Wu <quark@fb.com>
parents: 33100
diff changeset
  1373
  | o  3:7fb047a69f22 E b-F@divergent1
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1374
  | |
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1375
  | | o  6:7c78f703e465 D2 b-D
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1376
  | | |
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1377
  | | o  4:26805aba1e60 C
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1378
  | | |
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1379
  | | o  2:112478962961 B
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1380
  | |/
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1381
  o |  1:1fc8102cda62 G
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1382
   /
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1383
  o  0:426bada5c675 A b-B b-C b-I
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1384
  
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1385
  $ hg bookmark
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1386
     b-B                       0:426bada5c675
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1387
     b-C                       0:426bada5c675
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1388
     b-D                       6:7c78f703e465
33558
0103e7187237 drawdag: include files from both parents in merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 33540
diff changeset
  1389
     b-F                       7:d11b3456a873
33331
4bae3c117b57 scmutil: make cleanupnodes delete divergent bookmarks
Jun Wu <quark@fb.com>
parents: 33100
diff changeset
  1390
     b-F@divergent1            3:7fb047a69f22
4bae3c117b57 scmutil: make cleanupnodes delete divergent bookmarks
Jun Wu <quark@fb.com>
parents: 33100
diff changeset
  1391
     b-F@divergent3            8:1473d4b996d1
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1392
     b-G                       8:1473d4b996d1
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1393
     b-I                       0:426bada5c675
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1394
     b-Z                       -1:000000000000
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1395
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1396
Test the above using obsstore "by the way". Not directly related to strip, but
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1397
we have reusable code here
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1398
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1399
  $ cd $TESTTMP/scmutilcleanup.obsstore
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1400
  $ cat >> .hg/hgrc <<EOF
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1401
  > [experimental]
34865
a0100f34e20b config: replace experimental.stabilization by experimental.evolution
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
  1402
  > evolution=true
34870
64f29fff1877 config: rename stabilization.track-operation
Boris Feld <boris.feld@octobus.net>
parents: 34865
diff changeset
  1403
  > evolution.track-operation=1
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1404
  > EOF
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1405
34454
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1406
  $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
35709
1a09dad8b85a evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 35512
diff changeset
  1407
  4 new orphan changesets
34454
40b6d25ed2d5 test-strip: make test compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34293
diff changeset
  1408
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1409
  $ rm .hg/localtags
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1410
  $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
35512
9b3f95d9783d graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 35400
diff changeset
  1411
  *  12:1473d4b996d1 G2 b-F@divergent3 b-G
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1412
  |
35512
9b3f95d9783d graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 35400
diff changeset
  1413
  | *  11:d11b3456a873 F2 b-F
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1414
  | |
35512
9b3f95d9783d graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 35400
diff changeset
  1415
  | *  8:5cb05ba470a7 H
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1416
  |/|
33331
4bae3c117b57 scmutil: make cleanupnodes delete divergent bookmarks
Jun Wu <quark@fb.com>
parents: 33100
diff changeset
  1417
  | o  4:7fb047a69f22 E b-F@divergent1
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1418
  | |
35512
9b3f95d9783d graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 35400
diff changeset
  1419
  | | *  10:7c78f703e465 D2 b-D
33100
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1420
  | | |
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1421
  | | x  6:26805aba1e60 C
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1422
  | | |
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1423
  | | x  3:112478962961 B
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1424
  | |/
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1425
  x |  1:1fc8102cda62 G
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1426
   /
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1427
  o  0:426bada5c675 A b-B b-C b-I
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1428
  
65cadeea6c22 scmutil: add a cleanupnodes method for developers
Jun Wu <quark@fb.com>
parents: 33099
diff changeset
  1429
  $ hg debugobsolete
35017
a7e49a5b3e6f obsolete: activate effect-flag by default
Boris Feld <boris.feld@octobus.net>
parents: 34870
diff changeset
  1430
  1fc8102cda6204549f031015641606ccf5513ec3 1473d4b996d1d1b121de6b39fab6a04fbf9d873e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'}
a7e49a5b3e6f obsolete: activate effect-flag by default
Boris Feld <boris.feld@octobus.net>
parents: 34870
diff changeset
  1431
  64a8289d249234b9886244d379f15e6b650b28e3 d11b3456a873daec7c7bc53e5622e8df6d741bd2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'}
a7e49a5b3e6f obsolete: activate effect-flag by default
Boris Feld <boris.feld@octobus.net>
parents: 34870
diff changeset
  1432
  f585351a92f85104bff7c284233c338b10eb1df7 7c78f703e465d73102cc8780667ce269c5208a40 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'replace', 'user': 'test'}
a7e49a5b3e6f obsolete: activate effect-flag by default
Boris Feld <boris.feld@octobus.net>
parents: 34870
diff changeset
  1433
  48b9aae0607f43ff110d84e6883c151942add5ab 0 {0000000000000000000000000000000000000000} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
a7e49a5b3e6f obsolete: activate effect-flag by default
Boris Feld <boris.feld@octobus.net>
parents: 34870
diff changeset
  1434
  112478962961147124edd43549aedd1a335e44bf 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
a7e49a5b3e6f obsolete: activate effect-flag by default
Boris Feld <boris.feld@octobus.net>
parents: 34870
diff changeset
  1435
  08ebfeb61bac6e3f12079de774d285a0d6689eba 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
a7e49a5b3e6f obsolete: activate effect-flag by default
Boris Feld <boris.feld@octobus.net>
parents: 34870
diff changeset
  1436
  26805aba1e600a82e93661149f2313866a221a7b 0 {112478962961147124edd43549aedd1a335e44bf} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
33675
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1437
  $ cd ..
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1438
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1439
Test that obsmarkers are restored even when not using generaldelta
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1440
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1441
  $ hg --config format.usegeneraldelta=no init issue5678
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1442
  $ cd issue5678
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1443
  $ cat >> .hg/hgrc <<EOF
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1444
  > [experimental]
34865
a0100f34e20b config: replace experimental.stabilization by experimental.evolution
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
  1445
  > evolution=true
33675
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1446
  > EOF
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1447
  $ echo a > a
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1448
  $ hg ci -Aqm a
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1449
  $ hg ci --amend -m a2
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1450
  $ hg debugobsolete
35017
a7e49a5b3e6f obsolete: activate effect-flag by default
Boris Feld <boris.feld@octobus.net>
parents: 34870
diff changeset
  1451
  cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
33675
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1452
  $ hg strip .
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1453
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35017
diff changeset
  1454
  saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/489bac576828-bef27e14-backup.hg
33675
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1455
  $ hg unbundle -q .hg/strip-backup/*
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1456
  $ hg debugobsolete
35017
a7e49a5b3e6f obsolete: activate effect-flag by default
Boris Feld <boris.feld@octobus.net>
parents: 34870
diff changeset
  1457
  cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
33675
b5d7e7d5c573 tests: add test for issue5678
Martin von Zweigbergk <martinvonz@google.com>
parents: 33558
diff changeset
  1458
  $ cd ..