docs/tutorials/tutorial.t
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 23 Apr 2012 18:54:17 +0200
changeset 211 69a37d56c7fb
parent 209 7bee48a54c4a
child 217 786eb34d93ea
permissions -rw-r--r--
evolve: issue the "%i new unstable changeset" in more place most command able to create unstability now issue the warning
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     1
Mutable History and collaboration
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     2
=====================================================================
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     3
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     4
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     5
.. warning:: need heavy update
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     6
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     7
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     8
Single Developer Usage
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     9
======================
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    10
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    11
This tutorial shows how to use evolution to replace the basics of *mq*.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    12
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    13
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    14
Amending a changeset
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    15
---------------------
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    16
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    17
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    18
First there is some setup phase you will understand later.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    19
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    20
there is a local repository and a remote one.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    21
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    22
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    23
  $ cat >> $HGRCPATH << EOF
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    24
  > [ui]
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    25
  > logtemplate ="{node|short} ({phase}): {desc}\n"
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    26
  > [diff]
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    27
  > git = 1
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    28
  > [alias]
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    29
  > amend = amend -d '0 0'
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    30
  > [extensions]
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    31
  > hgext.graphlog=
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    32
  > hgext.rebase=
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    33
  > EOF
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    34
  $ $(dirname $TESTDIR)/enable.sh >> $HGRCPATH 2> /dev/null
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    35
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    36
  $ hg init local
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    37
  $ cat >> local/.hg/hgrc << EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    38
  > [paths]
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    39
  > remote = ../remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    40
  > [ui]
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    41
  > user = Babar the King
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    42
  > EOF
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    43
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    44
  $ hg init remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    45
  $ cat >> remote/.hg/hgrc << EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    46
  > [paths]
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    47
  > local = ../local
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    48
  > [ui]
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    49
  > user = Celestine the Queen
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    50
  > EOF
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    51
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    52
  $ cd local
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    53
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    54
You can reopen you eyes.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    55
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    56
Now we make a first version of our shopping list.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    57
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    58
  $ cat  >> shopping << EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    59
  > Spam
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    60
  > Whizzo butter
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    61
  > Albatross
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    62
  > Rat (rather a lot)
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    63
  > Jugged fish
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    64
  > Blancmange
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    65
  > Salmon mousse
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    66
  > EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    67
  $ hg commit -A -m "Monthy Python Shopping list"
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    68
  adding shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    69
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    70
We share this first version with the outside.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    71
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    72
  $ hg push remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    73
  pushing to $TESTTMP/remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    74
  searching for changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    75
  adding changesets
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    76
  adding manifests
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    77
  adding file changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    78
  added 1 changesets with 1 changes to 1 files
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    79
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    80
Later I add additional item to my list
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    81
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    82
  $ cat >> shopping << EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    83
  > Egg
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    84
  > Suggar
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    85
  > Vinegar
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    86
  > Oil
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    87
  > EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    88
  $ hg commit -m "adding condiment"
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    89
  $ cat >> shopping << EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    90
  > Bananos
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    91
  > Pear
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    92
  > Apple
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    93
  > EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    94
  $ hg commit -m "adding fruit"
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    95
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    96
I now have the following history:
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    97
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    98
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
    99
  d85de4546133 (draft): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   100
  4d5dc8187023 (draft): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   101
  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   102
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   103
But, I just notice, I made a typo in Banana.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   104
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   105
  $ hg export tip
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   106
  # HG changeset patch
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   107
  # User test
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   108
  # Date 0 0
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   109
  # Node ID d85de4546133030c82d257bbcdd9b1b416d0c31c
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   110
  # Parent  4d5dc81870237d492284826e21840b2ca00e26d1
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   111
  adding fruit
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   112
  
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   113
  diff --git a/shopping b/shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   114
  --- a/shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   115
  +++ b/shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   116
  @@ -9,3 +9,6 @@
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   117
   Suggar
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   118
   Vinegar
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   119
   Oil
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   120
  +Bananos
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   121
  +Pear
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   122
  +Apple
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   123
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   124
The faulty changeset is in the "draft" phase because he was not exchanged with the outside. The first one have been exchanged and is an immutable public changeset
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   125
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   126
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   127
  d85de4546133 (draft): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   128
  4d5dc8187023 (draft): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   129
  7e82d3f3c2cb (public): Monthy Python Shopping list
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   130
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   131
hopefully. I can use hg amend to rewrite my faulty changeset!
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   132
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   133
  $ sed -i'' -e s/Bananos/Banana/ shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   134
  $ hg diff
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   135
  diff --git a/shopping b/shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   136
  --- a/shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   137
  +++ b/shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   138
  @@ -9,6 +9,6 @@
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   139
   Suggar
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   140
   Vinegar
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   141
   Oil
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   142
  -Bananos
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   143
  +Banana
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   144
   Pear
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   145
   Apple
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   146
  $ hg amend
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   147
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   148
A new changeset with the right diff replace the wrong one.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   149
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   150
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   151
  0cacb48f4482 (draft): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   152
  4d5dc8187023 (draft): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   153
  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   154
  $ hg export tip
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   155
  # HG changeset patch
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   156
  # User test
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   157
  # Date 0 0
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   158
  # Node ID 0cacb48f44828d2fd31c4e45e18fde32a5b2f07b
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   159
  # Parent  4d5dc81870237d492284826e21840b2ca00e26d1
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   160
  adding fruit
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   161
  
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   162
  diff --git a/shopping b/shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   163
  --- a/shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   164
  +++ b/shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   165
  @@ -9,3 +9,6 @@
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   166
   Suggar
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   167
   Vinegar
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   168
   Oil
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   169
  +Banana
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   170
  +Pear
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   171
  +Apple
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   172
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   173
Getting Ride of branchy history
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   174
----------------------------------
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   175
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   176
While I was working on my list. someone help made a change remotly.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   177
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   178
close your eyes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   179
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   180
  $ cd ../remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   181
  $ hg up -q
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   182
  $ sed -i'' -e 's/Spam/Spam Spam Spam/' shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   183
  $ hg ci -m 'SPAM'
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   184
  $ cd ../local
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   185
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   186
open your eyes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   187
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   188
  $ hg pull remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   189
  pulling from $TESTTMP/remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   190
  searching for changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   191
  adding changesets
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   192
  adding manifests
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   193
  adding file changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   194
  added 1 changesets with 1 changes to 1 files (+1 heads)
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   195
  (run 'hg heads .' to see heads, 'hg merge' to merge)
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   196
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   197
I now have a new heads. Note that the remote head is immutable
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   198
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   199
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   200
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   201
  0cacb48f4482 (draft): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   202
  4d5dc8187023 (draft): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   203
  7e82d3f3c2cb (public): Monthy Python Shopping list
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   204
  $ hg log -G
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   205
  o  9ca060c80d74 (public): SPAM
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   206
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   207
  | @  0cacb48f4482 (draft): adding fruit
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   208
  | |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   209
  | o  4d5dc8187023 (draft): adding condiment
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   210
  |/
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   211
  o  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   212
  
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   213
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   214
instead of merging my head with the new one. I'm going to rebase my work
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   215
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   216
  $ hg diff
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   217
  $ hg rebase -d 9ca060c80d74 -s 4d5dc8187023
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   218
  merging shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   219
  merging shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   220
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   221
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   222
My local work is now rebased on the remote one.
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   223
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   224
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   225
  387187ad9bd9 (draft): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   226
  dfd3a2d7691e (draft): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   227
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   228
  7e82d3f3c2cb (public): Monthy Python Shopping list
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   229
  $ hg log -G
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   230
  @  387187ad9bd9 (draft): adding fruit
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   231
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   232
  o  dfd3a2d7691e (draft): adding condiment
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   233
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   234
  o  9ca060c80d74 (public): SPAM
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   235
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   236
  o  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   237
  
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   238
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   239
Removing changeset
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   240
------------------------
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   241
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   242
I add new item to my list
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   243
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   244
  $ cat >> shopping << EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   245
  > car
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   246
  > bus
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   247
  > plane
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   248
  > boat
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   249
  > EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   250
  $ hg ci -m 'transport'
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   251
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   252
  d58c77aa15d7 (draft): transport
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   253
  387187ad9bd9 (draft): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   254
  dfd3a2d7691e (draft): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   255
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   256
  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   257
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   258
I have a new commit but I realize that don't want it. (transport shop list does
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   259
not fit well in my standard shopping list)
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   260
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   261
  $ hg kill . # . is for working directory parent.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   262
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   263
  working directory now at 387187ad9bd9
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   264
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   265
The silly changeset is gone.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   266
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   267
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   268
  387187ad9bd9 (draft): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   269
  dfd3a2d7691e (draft): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   270
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   271
  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   272
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   273
Reordering changeset
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   274
------------------------
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   275
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   276
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   277
We create two changeset.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   278
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   279
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   280
  $ cat >> shopping << EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   281
  > Shampoo
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   282
  > Toothbrush
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   283
  > ... More bathroom stuff to come
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   284
  > Towel
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   285
  > Soap
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   286
  > EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   287
  $ hg ci -m 'bathroom stuff' -q # XXX remove the -q
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   288
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   289
  $ sed -i'' -e 's/Spam/Spam Spam Spam/g' shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   290
  $ hg ci -m 'SPAM SPAM'
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   291
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   292
  c48f32fb1787 (draft): SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   293
  8d39a843582d (draft): bathroom stuff
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   294
  387187ad9bd9 (draft): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   295
  dfd3a2d7691e (draft): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   296
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   297
  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   298
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   299
.. note: don't amend changeset 7e82d3f3c2cb or 9ca060c80d74 as they are
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   300
immutable.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   301
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   302
I now want to push to remote all my change but the bathroom one that i'm not totally happy with yet.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   303
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   304
To be able to push "SPAM SPAM" I need a version of "SPAM SPAM" not children of "bathroom stuff"
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   305
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   306
You can use 'rebase -r' or 'graft -O' for that:
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   307
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   308
  $ hg up 'p1(8d39a843582d)' # going on "bathroom stuff" parent
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   309
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   310
  $ hg graft -O c48f32fb1787 # moving "SPAM SPAM" to the working directory parent
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   311
  grafting revision 10
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   312
  merging shopping
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   313
  $ hg log -G
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   314
  @  a2fccc2e7b08 (draft): SPAM SPAM
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   315
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   316
  | o  8d39a843582d (draft): bathroom stuff
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   317
  |/
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   318
  o  387187ad9bd9 (draft): adding fruit
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   319
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   320
  o  dfd3a2d7691e (draft): adding condiment
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   321
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   322
  o  9ca060c80d74 (public): SPAM
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   323
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   324
  o  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   325
  
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   326
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   327
We have a new SPAM SPAM version without the bathroom stuff
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   328
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   329
  $ grep Spam shopping  # enouth spamm
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   330
  Spam Spam Spam Spam Spam Spam Spam Spam Spam
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   331
  $ grep Toothbrush shopping # no Toothbrush
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   332
  [1]
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   333
  $ hg export .
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   334
  # HG changeset patch
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   335
  # User test
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   336
  # Date 0 0
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   337
  # Node ID a2fccc2e7b08bbce6af7255b989453f7089e4cf0
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   338
  # Parent  387187ad9bd9d8f9a00a9fa804a26231db547429
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   339
  SPAM SPAM
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   340
  
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   341
  diff --git a/shopping b/shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   342
  --- a/shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   343
  +++ b/shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   344
  @@ -1,4 +1,4 @@
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   345
  -Spam Spam Spam
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   346
  +Spam Spam Spam Spam Spam Spam Spam Spam Spam
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   347
   Whizzo butter
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   348
   Albatross
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   349
   Rat (rather a lot)
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   350
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   351
To make sure I do not push unready changeset by mistake I set the "bathroom
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   352
stuff" changeset in the secret phase.
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   353
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   354
  $ hg phase --force --secret 8d39a843582d
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   355
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   356
we can now push our change:
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   357
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   358
  $ hg push remote
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   359
  pushing to $TESTTMP/remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   360
  searching for changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   361
  adding changesets
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   362
  adding manifests
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   363
  adding file changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   364
  added 3 changesets with 3 changes to 1 files
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   365
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   366
for simplicity shake we get the bathroom change in line again
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   367
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   368
  $ hg rebase -Dr 8d39a843582d -d a2fccc2e7b08
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   369
  merging shopping
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   370
  $ hg phase --draft .
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   371
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   372
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   373
Splitting change
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   374
------------------
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   375
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   376
To be done (currently achieve with "two commit + debugobsolete")
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   377
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   378
Collapsing change
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   379
------------------
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   380
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   381
To be done (currently achieve with "revert + debugobsolete" or "rebase --collapse")
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   382
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   383
collaboration
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   384
====================
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   385
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   386
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   387
sharing mutable changeset
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   388
----------------------------
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   389
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   390
To share mutable changeset with other just check that the repo you interact
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   391
with is "not publishing". Otherwise you will get the previously observe
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   392
behavior where exchanged changeset are automatically published.
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   393
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   394
  $ cd ../remote
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   395
  $ hg -R ../local/ showconfig phases
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   396
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   397
the localrepo does not have any specific configuration for `phases.publish`. It is ``true`` by default.
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   398
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   399
  $ hg pull local
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   400
  pulling from $TESTTMP/local
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   401
  searching for changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   402
  adding changesets
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   403
  adding manifests
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   404
  adding file changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   405
  added 1 changesets with 1 changes to 1 files
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   406
  (run 'hg update' to get a working copy)
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   407
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   408
  8a79ae8b029e (public): bathroom stuff
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   409
  a2fccc2e7b08 (public): SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   410
  387187ad9bd9 (public): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   411
  dfd3a2d7691e (public): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   412
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   413
  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   414
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   415
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   416
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   417
We do not want to publish the "bathroom changeset". Let's rollback the last transaction
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   418
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   419
  $ hg rollback
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   420
  repository tip rolled back to revision 4 (undo pull)
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   421
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   422
  a2fccc2e7b08 (public): SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   423
  387187ad9bd9 (public): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   424
  dfd3a2d7691e (public): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   425
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   426
  7e82d3f3c2cb (public): Monthy Python Shopping list
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   427
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   428
Let's make thz local repo "non publishing"
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   429
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   430
  $ echo "[phases]\npublish=false" >> ../local/.hg/hgrc
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   431
  $ echo "[phases]\npublish=false" >> .hg/hgrc
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   432
  $ hg showconfig phases
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   433
  phases.publish=false
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   434
  $ hg -R ../local/ showconfig phases
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   435
  phases.publish=false
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   436
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   437
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   438
I can now exchange mutable changeset between "remote" and "local" repository.
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   439
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   440
  $ hg pull local
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   441
  pulling from $TESTTMP/local
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   442
  searching for changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   443
  adding changesets
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   444
  adding manifests
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   445
  adding file changes
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   446
  added 1 changesets with 1 changes to 1 files
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   447
  (run 'hg update' to get a working copy)
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   448
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   449
  8a79ae8b029e (draft): bathroom stuff
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   450
  a2fccc2e7b08 (public): SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   451
  387187ad9bd9 (public): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   452
  dfd3a2d7691e (public): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   453
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   454
  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   455
