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