annotate docs/evolve-faq.rst @ 2897:bd04a614b866

topic: move a status message in the right scope The finally get runs on failure so we should not advertise rewrite topic in the case. In addition the 'rewrote' variable can be undefined in the finally.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Sep 2017 17:37:47 +0200
parents bd994fd256e1
children 8406d9b06130
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
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
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
4 -------------
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
5 Evolve How To
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
6 -------------
161
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``
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
11 ---------------------------
161
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
777
1ff262281a1d doc: rework how to entry about amend
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 662
diff changeset
15 Rewrite a changeset: ``commit --amend``
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
16 ---------------------------------------
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
17
777
1ff262281a1d doc: rework how to entry about amend
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 662
diff changeset
18 It writes a new changeset combining working-directory parent changes and parent.
1ff262281a1d doc: rework how to entry about amend
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 662
diff changeset
19 It will work on any `draft` or `secret` changeset. It will not work on `public`
1ff262281a1d doc: rework how to entry about amend
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 662
diff changeset
20 changesets.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
21
177
9ca70b3ee42c docs: typo
Arne Babenhauserheide <bab@draketo.de>
parents: 169
diff changeset
22 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
23 aliases [#]_::
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
24
655
dd5765ae91c3 doc: fix grammar, spelling, punctuation
Greg Ward <greg@gerg.ca>
parents: 641
diff changeset
25 # diff what amend will look like
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
26 pdiff=diff --rev .^
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
27
655
dd5765ae91c3 doc: fix grammar, spelling, punctuation
Greg Ward <greg@gerg.ca>
parents: 641
diff changeset
28 # status what amend will look like
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
29 pstatus=status --rev .^
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
30
655
dd5765ae91c3 doc: fix grammar, spelling, punctuation
Greg Ward <greg@gerg.ca>
parents: 641
diff changeset
31 This command can even be invoked on changesets with children, provided
dd5765ae91c3 doc: fix grammar, spelling, punctuation
Greg Ward <greg@gerg.ca>
parents: 641
diff changeset
32 none are public.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
33
500
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
34 .. [#] (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
35
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
36
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
37
778
35c8c5e8e3d3 doc: replace graft -O with grab
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 777
diff changeset
38 Move a changeset: ``grab``
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
39 --------------------------
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
40
778
35c8c5e8e3d3 doc: replace graft -O with grab
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 777
diff changeset
41 You can use ``hg grab <rev>`` to move a rev at your current location, making the
35c8c5e8e3d3 doc: replace graft -O with grab
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 777
diff changeset
42 old version obsolete.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
43
778
35c8c5e8e3d3 doc: replace graft -O with grab
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 777
diff changeset
44 .. note:: grab is an alias for ``hg rebase --dest . --rev $@; hg up <result>``
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
45
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
46
365
9f6a77ec66cb evolve: switch the official name for "kill" to prune
Pierre-Yves.David@ens-lyon.org
parents: 357
diff changeset
47 Delete a changeset: ``prune``
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
48 -----------------------------
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
49
365
9f6a77ec66cb evolve: switch the official name for "kill" to prune
Pierre-Yves.David@ens-lyon.org
parents: 357
diff changeset
50 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
51
365
9f6a77ec66cb evolve: switch the official name for "kill" to prune
Pierre-Yves.David@ens-lyon.org
parents: 357
diff changeset
52 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
53
779
6c773c46e2f7 doc: refer to previous and next in the gup, gdown help
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 778
diff changeset
54
6c773c46e2f7 doc: refer to previous and next in the gup, gdown help
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 778
diff changeset
55 Moving within the history: ``gdown`` and ``gup``
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
56 ------------------------------------------------
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
57
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
58 While working on mutable part of the history you often need to move between
655
dd5765ae91c3 doc: fix grammar, spelling, punctuation
Greg Ward <greg@gerg.ca>
parents: 641
diff changeset
59 mutable commits.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
60
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
61 You just need to use standard update to work with evolve. For convenience, you
655
dd5765ae91c3 doc: fix grammar, spelling, punctuation
Greg Ward <greg@gerg.ca>
parents: 641
diff changeset
62 can use ``hg gup`` to move to the child commit or ``hg gdown`` to move to the parent commit.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
63
779
6c773c46e2f7 doc: refer to previous and next in the gup, gdown help
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 778
diff changeset
64 Those command have ``previous`` and ``next`` alias.
6c773c46e2f7 doc: refer to previous and next in the gup, gdown help
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 778
diff changeset
65
655
dd5765ae91c3 doc: fix grammar, spelling, punctuation
Greg Ward <greg@gerg.ca>
parents: 641
diff changeset
66 .. note:: Those commands only exist for the convenience of getting qpush and qpop
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
67 feeling back.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
68
500
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
69 Collapse changesets: ``fold``
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
70 -----------------------------
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
71
655
dd5765ae91c3 doc: fix grammar, spelling, punctuation
Greg Ward <greg@gerg.ca>
parents: 641
diff changeset
72 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
73
780
020619c850bb doc: enhance your fold help
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 779
diff changeset
74 It takes two forms:
020619c850bb doc: enhance your fold help
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 779
diff changeset
75
020619c850bb doc: enhance your fold help
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 779
diff changeset
76 ``hg fold <rev>`` folds everything from you current changeset to `<rev>`
020619c850bb doc: enhance your fold help
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 779
diff changeset
77
020619c850bb doc: enhance your fold help
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 779
diff changeset
78 ``hg fold -r <revset>`` fold everything changeset matching the revset together.
020619c850bb doc: enhance your fold help
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 779
diff changeset
79
325
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
80 Getting changes out of a commit
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
81 -------------------------------
325
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
82
347
631cdf4295bc docs: improve recent updates
Patrick Mezard <patrick@mezard.eu>
parents: 325
diff changeset
83 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
84 selected changed files. Target files content is not altered and
631cdf4295bc docs: improve recent updates
Patrick Mezard <patrick@mezard.eu>
parents: 325
diff changeset
85 appears again as "modified"::
325
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
86
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
87 $ hg st
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
88 M babar
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
89 M celestine
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
90 $ hg commit babar celestine
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
91 $ hg st
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
92 $ hg uncommit celestine
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
93 $ hg status
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
94 M celestine
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
95
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
96 Split a changeset
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
97 -----------------
180
4379ffd6d293 docs: added a question: split changesets?
Arne Babenhauserheide <bab@draketo.de>
parents: 179
diff changeset
98
347
631cdf4295bc docs: improve recent updates
Patrick Mezard <patrick@mezard.eu>
parents: 325
diff changeset
99 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
100
655
dd5765ae91c3 doc: fix grammar, spelling, punctuation
Greg Ward <greg@gerg.ca>
parents: 641
diff changeset
101 If you need a fine-grained split, there is no official command for that yet.
357
b398e9c2dbd1 doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 325
diff changeset
102 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
103
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
104 ### you want to split changeset A: 42
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
105 # update to A parent
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
106 $ hg up 42^
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
107 # restore content from A
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
108 $ hg revert -r 42 --all
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
109 # partially commit the first part
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
110 $ hg record
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
111 # commit the second part
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
112 $ hg commit
1653
c9dc8d0346f9 Spelling: happened
timeless@gmail.com
parents: 1287
diff changeset
113 # informs mercurial of what happened
198
384dd4b11b27 FAQ: small typo
David Douard <david.douard@logilab.fr>
parents: 188
diff changeset
114 # 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
115 $ hg prune --new . --new .^ 42
188
627dde054cd0 add split example
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 180
diff changeset
116
655
dd5765ae91c3 doc: fix grammar, spelling, punctuation
Greg Ward <greg@gerg.ca>
parents: 641
diff changeset
117 For more complexe scenario we recommend the use of the histedit_ extension.
180
4379ffd6d293 docs: added a question: split changesets?
Arne Babenhauserheide <bab@draketo.de>
parents: 179
diff changeset
118
1724
bd994fd256e1 docs: point wiki and bz links to mercurial-scm.org
Anton Shestakov <av6@dwimlabs.net>
parents: 1653
diff changeset
119 .. _histedit: https://www.mercurial-scm.org/wiki/HisteditExtension
641
40292a37388f doc: update how-to
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 519
diff changeset
120
40292a37388f doc: update how-to
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 519
diff changeset
121
40292a37388f doc: update how-to
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 519
diff changeset
122 Update my current work in progress after a pull
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
123 -----------------------------------------------
200
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
124
641
40292a37388f doc: update how-to
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 519
diff changeset
125 Whenever you are working on some changesets, it is more likely that a pull
200
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
126 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
127
655
dd5765ae91c3 doc: fix grammar, spelling, punctuation
Greg Ward <greg@gerg.ca>
parents: 641
diff changeset
128 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
129 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
130
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
131 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
132
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
133
4df233db5d42 FAQ: add en entry about rebasing after a pull
David Douard <david.douard@logilab.fr>
parents: 199
diff changeset
134
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
135 Move multiple changesets: ``rebase``
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
136 ------------------------------------
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
137
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
138 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
139
781
bc379b9ff48a doc: try to clarify rebase warning
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 780
diff changeset
140 .. warning:: Beware that rebasing changesets already obsolete will likely result in
bc379b9ff48a doc: try to clarify rebase warning
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 780
diff changeset
141 divergent versions of the changesets.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
142
500
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
143 Resolve history troubles: ``evolve``
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
144 ------------------------------------
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
145
169
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
146 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
147 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
148 obsolete* changesets.
06c942f9bac6 auc improvement of the doc
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
149
179
bc6460f61c64 docs: fix typos in the FAQ
Arne Babenhauserheide <bab@draketo.de>
parents: 177
diff changeset
150 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
151 declare it stable, in other words rebase its former descendants on its
782
e3cf8d04466c doc: remove referenc to proleferation of hidden commit
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 781
diff changeset
152 newest version.
e3cf8d04466c doc: remove referenc to proleferation of hidden commit
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 781
diff changeset
153
e3cf8d04466c doc: remove referenc to proleferation of hidden commit
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 781
diff changeset
154 You can also use evolve to solve `bumped` and `divergent` changeset/
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
155
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
156
365
9f6a77ec66cb evolve: switch the official name for "kill" to prune
Pierre-Yves.David@ens-lyon.org
parents: 357
diff changeset
157 Fix my history afterward: ``prune -n``
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
158 --------------------------------------
161
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 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
161 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
162
783
27a9567b14e2 doc: use --succ in prune help
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 782
diff changeset
163 you can use ``hg prune <old-changeset> --succ <new-changeset>`` to add obsolete
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
164 marker.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
165
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
166 View diff from the last amend
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
167 -----------------------------
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
168
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
169 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
170
785
85b0d93618b1 doc: fix trailing white space
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 784
diff changeset
171 ::
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
172 [alias]
325
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
173 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
174
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
175 View obsolete markers
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
176 ---------------------
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
177
517
0bc0c9edcb15 evolve: usual syntax/grammar errors/long lines cleanup
Patrick Mezard <patrick@mezard.eu>
parents: 500
diff changeset
178 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
179 need version 1.6.2
500
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
180
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
181 .. _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
182
500
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
183 .. image:: figures/hgview-example.png
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
184 :scale: 50%
4387e62bd4f4 Doc: several update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 492
diff changeset
185
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
186
325
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
187 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
188
441
d702f0d26c6a obsolete: remove debugsuccessors
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 367
diff changeset
189 $ hg debugobsolete
325
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
190 5eb72dbe0cb4 e8db4aa611f6
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
191 c4cbebac3751 4f1c269eab68
43a686709ded doc: readme and uncommit reference
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 228
diff changeset
192
199
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
193
4bb038229f26 FAQ: typos
David Douard <david.douard@logilab.fr>
parents: 198
diff changeset
194
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
195 Important Note
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
196 ==============
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
197
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
198 View change to your file
1287
6f2c1574eda8 docs: fix slightly unconventional .rst markup
Greg Ward <greg@gerg.ca>
parents: 786
diff changeset
199 ------------------------
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
200
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
201 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
202
786
59c78fd80a0b doc: improve reference to log --hidden
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 785
diff changeset
203 Only ``hg log`` and ``hgview`` support it, other
347
631cdf4295bc docs: improve recent updates
Patrick Mezard <patrick@mezard.eu>
parents: 325
diff changeset
204 graphical viewer do not.
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
205
786
59c78fd80a0b doc: improve reference to log --hidden
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 785
diff changeset
206 You can use ``hg log --graph --hidden`` from the command line
59c78fd80a0b doc: improve reference to log --hidden
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 785
diff changeset
207
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
208
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
209
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
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
212
228
5a17c0d41a00 proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 227
diff changeset
213
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