docs/evolve-faq.rst
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Fri, 26 Oct 2012 17:58:31 +0200
branchcompat-hg2.3
changeset 599 c062edbcaf13
parent 519 9825c7da5b54
child 641 40292a37388f
permissions -rw-r--r--
Fix debian control
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
519
9825c7da5b54 ensure all file have a copyright notice
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 517
diff changeset
     1
.. Copyright 2011 Pierre-Yves David <pierre-yves.david@ens-lyon.org>
9825c7da5b54 ensure all file have a copyright notice
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 517
diff changeset
     2
..                Logilab SA        <contact@logilab.fr>
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     3
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
Evolve How To
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     6
---------------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     7
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
     8
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
     9
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    10
Add a changeset: ``commit``
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    11
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    12
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
    13
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
    14
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    15
Rewrite a changeset: ``amend``
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    16
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    17
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
    18
A new command ``hg amend`` is added by the extension. It writes a new
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
    19
changeset combining working-directory parent changes and parent. It
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
    20
will work on any `draft` or `secret` changeset. It will not work on
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
    21
`public` changesets.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    22
177
9ca70b3ee42c docs: typo
Arne Babenhauserheide <bab@draketo.de>
parents: 169
diff changeset
    23
To understand what the result of amend will be I use the two following
500
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
    24
aliases   [#]_::
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    25
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    26
    # diff what amend will look likes
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    27
    pdiff=diff --rev .^
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    28
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    29
    # status what amend will look likes
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    30
    pstatus=status --rev .^
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    31
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    32
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
    33
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
    34
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    35
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
    36
none is public) !
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    37
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
    38
.. 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
    39
          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
    40
          ``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
    41
          on the command line.
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
          XXX add idank example
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
500
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
    46
