tests/test-evolve.t
author Patrick Mezard <patrick@mezard.eu>
Wed, 13 Jun 2012 18:28:10 +0200
changeset 269 6c6bb7a23bb5
parent 219 cfdab01ca8a0
child 296 c3ff47e6bd36
permissions -rw-r--r--
stabilize: improve unstable selection heuristic Without argument, stabilize was picking the first in: "unstable() and ((suspended() or obsancestors(::.))::)" which usually returned the "oldest" unstable revision in parent predecessors descendants. This revision is interesting because it usually gives "soft" merges but rebasing it left the working directory on a remote branch, which was very confusing. The new heuristic picks an unstable changeset which can be rebased on top of the parent revision, or on top of one of its descendants (selected in revision order). This has the advantage of selecting a revision which can be rebased on the current subtree, and leave the working directory in a more convenient location.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
81
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
113
3bdabdbb4140 adapt evolution to phase in core.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 94
diff changeset
     2
  > [defaults]
3bdabdbb4140 adapt evolution to phase in core.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 94
diff changeset
     3
  > amend=-d "0 0"
81
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     4
  > [web]
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     5
  > push_ssl = false
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     6
  > allow_push = *
113
3bdabdbb4140 adapt evolution to phase in core.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 94
diff changeset
     7
  > [phases]
3bdabdbb4140 adapt evolution to phase in core.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 94
diff changeset
     8
  > publish = False
81
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     9
  > [alias]
113
3bdabdbb4140 adapt evolution to phase in core.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 94
diff changeset
    10
  > qlog = log --template='{rev} - {node|short} {desc} ({phase})\n'
82
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    11
  > [diff]
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    12
  > git = 1
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    13
  > unified = 0
81
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    14
  > [extensions]
87
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
    15
  > hgext.rebase=
113
3bdabdbb4140 adapt evolution to phase in core.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 94
diff changeset
    16
  > hgext.graphlog=
81
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    17
  > EOF
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    18
  $ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext/obsolete.py" >> $HGRCPATH
137
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    19
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
81
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    20
  $ mkcommit() {
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    21
  >    echo "$1" > "$1"
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    22
  >    hg add "$1"
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    23
  >    hg ci -m "add $1"
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    24
  > }
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    25
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    26
various init
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    27
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    28
  $ hg init local
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    29
  $ cd local
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    30
  $ mkcommit a
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    31
  $ mkcommit b
113
3bdabdbb4140 adapt evolution to phase in core.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 94
diff changeset
    32
  $ cat >> .hg/hgrc << EOF
3bdabdbb4140 adapt evolution to phase in core.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 94
diff changeset
    33
  > [phases]
3bdabdbb4140 adapt evolution to phase in core.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 94
diff changeset
    34
  > publish = True
3bdabdbb4140 adapt evolution to phase in core.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 94
diff changeset
    35
  > EOF
3bdabdbb4140 adapt evolution to phase in core.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 94
diff changeset
    36
  $ hg pull -q . # make 1 public
3bdabdbb4140 adapt evolution to phase in core.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 94
diff changeset
    37
  $ rm .hg/hgrc
81
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    38
  $ mkcommit c
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    39
  $ mkcommit d
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    40
  $ hg up 1
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    41
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    42
  $ mkcommit e -q
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    43
  created new head
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    44
  $ mkcommit f
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    45
  $ hg qlog
137
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    46
  5 - e44648563c73 add f (draft)
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    47
  4 - fbb94e3a0ecf add e (draft)
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    48
  3 - 47d2a3944de8 add d (draft)
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    49
  2 - 4538525df7e2 add c (draft)
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    50
  1 - 7c3bad9141dc add b (public)
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    51
  0 - 1f0dee641bb7 add a (public)
81
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    52
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    53
test simple kill
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    54
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    55
  $ hg kill 5
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    56
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    57
  working directory now at fbb94e3a0ecf
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    58
  $ hg qlog
137
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    59
  4 - fbb94e3a0ecf add e (draft)
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    60
  3 - 47d2a3944de8 add d (draft)
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    61
  2 - 4538525df7e2 add c (draft)
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    62
  1 - 7c3bad9141dc add b (public)
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    63
  0 - 1f0dee641bb7 add a (public)
81
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    64
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    65
test multiple kill
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    66
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    67
  $ hg kill 4 3
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    68
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    69
  working directory now at 7c3bad9141dc
5cec25ce019c Basic kill command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    70
  $ hg qlog
137
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    71
  2 - 4538525df7e2 add c (draft)
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    72
  1 - 7c3bad9141dc add b (public)
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
    73
  0 - 1f0dee641bb7 add a (public)
