docs/evolve-faq.rst
author Pierre-Yves.David@ens-lyon.org
Wed, 09 May 2012 13:08:46 +0200
changeset 227 abe52cf492ee
parent 200 4df233db5d42
child 228 5a17c0d41a00
permissions -rw-r--r--
doc: several update and review.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     1
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     2
---------------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     3
Evolve How To
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     4
---------------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     5
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     6
Add a changeset: ``commit``
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     7
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     8
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
     9
Just use commit as usual. New changesets will be in the `draft` phase.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    10
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    11
Rewrite a changeset: ``amend``
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    12
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    13
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    14
A dedicated command ``hg amend`` is added by the extension. It writes a new
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    15
changeset combining working-directory parent changes and parent. It will work on
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    16
any `draft` or `secret` changeset. It will not work on `public` changesets.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    17
177
9ca70b3ee42c docs: typo
Arne Babenhauserheide <bab@draketo.de>
parents: 169
diff changeset
    18
To understand what the result of amend will be I use the two following
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    19
aliases  [#]_::
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    20
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    21
    # diff what amend will look likes
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    22
    pdiff=diff --rev .^
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    23
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    24
    # status what amend will look likes
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    25
    pstatus=status --rev .^
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    26
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    27
It takes various options to pick an author, a date and the branch of the
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    28
result... (see ``hg help amend`` for details).
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    29
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    30
This command can even be invoked on changesets with children (provided
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    31
none is public) !
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    32
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    33
.. note:: The amend command is very similar to mq's ``qrefresh``, a ``refresh``
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    34
          alias for amend is also available. But note that contrary to
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    35
          ``qrefresh``, ``amend`` does not exclude changes on file not specified
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    36
          on the command line.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    37
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    38
          XXX add idank example
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    39
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    40
.. warning:: The `hg commit --amend` switch does **not** lay obsolete marker
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    41
             down yet. You should always prefer the dedicated command.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    42
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    43
.. [#] (added by enable.sh)
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    44
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    45
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    46
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    47
Move a changeset: ``graft``
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    48
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    49
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    50
The graft command introduced in 2.0 allows to "copy changes from other
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    51
branches onto the current branch".
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    52
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    53
The graft command has been altered to allow the creation of an
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    54
obsolete marker between both the result cset and its source
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    55
(actually recording changeset movements).
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    56
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    57
This is achieved using a new flag `-O` (or `old-obsolete`) [#]_.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    58
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    59
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    60
XXX Need a few examples here.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    61
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    62
.. warning:: when using graft --continue after conflict resolution you **MUST**
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    63
             pass `-O` or `-o` flag again because they are not saved for now
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    64
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    65
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    66
.. [#] add this `-O` to graft instead of a dedicated command is probably
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
    67
       abusive. But this was very convenient for experimental purposes.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    68
       This will likely change in non experimental release.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    69
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    70
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    71
Delete a changeset: ``kill``
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    72
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    73
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    74
A new ``kill``[#]_ command allows removing a changeset.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    75
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    76
Just use ``hg kill <some-rev>``.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    77
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    78
.. [#] `kill` is a terrible name. **NEVER** forget to add `hg` in front of it
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    79
        until we find a better name.
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    80
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    81
Moving within the history: ``up`` ``gdown`` and ``gup``
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    82
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    83
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    84
While working on mutable part of the history you often need to move between
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    85
mutable commit.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    86
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    87
You just need to use standard update to work with evolve. For convenience, you
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    88
can use ``hg gup`` to move to children commit or ``hg gdown`` to move to working
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    89
directory parent commit.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    90
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    91
.. note:: those command only exist for the convenience of getting qpush and qpop
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    92
          feeling back.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    93
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
    94
Collapse changesets: ``amend``
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    95
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    96
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    97
You can use amend -c to collapse multiple changeset in a single one.
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    98
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
    99
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   100
.. note:: This is a terrible UI. `hg collapse` should be ported to obsolete
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   101
          marker for this purpose.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   102
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
   103
Split a changeset
180
4379ffd6d293 docs: added a question: split changesets?
Arne Babenhauserheide <bab@draketo.de>
parents: 179
diff changeset
   104
-----------------------
4379ffd6d293 docs: added a question: split changesets?
Arne Babenhauserheide <bab@draketo.de>
parents: 179
diff changeset
   105
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   106
There is no official command to split a changeset [#]_ . However is it easily achieved
188
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   107
by manual operation::
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   108
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   109
  ### you want to split changeset A: 42
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   110
  # update to A parent
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   111
  $ hg up 42^
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   112
  # restore content from A
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   113
  $ hg revert -r 42 --all
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   114
  # partially commit the first part
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   115
  $ hg record
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   116
  # commit the second part
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   117
  $ hg commit
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   118
  # informs mercurial of what appened
198
384dd4b11b27 FAQ: small typo
David Douard <david.douard@logilab.fr>
parents: 188
diff changeset
   119
  # current changeset (.) and previous one (.^) replace A (42)
188
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   120
  $ hg kill --new . --new .^ 42
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   121
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   122
.. [#] Yet
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   123
180
4379ffd6d293 docs: added a question: split changesets?
Arne Babenhauserheide <bab@draketo.de>
parents: 179
diff changeset
   124
200
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   125
Update my current work in progess after a pull
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   126
----------------------------------------------
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   127
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   128
Whenever you are working on some changesets, it is more likely that a pull 
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   129
will, eventually, import new changesets in your tree.
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   130
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   131
And it is likely that you will want your work in progress changesets to be 
200
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   132
rebased on the top of this newly imported subtree.
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   133
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   134
Doing so is only a matter of rebasing. Rebase have been wrapped to lay obsolete
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   135
marker down.
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   136
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   137
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   138
XXX Add an example here.
200
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   139
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   140
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   141
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   142
Move multiple changesets: ``rebase``
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   143
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   144
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
   145
You can still use rebase to move a whole segment of the changeset graph together.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   146
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   147
.. warning:: Beware that rebasing changesets already obsolete by others will result in
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
   148
             conflicting versions of the changesets.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   149
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   150
Stabilize history: ``stabilize``
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   151
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   152
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   153
When you rewrite (amend) a changeset with children without rewriting
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   154
those children you create *unstable* changesets and *suspended
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   155
obsolete* changesets.
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   156
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
   157
When you are finished amending a given changeset, you will want to
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   158
declare it stable, in other words rebase its former descendants on its
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   159
newest version. This is not done automatically to avoid the
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   160
proliferation of useless hidden changesets.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   161
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   162
.. warning::
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   163
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   164
    * ``hg stabilize`` have no --continue to use after conflict
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   165
             resolution
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   166
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   167
    *  stabilization does not handle deletion yet.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   168
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   169
    * stabilization does not handle rewriting conflict yet.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   170
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   171
    *  obsolete currently relies on changesets in secret phase
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   172
       to avoid exchanging extinct() changesets.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   173
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   174
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   175
Fix my history afterward: ``kill -n``
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   176
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   177
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   178
Sometimes you need to create an obsolete marker by hand. This may happen when
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
   179
upstream has applied some of your patches for example.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   180
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   181
You can use ``hg kill --new <new-changeset> <old-changeset>`` to add obsolete
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   182
marker.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   183
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   184
Export to mq: ``qsync``
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   185
------------------------------------------------------------
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   186
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   187
Another extension allows to export mutable changeset to mq. See the
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   188
`enable-qsync.sh` to enable it and read module documentation for details.
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   189
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   190
If you do not work at Logilab. You probably do not need it.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   191
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   192
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
   193
View diff from the last amend
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   194
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   195
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
   196
An ``odiff`` alias have been added by ``enable.sh``
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   197
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   198
:: 
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   199
    [alias]
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   200
    odiff = diff --rev 'limit(obsparents(.),1)' --rev .
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   201
227
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   202
The qt viewer `hgview` displays obsolete data and allows to see diff again
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   203
obsolete parent.
abe52cf492ee doc: several update and review.
Pierre-Yves.David@ens-lyon.org
parents: 200
diff changeset
   204
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
   205
View obsolete markers
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   206
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   207
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
   208
hgview is the only viewer that support this feature. You need an experimental
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   209
version available here:
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   210
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   211
    $ hg clone http://hg-dev.octopoid.net/hgwebdir.cgi/hgview/
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   212
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
   213
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
   214
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   215
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   216
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   217
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   218
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   219
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   220