211
69a37d56c7fb evolve: issue the "%i new unstable changeset" in more place
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 209
diff changeset
   456
Rebasing unstable change after pull
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   457
----------------------------------------------
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   458
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   459
Remotely someone add a new changeset on top of our mutable "bathroom" on.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   460
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   461
  $ hg up 8a79ae8b029e -q
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   462
  $ cat >> shopping << EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   463
  > Giraffe
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   464
  > Rhino
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   465
  > Lion
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   466
  > Bear
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   467
  > EOF
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   468
  $ hg ci -m 'animals' -q # XXX remove the -q
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   469
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   470
While this time locally, we updated "bathroom changeset"
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   471
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   472
  $ cd ../local
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   473
  $ hg up 8a79ae8b029e -q
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   474
  $ sed -i'' -e 's/... More bathroom stuff to come/Bath Robe/' shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   475
  $ hg amend
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   476
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   477
  ffa278c50818 (draft): bathroom stuff
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   478
  a2fccc2e7b08 (public): SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   479
  387187ad9bd9 (public): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   480
  dfd3a2d7691e (public): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   481
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   482
  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   483
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   484
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   485
When we pull from remote again we get an unstable state!
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   486
211
69a37d56c7fb evolve: issue the "%i new unstable changeset" in more place
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 209
diff changeset
   487
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   488
  $ hg pull remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   489
  pulling from $TESTTMP/remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   490
  searching for changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   491
  adding changesets
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   492
  adding manifests
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   493
  adding file changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   494
  added 1 changesets with 1 changes to 1 files (+1 heads)
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   495
  (run 'hg heads .' to see heads, 'hg merge' to merge)
