tests/test-rebase-emptycommit.t
author Gregory Szorc <gregory.szorc@gmail.com>
Mon, 13 Nov 2017 21:48:35 -0800
changeset 35139 1fb0846ad792
parent 34368 f61f5af5ed31
child 35400 4441705b7111
permissions -rw-r--r--
bundle2: inline changegroup.readexactly() Profiling reveals this loop is pretty tight. Literally any function call elimination can make a big difference. This commit inlines the relatively trivial changegroup.readexactly() method inside the loop. The results with `hg perfbundleread` on a bundle of the Firefox repo speak for themselves: ! read(8k) ! wall 0.679730 comb 0.680000 user 0.140000 sys 0.540000 (best of 15) ! read(16k) ! wall 0.577228 comb 0.570000 user 0.080000 sys 0.490000 (best of 17) ! read(32k) ! wall 0.516060 comb 0.520000 user 0.040000 sys 0.480000 (best of 20) ! read(128k) ! wall 0.496378 comb 0.490000 user 0.010000 sys 0.480000 (best of 20) ! bundle2 iterparts() ! wall 3.460903 comb 3.460000 user 2.760000 sys 0.700000 (best of 3) ! wall 3.056811 comb 3.050000 user 2.340000 sys 0.710000 (best of 4) ! bundle2 iterparts() seekable ! wall 4.312722 comb 4.310000 user 3.480000 sys 0.830000 (best of 3) ! wall 4.007676 comb 4.000000 user 3.170000 sys 0.830000 (best of 3) ! bundle2 part seek() ! wall 6.754764 comb 6.740000 user 3.970000 sys 2.770000 (best of 3) ! wall 6.267110 comb 6.250000 user 3.480000 sys 2.770000 (best of 3) ! bundle2 part read(8k) ! wall 3.668004 comb 3.660000 user 2.960000 sys 0.700000 (best of 3) ! wall 3.404164 comb 3.400000 user 2.650000 sys 0.750000 (best of 3) ! bundle2 part read(16k) ! wall 3.489196 comb 3.480000 user 2.750000 sys 0.730000 (best of 3) ! wall 3.197972 comb 3.200000 user 2.490000 sys 0.710000 (best of 4) ! bundle2 part read(32k) ! wall 3.388569 comb 3.380000 user 2.640000 sys 0.740000 (best of 3) ! wall 3.060557 comb 3.060000 user 2.340000 sys 0.720000 (best of 4) ! bundle2 part read(128k) ! wall 3.276415 comb 3.270000 user 2.560000 sys 0.710000 (best of 4) ! wall 2.952209 comb 2.950000 user 2.230000 sys 0.720000 (best of 4) Differential Revision: https://phab.mercurial-scm.org/D1392
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33590
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH<<EOF
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
     2
  > [extensions]
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
     3
  > rebase=
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
     4
  > drawdag=$TESTDIR/drawdag.py
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
     5
  > EOF
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
     6
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
     7
  $ hg init non-merge
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
     8
  $ cd non-merge
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
     9
  $ hg debugdrawdag<<'EOS'
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    10
  >   F
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    11
  >   |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    12
  >   E
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    13
  >   |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    14
  >   D
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    15
  >   |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    16
  > B C
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    17
  > |/
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    18
  > A
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    19
  > EOS
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    20
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    21
  $ for i in C D E F; do
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    22
  >   hg bookmark -r $i -i BOOK-$i
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    23
  > done
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    24
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    25
  $ hg debugdrawdag<<'EOS'
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    26
  > E
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    27
  > |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    28
  > D
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    29
  > |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    30
  > B
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    31
  > EOS
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    32
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    33
  $ hg log -G -T '{rev} {desc} {bookmarks}'
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    34
  o  7 E
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    35
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    36
  o  6 D
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    37
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    38
  | o  5 F BOOK-F
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    39
  | |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    40
  | o  4 E BOOK-E
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    41
  | |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    42
  | o  3 D BOOK-D
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    43
  | |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    44
  | o  2 C BOOK-C
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    45
  | |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    46
  o |  1 B
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    47
  |/
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    48
  o  0 A
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    49
  
33686
2f427b57bf90 rebase: move bookmarks with --keep (issue5682)
Jun Wu <quark@fb.com>
parents: 33590
diff changeset
    50
