tests/test-topic-rebase.t
author Pulkit Goyal <7895pulkit@gmail.com>
Tue, 04 Jul 2017 01:30:14 +0530
changeset 2712 f19b314d8475
parent 2683 d22090c6e68f
child 2776 4dd84054ebbb
permissions -rw-r--r--
topics: add t0 and b0 to the stack t0 or b0 will be the base of the stack and it's the parent of t1 or b1. The cool thing about this is that if you update to t0 using `hg up t0` or do `hg prev` on t1, you will be updated to t0 with the current topic preserved. This patch adds t0 to stack and implement the preserving topic case for t0 while using `hg update`.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     1
test of the rebase command
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     2
--------------------------
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     3
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     4
  $ cat >> $HGRCPATH <<EOF
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     5
  > [defaults]
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     6
  > amend=-d "0 0"
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     7
  > fold=-d "0 0"
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     8
  > split=-d "0 0"
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     9
  > amend=-d "0 0"
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    10
  > [web]
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    11
  > push_ssl = false
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    12
  > allow_push = *
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    13
  > [phases]
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    14
  > publish = False
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    15
  > [diff]
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    16
  > git = 1
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    17
  > unified = 0
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    18
  > [ui]
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    19
  > interactive = true
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    20
  > [extensions]
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    21
  > hgext.graphlog=
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    22
  > rebase=
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    23
  > EOF
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    24
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    25
  $ echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic/" >> $HGRCPATH
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    26
  $ mkcommit() {
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    27
  >    echo "$1" > "$1"
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    28
  >    hg add "$1"
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    29
  >    hg ci -m "add $1" $2 $3
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    30
  > }
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    31
  $ logtopic() {
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    32
  >    hg log -G -T "{rev}:{node}\ntopics: {topics}" 
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    33
  > }
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    34
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    35
Check that rebase keep the topic in the simple case (1 changeset, no merge conflict)
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    36
------------------------------------------------------------------------------------
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    37
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    38
  $ hg init testrebase
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    39
  $ cd testrebase
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    40
  $ mkcommit ROOT
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    41
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    42
Work on myfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    43
  $ hg topic myfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    44
  $ mkcommit feature1
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    45
  $ hg stack
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    46
  ### topic: myfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    47
  ### branch: default
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    48
  t1@ add feature1 (current)
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2683
diff changeset
    49
  t0^ add ROOT (base)
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    50
  $ logtopic
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    51
  @  1:39e7a938055e87615edf675c24a10997ff05bb06
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    52
  |  topics: myfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    53
  o  0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    54
     topics:
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    55
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    56
Create another commit on default
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    57
  $ hg update --rev default
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    58
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    59
  $ mkcommit default
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    60
  $ logtopic
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    61
  @  2:be7622a7a0f43ba713e152f56441275f8e8711ef
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    62
  |  topics:
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    63
  | o  1:39e7a938055e87615edf675c24a10997ff05bb06
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    64
  |/   topics: myfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    65
  o  0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    66
     topics:
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    67
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    68
Rebase the commit
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    69
  $ hg update --rev 1
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    70
  switching to topic myfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    71
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    72
  $ hg rebase
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    73
  rebasing 1:39e7a938055e "add feature1"
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    74
  switching to topic myfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    75
  $ hg stack
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    76
  ### topic: myfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    77
  ### branch: default
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    78
  t1@ add feature1 (current)
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2683
diff changeset
    79
  t0^ add default (base)
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    80
  $ logtopic
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    81
  @  3:fc6593661cf3256ba165cbccd6019ead17cc3726
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    82
  |  topics: myfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    83
  o  2:be7622a7a0f43ba713e152f56441275f8e8711ef
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    84
  |  topics:
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    85
  o  0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    86
     topics:
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    87
  $ hg up 3
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    88
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    89
  $ hg stack
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    90
  ### topic: myfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    91
  ### branch: default
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    92
  t1@ add feature1 (current)
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2683
diff changeset
    93
  t0^ add default (base)
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    94
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    95
Check that rebase keep the topic in case of merge conflict
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    96
----------------------------------------------------------
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    97
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    98
Create a common base
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    99
  $ hg topic --clear
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   100
  $ echo "A" > file
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   101
  $ hg commit -A -m "default2" file
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   102
  created new head
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   103
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   104
Update the common file in a topic
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   105
  $ hg topic myotherfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   106
  $ echo "B" >> file
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   107
  $ hg commit -m "myotherfeature1"
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   108
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   109
Update the common file in default
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   110
  $ hg update --rev default
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   111
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   112
  $ echo "A2" > file
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   113
  $ hg commit -m "default3"
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   114
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   115
Rebase the topic
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   116
  $ hg update --rev 5
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   117
  switching to topic myotherfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   118
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   119
  $ hg rebase
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   120
  rebasing 5:81f854012ec5 "myotherfeature1"
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   121
  merging file
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   122
  warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   123
  switching to topic myotherfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   124
  unresolved conflicts (see hg resolve, then hg rebase --continue)
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   125
  [1]
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   126
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   127
Resolve the conflict
2683
d22090c6e68f tests: use a more portable form for new lines
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2679
diff changeset
   128
  $ echo A2 > file
d22090c6e68f tests: use a more portable form for new lines
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2679
diff changeset
   129
  $ echo B >> file
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   130
  $ hg resolve -m
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   131
  (no more unresolved files)
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   132
  continue: hg rebase --continue
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   133
  $ hg rebase --continue
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   134
  rebasing 5:81f854012ec5 "myotherfeature1"
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   135
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   136
Check the the commit has the right topic
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   137
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   138
  $ logtopic
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   139
  @  7:6ccb9ec4913b64f3ad719ff1ba66495a70bf35a4
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   140
  |  topics: myotherfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   141
  o  6:0b124ef641a7a6f4715d962650d3b367e8c800be
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   142
  |  topics:
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   143
  o  4:0cd2e1a45ac4e3f9603a05ccfa6d1c70cd759bc5
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   144
  |  topics:
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   145
  o  3:fc6593661cf3256ba165cbccd6019ead17cc3726
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   146
  |  topics: myfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   147
  o  2:be7622a7a0f43ba713e152f56441275f8e8711ef
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   148
  |  topics:
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   149
  o  0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   150
     topics:
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   151
  $ hg stack
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   152
  ### topic: myotherfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   153
  ### branch: default
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   154
  t1@ myotherfeature1 (current)
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2683
diff changeset
   155
  t0^ default3 (base)
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   156
  $ hg update --rev 7
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   157
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   158
  $ hg stack
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   159
  ### topic: myotherfeature
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   160
  ### branch: default
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   161
  t1@ myotherfeature1 (current)
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2683
diff changeset
   162
  t0^ default3 (base)