211
69a37d56c7fb evolve: issue the "%i new unstable changeset" in more place
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 209
diff changeset
   496
  1 new unstables changesets
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   497
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   498
  9ac5d0e790a2 (secret): animals
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   499
  ffa278c50818 (draft): bathroom stuff
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   500
  8a79ae8b029e (secret): bathroom stuff
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   501
  a2fccc2e7b08 (public): SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   502
  387187ad9bd9 (public): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   503
  dfd3a2d7691e (public): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   504
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   505
  7e82d3f3c2cb (public): Monthy Python Shopping list
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   506
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   507
# XXX Changeset have turned secret because of current implementation of mutable.
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   508
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   509
The new changeset "animal" is based one an old changeset of "bathroom". You can
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   510
see both version showing up the log.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   511
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   512
  $ hg glog
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   513
  o  9ac5d0e790a2 (secret): animals
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   514
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   515
  | @  ffa278c50818 (draft): bathroom stuff
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   516
  | |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   517
  o |  8a79ae8b029e (secret): bathroom stuff
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   518
  |/
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   519
  o  a2fccc2e7b08 (public): SPAM SPAM
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   520
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   521
  o  387187ad9bd9 (public): adding fruit
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   522
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   523
  o  dfd3a2d7691e (public): adding condiment
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   524
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   525
  o  9ca060c80d74 (public): SPAM
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   526
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   527
  o  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   528
  
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   529
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   530
In hgview there is a nice doted relation highlighting ffa278c50818  is a new
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   531
version of 8a79ae8b029e. this is not yet ported to graphlog.
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   532
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   533
To resolve this unstable state, you need to rebase 9ac5d0e790a2 onto
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   534
ffa278c50818 the "hg stabilize" command will make this for you. It has a
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   535
--dry-run option to only suggest the next move
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   536
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   537
  $ hg stabilize --dry-run
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   538
  move:[15] animals
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   539
  atop:[14] bathroom stuff
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   540
  hg rebase -Dr 9ac5d0e790a2 -d ffa278c50818
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   541
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   542
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   543
Let's do it
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   544
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   545
  $ hg rebase -Dr 9ac5d0e790a2 -d ffa278c50818
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   546
  merging shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   547
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   548
The old version of bathroom is hidden again now.
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   549
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   550
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   551
  437efbcaf700 (secret): animals
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   552
  ffa278c50818 (draft): bathroom stuff
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   553
  a2fccc2e7b08 (public): SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   554
  387187ad9bd9 (public): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   555
  dfd3a2d7691e (public): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   556
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   557
  7e82d3f3c2cb (public): Monthy Python Shopping list
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   558
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   559
XXX remove me when fixed
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   560
restore a proper phase for animals
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   561
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   562
  $ hg ph -dv 437efbcaf700
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   563
  phase changed for 1 changesets
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   564
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   565
We can push this evolution to remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   566
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   567
  $ hg push -f remote # XXX should not require -f
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   568
  pushing to $TESTTMP/remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   569
  searching for changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   570
  adding changesets
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   571
  adding manifests
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   572
  adding file changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   573
  added 2 changesets with 2 changes to 1 files (+1 heads)
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   574
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   575
remote get a warning that current working directory is based on an obsolete changeset
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   576
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   577
  $ cd ../remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   578
  $ hg up . # XXX "loulz"
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   579
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   580
  Working directory parent is obsolete
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   581
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   582
  $ hg up 437efbcaf700
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   583
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   584
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   585
Relocating unstable change after kill
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   586
----------------------------------------------
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   587
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   588
The remote guy keep working
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   589
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   590
  $ sed -i'' -e 's/Spam/Spam Spam Spam Spam/g' shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   591
  $ hg commit -m "SPAM SPAM SPAM"
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   592
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   593
Work I can keep getting localy
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   594
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   595
  $ cd ../local
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   596
  $ hg pull remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   597
  pulling from $TESTTMP/remote
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   598
  searching for changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   599
  adding changesets
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   600
  adding manifests
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   601
  adding file changes
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   602
  added 1 changesets with 1 changes to 1 files
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   603
  (run 'hg update' to get a working copy)
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   604
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   605
  ae45c0c3092a (draft): SPAM SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   606
  437efbcaf700 (draft): animals
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   607
  ffa278c50818 (draft): bathroom stuff
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   608
  a2fccc2e7b08 (public): SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   609
  387187ad9bd9 (public): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   610
  dfd3a2d7691e (public): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   611
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   612
  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   613
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   614
In the mean time I noticed you can't buy animals in a super market and I kill the animal changeset:
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   615
211
69a37d56c7fb evolve: issue the "%i new unstable changeset" in more place
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 209
diff changeset
   616
  $ hg kill 437efbcaf700
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   617
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   618
  working directory now at ffa278c50818