With --keep, bookmark should move
33590
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    51
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    52
  $ hg rebase -r 3+4 -d E --keep
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    53
  rebasing 3:e7b3f00ed42e "D" (BOOK-D)
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    54
  note: rebase of 3:e7b3f00ed42e created no changes to commit
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    55
  rebasing 4:69a34c08022a "E" (BOOK-E)
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    56
  note: rebase of 4:69a34c08022a created no changes to commit
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    57
  $ hg log -G -T '{rev} {desc} {bookmarks}'
33686
2f427b57bf90 rebase: move bookmarks with --keep (issue5682)
Jun Wu <quark@fb.com>
parents: 33590
diff changeset
    58
  o  7 E BOOK-D BOOK-E
33590
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    59
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    60
  o  6 D
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    61
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    62
  | o  5 F BOOK-F
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    63
  | |
33686
2f427b57bf90 rebase: move bookmarks with --keep (issue5682)
Jun Wu <quark@fb.com>
parents: 33590
diff changeset
    64
  | o  4 E
33590
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    65
  | |
33686
2f427b57bf90 rebase: move bookmarks with --keep (issue5682)
Jun Wu <quark@fb.com>
parents: 33590
diff changeset
    66
  | o  3 D
33590
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    67
  | |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    68
  | o  2 C BOOK-C
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    69
  | |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    70
  o |  1 B
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    71
  |/
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    72
  o  0 A
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    73
  
33686
2f427b57bf90 rebase: move bookmarks with --keep (issue5682)
Jun Wu <quark@fb.com>
parents: 33590
diff changeset
    74
Move D and E back for the next test
2f427b57bf90 rebase: move bookmarks with --keep (issue5682)
Jun Wu <quark@fb.com>
parents: 33590
diff changeset
    75
2f427b57bf90 rebase: move bookmarks with --keep (issue5682)
Jun Wu <quark@fb.com>
parents: 33590
diff changeset
    76
  $ hg bookmark BOOK-D -fqir 3
2f427b57bf90 rebase: move bookmarks with --keep (issue5682)
Jun Wu <quark@fb.com>
parents: 33590
diff changeset
    77
  $ hg bookmark BOOK-E -fqir 4
2f427b57bf90 rebase: move bookmarks with --keep (issue5682)
Jun Wu <quark@fb.com>
parents: 33590
diff changeset
    78
33590
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    79
Bookmark is usually an indication of a head. For changes that are introduced by
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    80
an ancestor of bookmark B, after moving B to B-NEW, the changes are ideally
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    81
still introduced by an ancestor of changeset on B-NEW. In the below case,
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    82
"BOOK-D", and "BOOK-E" include changes introduced by "C".
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    83
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    84
  $ hg rebase -s 2 -d E
34297
4f969b9e0cf5 rebase: also include other namespaces in changeset description
Martin von Zweigbergk <martinvonz@google.com>
parents: 33590
diff changeset
    85
  rebasing 2:dc0947a82db8 "C" (BOOK-C C)
33590
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    86
  rebasing 3:e7b3f00ed42e "D" (BOOK-D)
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    87
  note: rebase of 3:e7b3f00ed42e created no changes to commit
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    88
  rebasing 4:69a34c08022a "E" (BOOK-E)
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    89
  note: rebase of 4:69a34c08022a created no changes to commit
34297
4f969b9e0cf5 rebase: also include other namespaces in changeset description
Martin von Zweigbergk <martinvonz@google.com>
parents: 33590
diff changeset
    90
  rebasing 5:6b2aeab91270 "F" (BOOK-F F)
33590
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    91
  saved backup bundle to $TESTTMP/non-merge/.hg/strip-backup/dc0947a82db8-52bb4973-rebase.hg (glob)
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    92
  $ hg log -G -T '{rev} {desc} {bookmarks}'
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    93
  o  5 F BOOK-F
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    94
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    95
  o  4 C BOOK-C BOOK-D BOOK-E
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    96
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    97
  o  3 E
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    98
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
    99
  o  2 D
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   100
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   101
  o  1 B
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   102
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   103
  o  0 A
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   104
  
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   105
Merge and its ancestors all become empty
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   106
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   107
  $ hg init $TESTTMP/merge1
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   108
  $ cd $TESTTMP/merge1
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   109
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   110
  $ hg debugdrawdag<<'EOS'
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   111
  >     E
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   112
  >    /|
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   113
  > B C D
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   114
  >  \|/
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   115
  >   A
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   116
  > EOS
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   117
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   118
  $ for i in C D E; do
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   119
  >   hg bookmark -r $i -i BOOK-$i
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   120
  > done
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   121
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   122
  $ hg debugdrawdag<<'EOS'
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   123
  > H
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   124
  > |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   125
  > D
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   126
  > |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   127
  > C
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   128
  > |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   129
  > B
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   130
  > EOS
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   131
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   132
  $ hg rebase -r '(A::)-(B::)-A' -d H
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   133
  rebasing 2:dc0947a82db8 "C" (BOOK-C)
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   134
  note: rebase of 2:dc0947a82db8 created no changes to commit
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   135
  rebasing 3:b18e25de2cf5 "D" (BOOK-D)
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   136
  note: rebase of 3:b18e25de2cf5 created no changes to commit