.. [#] (defined by the evolve extension for you)
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    47
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    48
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    49
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    50
Move a changeset: ``graft``
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    51
------------------------------------------------------------
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 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
    54
branches onto the current branch".
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    55
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    56
The graft command has been altered to allow the creation of an
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
    57
obsolete marker indicating 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
    58
(actually recording changeset movements).
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    59
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    60
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
    61
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    62
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
    63
XXX example
161
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
.. 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
    66
             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
    67
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    68
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    69
.. [#] 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
    70
       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
    71
       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
    72
365
9f6a77ec66cb evolve: switch the official name for "kill" to prune
Pierre-Yves.David@ens-lyon.org
parents: 357
diff changeset
    73
Delete a changeset: ``prune``
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    74
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    75
365
9f6a77ec66cb evolve: switch the official name for "kill" to prune
Pierre-Yves.David@ens-lyon.org
parents: 357
diff changeset
    76
A new ``prune`` command allows removing a changeset.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    77
365
9f6a77ec66cb evolve: switch the official name for "kill" to prune
Pierre-Yves.David@ens-lyon.org
parents: 357
diff changeset
    78
Just use ``hg prune <some-rev>``.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    79
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    80
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
    81
------------------------------------------------------------
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
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
    84
mutable commit.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    85
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    86
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
    87
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
    88
directory parent commit.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    89
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    90
.. 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
    91
          feeling back.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    92
500
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
    93
Collapse changesets: ``fold``
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    94
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    95
517
0bc0c9edcb15 evolve: usual syntax/grammar errors/long lines cleanup
Patrick Mezard <patrick@mezard.eu>
parents: 500
diff changeset
    96
you can use ``hg fold`` to collapse multiple changesets in a single one.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    97
325
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
    98
Getting changes out of a commit
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
    99
------------------------------------------------------------
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   100
347
631cdf4295bc docs: improve recent updates
Patrick Mezard <patrick@mezard.eu>
parents: 325
diff changeset
   101
The ``hg uncommit`` command lets you rewrite the parent commit without
631cdf4295bc docs: improve recent updates
Patrick Mezard <patrick@mezard.eu>
parents: 325
diff changeset
   102
selected changed files. Target files content is not altered and
631cdf4295bc docs: improve recent updates
Patrick Mezard <patrick@mezard.eu>
parents: 325
diff changeset
   103
appears again as "modified"::
325
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   104
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   105
  $ hg st
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   106
  M babar
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   107
  M celestine
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   108
  $ hg commit babar celestine
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   109
  $ hg st
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   110
  $ hg uncommit celestine
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   111
  $ hg status
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   112
  M celestine
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   113
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
   114
Split a changeset
180
4379ffd6d293 docs: added a question: split changesets?
Arne Babenhauserheide <bab@draketo.de>
parents: 179
diff changeset
   115
-----------------------
4379ffd6d293 docs: added a question: split changesets?
Arne Babenhauserheide <bab@draketo.de>
parents: 179
diff changeset
   116
347
631cdf4295bc docs: improve recent updates
Patrick Mezard <patrick@mezard.eu>
parents: 325
diff changeset
   117
To split on file boundaries, just use ``uncommit`` command.
325
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   118
357
b398e9c2dbd1 doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 325
diff changeset
   119
If you need fine-grained split, there is no official command for that yet.
b398e9c2dbd1 doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 325
diff changeset
   120
However, it is easily achieved by manual operation::
188
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   121
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   122
  ### you want to split changeset A: 42
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   123
  # update to A parent
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   124
  $ hg up 42^
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   125
  # restore content from A
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   126
  $ hg revert -r 42 --all
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   127
  # partially commit the first part
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   128
  $ hg record
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   129
  # commit the second part
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   130
  $ hg commit
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   131
  # informs mercurial of what appened
198
384dd4b11b27 FAQ: small typo
David Douard <david.douard@logilab.fr>
parents: 188
diff changeset
   132
  # current changeset (.) and previous one (.^) replace A (42)
365
9f6a77ec66cb evolve: switch the official name for "kill" to prune
Pierre-Yves.David@ens-lyon.org
parents: 357
diff changeset
   133
  $ hg prune --new . --new .^ 42
188
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
   134
180
4379ffd6d293 docs: added a question: split changesets?
Arne Babenhauserheide <bab@draketo.de>
parents: 179
diff changeset
   135
200
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   136
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
   137
----------------------------------------------
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   138
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   139
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
   140
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
   141
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   142
And it is likely that you will want your work in progress changsets to be 
200
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   143
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
   144
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   145
Doing so is only a matter of rebasing.
200
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   146
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   147
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
   148
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   149
Move multiple changesets: ``rebase``
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   150
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   151
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
   152
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
   153
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   154
.. warning:: Beware that rebasing obsolete changesets will result in
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
   155
             conflicting versions of the changesets.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   156
500
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
   157
Resolve history troubles: ``evolve``
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   158
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   159
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   160
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
   161
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
   162
obsolete* changesets.
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   163
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
   164
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
   165
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
   166
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
   167
proliferation of useless hidden changesets.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   168
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   169
365
9f6a77ec66cb evolve: switch the official name for "kill" to prune
Pierre-Yves.David@ens-lyon.org
parents: 357
diff changeset
   170
Fix my history afterward: ``prune -n``
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   171
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   172
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   173
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
   174
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
   175
365
9f6a77ec66cb evolve: switch the official name for "kill" to prune
Pierre-Yves.David@ens-lyon.org
parents: 357
diff changeset
   176
you can use ``hg prune --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
   177
marker.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   178
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   179
Export to mq: ``synchronize``
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   180
------------------------------------------------------------
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
   181
357
b398e9c2dbd1 doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 325
diff changeset
   182
Another extension allows to export your changes to mq.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   183
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
   184
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
   185
------------------------------------------------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   186
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
   187
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
   188
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   189
:: 
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   190
    [alias]
325
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   191
    odiff = diff --rev 'limit(precursors(.),1)' --rev .
161
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 obsolete markers
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
517
0bc0c9edcb15 evolve: usual syntax/grammar errors/long lines cleanup
Patrick Mezard <patrick@mezard.eu>
parents: 500
diff changeset
   196
hgview_ is the only viewer that currently supports this feature. You
0bc0c9edcb15 evolve: usual syntax/grammar errors/long lines cleanup
Patrick Mezard <patrick@mezard.eu>
parents: 500
diff changeset
   197
need version 1.6.2
500
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
   198
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
   199
.. _hgview: http://www.logilab.org/project/hgview/
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   200
500
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
   201
.. image:: figures/hgview-example.png
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
   202
    :scale: 50%
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
   203
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   204
325
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   205
You can also use a debug command
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   206
441
d702f0d26c6a obsolete: remove debugsuccessors
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 367
diff changeset
   207
    $ hg debugobsolete
325
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   208
      5eb72dbe0cb4 e8db4aa611f6
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   209
      c4cbebac3751 4f1c269eab68
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
   210
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
   211
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
   212
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   213
Important Note
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   214
=====================================================================
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   215
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   216
View change to your file
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   217
------------------------------------------------------------
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   218
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   219
Extinct changesets are hidden using the *hidden* feature of mercurial.
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   220
347
631cdf4295bc docs: improve recent updates
Patrick Mezard <patrick@mezard.eu>
parents: 325
diff changeset
   221
Only ``hg log``, ``hg glog`` and ``hgview`` support it, other
631cdf4295bc docs: improve recent updates
Patrick Mezard <patrick@mezard.eu>
parents: 325
diff changeset
   222
graphical viewer do not.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   223
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   224
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   225
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   226
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   227
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   228
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   229
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   230
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   231
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
   232