211
69a37d56c7fb evolve: issue the "%i new unstable changeset" in more place
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 209
diff changeset
   619
  1 new unstables changesets
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   620
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   621
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   622
The animals changeset is still displayed because the "SPAM SPAM SPAM" changeset
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   623
is neither dead or obsolete.  My repository is in an unstable state again.
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   624
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   625
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   626
  ae45c0c3092a (secret): SPAM SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   627
  437efbcaf700 (secret): animals
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   628
  ffa278c50818 (draft): bathroom stuff
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   629
  a2fccc2e7b08 (public): SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   630
  387187ad9bd9 (public): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   631
  dfd3a2d7691e (public): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   632
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   633
  7e82d3f3c2cb (public): Monthy Python Shopping list
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   634
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   635
  $ hg log -r 'unstable()'
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   636
  ae45c0c3092a (secret): SPAM SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   637
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   638
  $ hg log -G
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   639
  o  ae45c0c3092a (secret): SPAM SPAM SPAM
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   640
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   641
  o  437efbcaf700 (secret): animals
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   642
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   643
  @  ffa278c50818 (draft): bathroom stuff
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   644
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   645
  o  a2fccc2e7b08 (public): SPAM SPAM
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   646
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   647
  o  387187ad9bd9 (public): adding fruit
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   648
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   649
  o  dfd3a2d7691e (public): adding condiment
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   650
  |
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   651
  o  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   652
  |
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   653
  o  7e82d3f3c2cb (public): Monthy Python Shopping list
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   654
  
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   655
# XXX make this work
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   656
#  $ hg stabilize --any
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   657
#  merging shopping
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   658
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   659
  $ hg graft -O ae45c0c3092a
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   660
  grafting revision 17
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   661
  merging shopping
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   662
209
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   663
  $ hg log
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   664
  20de1fb1cec5 (draft): SPAM SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   665
  ffa278c50818 (draft): bathroom stuff
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   666
  a2fccc2e7b08 (public): SPAM SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   667
  387187ad9bd9 (public): adding fruit
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   668
  dfd3a2d7691e (public): adding condiment
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   669
  9ca060c80d74 (public): SPAM
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   670
  7e82d3f3c2cb (public): Monthy Python Shopping list
7bee48a54c4a tutorial: make it pass again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 163
diff changeset
   671
163
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   672
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   673
Handling Conflicting amend
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   674
----------------------------------------------
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   675
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   676
We can detect that multiple diverging//conflicting amend have been made. There
92b073d13f2d more doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   677
will be a "evol-merge" command to merge conflicting amend