34297
4f969b9e0cf5 rebase: also include other namespaces in changeset description
Martin von Zweigbergk <martinvonz@google.com>
parents: 33590
diff changeset
   137
  rebasing 4:86a1f6686812 "E" (BOOK-E E)
33590
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   138
  note: rebase of 4:86a1f6686812 created no changes to commit
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   139
  saved backup bundle to $TESTTMP/merge1/.hg/strip-backup/b18e25de2cf5-1fd0a4ba-rebase.hg (glob)
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   140
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   141
  $ hg log -G -T '{rev} {desc} {bookmarks}'
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   142
  o  4 H BOOK-C BOOK-D BOOK-E
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   143
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   144
  o  3 D
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   145
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   146
  o  2 C
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   147
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   148
  o  1 B
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   149
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   150
  o  0 A
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   151
  
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   152
Part of ancestors of a merge become empty
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   153
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   154
  $ hg init $TESTTMP/merge2
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   155
  $ cd $TESTTMP/merge2
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   156
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   157
  $ hg debugdrawdag<<'EOS'
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   158
  >     G
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   159
  >    /|
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   160
  >   E F
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   161
  >   | |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   162
  > B C D
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   163
  >  \|/
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   164
  >   A
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   165
  > EOS
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   166
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   167
  $ for i in C D E F G; do
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   168
  >   hg bookmark -r $i -i BOOK-$i
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   169
  > done
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   170
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   171
  $ hg debugdrawdag<<'EOS'
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   172
  > H
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   173
  > |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   174
  > F
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   175
  > |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   176
  > C
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   177
  > |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   178
  > B
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   179
  > EOS
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   180
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   181
  $ hg rebase -r '(A::)-(B::)-A' -d H
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   182
  rebasing 2:dc0947a82db8 "C" (BOOK-C)
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   183
  note: rebase of 2:dc0947a82db8 created no changes to commit
34297
4f969b9e0cf5 rebase: also include other namespaces in changeset description
Martin von Zweigbergk <martinvonz@google.com>
parents: 33590
diff changeset
   184
  rebasing 3:b18e25de2cf5 "D" (BOOK-D D)
4f969b9e0cf5 rebase: also include other namespaces in changeset description
Martin von Zweigbergk <martinvonz@google.com>
parents: 33590
diff changeset
   185
  rebasing 4:03ca77807e91 "E" (BOOK-E E)
33590
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   186
  rebasing 5:ad6717a6a58e "F" (BOOK-F)
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   187
  note: rebase of 5:ad6717a6a58e created no changes to commit
34297
4f969b9e0cf5 rebase: also include other namespaces in changeset description
Martin von Zweigbergk <martinvonz@google.com>
parents: 33590
diff changeset
   188
  rebasing 6:c58e8bdac1f4 "G" (BOOK-G G)
33590
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   189
  saved backup bundle to $TESTTMP/merge2/.hg/strip-backup/b18e25de2cf5-2d487005-rebase.hg (glob)
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   190
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   191
  $ hg log -G -T '{rev} {desc} {bookmarks}'
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   192
  o    7 G BOOK-G
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   193
  |\
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   194
  | o  6 E BOOK-E
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   195
  | |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   196
  o |  5 D BOOK-D BOOK-F
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   197
  |/
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   198
  o  4 H BOOK-C
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   199
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   200
  o  3 F
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   201
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   202
  o  2 C
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   203
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   204
  o  1 B
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   205
  |
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   206
  o  0 A
52f82e7d6a7e rebase: move bookmark to destination for commits becoming empty (issue5627)
Jun Wu <quark@fb.com>
parents:
diff changeset
   207