82
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    74
  $ cd ..
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    75
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    76
##########################
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    77
importing Parren test
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    78
##########################
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    79
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    80
  $ cat << EOF >> $HGRCPATH
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    81
  > [ui]
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    82
  > logtemplate = "{rev}\t{bookmarks}: {desc|firstline} - {author|user}\n"
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    83
  > EOF
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    84
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    85
Creating And Updating Changeset
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    86
===============================
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    87
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    88
Setup the Base Repo
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    89
-------------------
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    90
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    91
We start with a plain base repo::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    92
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    93
  $ hg init main; cd main
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    94
  $ cat >main-file-1 <<-EOF
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    95
  > One
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    96
  > 
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    97
  > Two
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    98
  > 
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
    99
  > Three
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   100
  > EOF
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   101
  $ echo Two >main-file-2
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   102
  $ hg add
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   103
  adding main-file-1
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   104
  adding main-file-2
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   105
  $ hg commit --message base
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   106
  $ cd ..
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   107
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   108
and clone this into a new repo where we do our work::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   109
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   110
  $ hg clone main work
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   111
  updating to branch default
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   112
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   113
  $ cd work
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   114
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   115
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   116
Create First Patch
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   117
------------------
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   118
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   119
To begin with, we just do the changes that will be the initial version of the changeset::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   120
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   121
  $ echo One >file-from-A
88
64fe5a4f877e [evolution] first workign draft of a relocate function
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 87
diff changeset
   122
  $ sed -i'' -e s/One/Eins/ main-file-1
82
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   123
  $ hg add file-from-A
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   124
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   125
So this is what we would like our changeset to be::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   126
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   127
  $ hg diff
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   128
  diff --git a/file-from-A b/file-from-A
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   129
  new file mode 100644
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   130
  --- /dev/null
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   131
  +++ b/file-from-A
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   132
  @@ -0,0 +1,1 @@
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   133
  +One
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   134
  diff --git a/main-file-1 b/main-file-1
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   135
  --- a/main-file-1
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   136
  +++ b/main-file-1
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   137
  @@ -1,1 +1,1 @@
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   138
  -One
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   139
  +Eins
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   140
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   141
To commit it we just - commit it::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   142
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   143
  $ hg commit --message "a nifty feature"
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   144
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   145
and place a bookmark so we can easily refer to it again (which we could have done before the commit)::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   146
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   147
  $ hg book feature-A
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   148
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   149
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   150
Create Second Patch
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   151
-------------------
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   152
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   153
Let's do this again for the second changeset::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   154
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   155
  $ echo Two >file-from-B
88
64fe5a4f877e [evolution] first workign draft of a relocate function
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 87
diff changeset
   156
  $ sed -i'' -e s/Two/Zwie/ main-file-1
82
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   157
  $ hg add file-from-B
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   158
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   159
Before committing, however, we need to switch to a new bookmark for the second
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   160
changeset. Otherwise we would inadvertently move the bookmark for our first changeset.
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   161
It is therefore advisable to always set the bookmark before committing::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   162
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   163
  $ hg book feature-B
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   164
  $ hg commit --message "another feature"
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   165
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   166
So here we are::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   167
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   168
  $ hg book
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   169
     feature-A                 1:568a468b60fc
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   170
   * feature-B                 2:7b36850622b2
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   171
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   172
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   173
Fix The Second Patch
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   174
--------------------
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   175
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   176
There's a typo in feature-B. We spelled *Zwie* instead of *Zwei*::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   177
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   178
  $ hg diff --change tip | grep -F Zwie
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   179
  +Zwie
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   180
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   181
Fixing this is very easy. Just change::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   182
88
64fe5a4f877e [evolution] first workign draft of a relocate function
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 87
diff changeset
   183
  $ sed -i'' -e s/Zwie/Zwei/ main-file-1
82
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   184
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   185
and **amend**::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   186
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   187
  $ hg amend --note "fix spelling of Zwei"
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   188
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   189
The `--note` is our commit message for the *update* only. So its only purpose
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   190
is to document the evolution of the changeset. If we use `--message` with
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   191
`amend`, it replaces the commit message of the changeset itself.
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   192
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   193
This results in a new single changeset for our amended changeset, and the old
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   194
changeset plus the updating changeset are hidden from view by default::
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   195
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   196
  $ hg log
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   197
  4	feature-B: another feature - test
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   198
  1	feature-A: a nifty feature - test
8108d566a8b5 [evolution] imported hg amend from parren works
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 81
diff changeset
   199
  0	: base - test
87
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   200
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   201
  $ hg up feature-A -q
139
9b9500175ae5 evolve that does something \o/
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 138
diff changeset
   202
  $ hg bookmark -i feature-A
88
64fe5a4f877e [evolution] first workign draft of a relocate function
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 87
diff changeset
   203
  $ sed -i'' -e s/Eins/Un/ main-file-1
87
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   204
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   205
  $ hg amend --note 'french looks better'
196
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   206
  1 new unstables changesets
87
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   207
  $ hg log
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   208
  6	feature-A: a nifty feature - test
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   209
  4	feature-B: another feature - test
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   210
  1	: a nifty feature - test
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   211
  0	: base - test
