tests/test-rebase-emptycommit.t
author Anton Shestakov <av6@dwimlabs.net>
Sun, 15 Apr 2018 19:41:34 +0800
changeset 37707 24fee31fda05
parent 35393 4441705b7111
child 40864 09680349cc2d
permissions -rw-r--r--
templates: adjust white space amount in the output of {whyunstable} There used to be 2 spaces between divergent nodes (when not using custom template for divergentnodes) because divergentnodes is a hybrid list, which means it gets ' '.join()ed, but formatnode() already had a space. Now it doesn't, which requires extra effort in writing custom templates for whyunstable, but at least it looks correctly by default. Test output needs to be sorted for stability.
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
  
34354
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}'
34354
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
  | |
34354
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
  | |
34354
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
  
34354
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
34290
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
34290
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)
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34367
diff changeset
    91
  saved backup bundle to $TESTTMP/non-merge/.hg/strip-backup/dc0947a82db8-52bb4973-rebase.hg
33590
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
34290
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
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34367
diff changeset
   139
  saved backup bundle to $TESTTMP/merge1/.hg/strip-backup/b18e25de2cf5-1fd0a4ba-rebase.hg
33590
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
34290
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
34290
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)
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34367
diff changeset
   189
  saved backup bundle to $TESTTMP/merge2/.hg/strip-backup/b18e25de2cf5-2d487005-rebase.hg
33590
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