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