145
928f217c1701 stabilize: stabilize my topological branch only
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 139
diff changeset
   212
  $ hg up -q 1
928f217c1701 stabilize: stabilize my topological branch only
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 139
diff changeset
   213
  Working directory parent is obsolete
139
9b9500175ae5 evolve that does something \o/
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 138
diff changeset
   214
  $ hg stabilize
9b9500175ae5 evolve that does something \o/
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 138
diff changeset
   215
  move:[4] another feature
9b9500175ae5 evolve that does something \o/
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 138
diff changeset
   216
  atop:[6] a nifty feature
87
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   217
  merging main-file-1
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   218
  $ hg log
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   219
  7	feature-B: another feature - test
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   220
  6	feature-A: a nifty feature - test
246b8fefd0a5 [evolution/obsolete] very experimental and crude evolve support.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 82
diff changeset
   221
  0	: base - test
116
64ca29eef349 Add a -o option to commit
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 113
diff changeset
   222
64ca29eef349 Add a -o option to commit
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 113
diff changeset
   223
Test commit -o options
64ca29eef349 Add a -o option to commit
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 113
diff changeset
   224
64ca29eef349 Add a -o option to commit
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 113
diff changeset
   225
  $ hg up 6
137
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
   226
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
116
64ca29eef349 Add a -o option to commit
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 113
diff changeset
   227
  $ hg revert -r 7 --all
137
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
   228
  adding file-from-B
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
   229
  reverting main-file-1
116
64ca29eef349 Add a -o option to commit
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 113
diff changeset
   230
  $ sed -i'' -e s/Zwei/deux/ main-file-1
137
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
   231
  $ hg commit -m 'another feature that rox' -o 7
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
   232
  created new head
116
64ca29eef349 Add a -o option to commit
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 113
diff changeset
   233
  $ hg log
137
bbc653876876 fix evolve test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 116
diff changeset
   234
  8	feature-B: another feature that rox - test
116
64ca29eef349 Add a -o option to commit
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 113
diff changeset
   235
  6	feature-A: a nifty feature - test
64ca29eef349 Add a -o option to commit
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 113
diff changeset
   236
  0	: base - test
196
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   237
  $ cd ..
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   238
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   239
enable general delta
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   240
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   241
  $ cat << EOF >> $HGRCPATH
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   242
  > [format]
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   243
  > generaldelta=1
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   244
  > EOF
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   245
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   246
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   247
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   248
  $ hg init alpha
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   249
  $ cd alpha
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   250
  $ echo 'base' > firstfile
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   251
  $ hg add firstfile
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   252
  $ hg ci -m 'base'
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   253
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   254
  $ cd ..
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   255
  $ hg clone -Ur 0 alpha beta
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   256
  adding changesets
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   257
  adding manifests
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   258
  adding file changes
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   259
  added 1 changesets with 1 changes to 1 files
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   260
  $ cd alpha
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   261
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   262
  $ cat << EOF > A
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   263
  > We
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   264
  > need
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   265
  > some
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   266
  > kind
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   267
  > of 
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   268
  > file
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   269
  > big
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   270
  > enough
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   271
  > to
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   272
  > prevent
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   273
  > snapshot
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   274
  > .
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   275
  > yes
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   276
  > new
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   277
  > lines
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   278
  > are
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   279
  > useless
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   280
  > .
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   281
  > EOF
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   282
  $ hg add A
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   283
  $ hg commit -m 'adding A'
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   284
  $ hg mv A B
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   285
  $ echo '.' >> B
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   286
  $ hg amend -m 'add B'
219
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   287
  $ hg verify
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   288
  checking changesets
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   289
  checking manifests
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   290
  crosschecking files in changesets and manifests
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   291
  checking files
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   292
  3 files, 4 changesets, 4 total revisions
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   293
  $ hg --config extensions.hgext.mq= strip 'extinct()'
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   294
  saved backup bundle to $TESTTMP/alpha/.hg/strip-backup/e87767087a57-backup.hg
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   295
  $ hg verify
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   296
  checking changesets
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   297
  checking manifests
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   298
  crosschecking files in changesets and manifests
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   299
  checking files
cfdab01ca8a0 evolve-amend: properly handle amending file renames and additions.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 196
diff changeset
   300
  2 files, 2 changesets, 2 total revisions
196
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   301
  $ cd ..
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   302
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   303
Clone just this branch
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   304
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   305
  $ cd beta
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   306
  $ hg pull -r tip ../alpha
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   307
  pulling from ../alpha
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   308
  searching for changes
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   309
  adding changesets
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   310
  adding manifests
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   311
  adding file changes
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   312
  added 1 changesets with 1 changes to 1 files
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   313
  (run 'hg update' to get a working copy)
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   314
  $ hg up
dea67dae27a4 amend: add a warning after amend added unstablility
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 145
diff changeset
   315
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved