Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

doc: further work on patches page

Changeset 5f83c0fb7958

Parent ba8de5d32dfa

by Steve Borho

Changes to 2 files · Browse files at 5f83c0fb7958 Showing diff from parent ba8de5d32dfa Diff from another changeset...

Change 1 of 1 Show Entire File doc/​TODO Stacked
 
5
6
7
8
 
 
5
6
7
 
8
@@ -5,4 +5,4 @@
   figures/visual-diff.jpg  new figure for p4pending -new figure for import +new figure for import, email
1
2
3
4
5
6
7
8
9
10
11
 
 
12
13
14
15
 
 
 
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 
30
31
32
33
34
35
36
37
38
39
 
 
40
41
 
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 
 
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
 
 
 
 
 
 
 
 
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
 
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
1
2
3
4
5
6
7
8
9
10
 
11
12
13
 
 
 
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 
41
42
43
 
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 
 
 
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
 
 
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
 
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
 *******  Patches  *******    .. module:: patches   :synopsis: Describe patch operations    Defining a patch  ================   -`The patch management problem <http://tortoisehg.bitbucket.org/hgbook/1.4/managing-change-with-mercurial-queues.html#sec:mq:patch-mgmt>`_ +These links are recommended reading for understanding the history and nature +of patches and how they can be used with Mercurial.   -`Understanding patches <http://tortoisehg.bitbucket.org/hgbook/1.4/managing-change-with-mercurial-queues.html#sec:mq:patch>`_ - -`More about patches <http://tortoisehg.bitbucket.org/hgbook/1.4/managing-change-with-mercurial-queues.html#sec:mq:adv-patch>`_ +* `The patch management problem <http://tortoisehg.bitbucket.org/hgbook/1.4/managing-change-with-mercurial-queues.html#sec:mq:patch-mgmt>`_ +* `Understanding patches <http://tortoisehg.bitbucket.org/hgbook/1.4/managing-change-with-mercurial-queues.html#sec:mq:patch>`_ +* `More about patches <http://tortoisehg.bitbucket.org/hgbook/1.4/managing-change-with-mercurial-queues.html#sec:mq:adv-patch>`_    Pitfalls  ========    The standard patch format cannot describe binary files, renames, copies,  or permission changes. If your patch needs to record any of those  things, you will need to enable **git** patches via::     [diff]   git=True    Mercurial 1.5 improves it's behavior in this regard. It will warn you  when git diffs are required, or sometimes upgrade to the git format  automatically. +`diff section <http://www.selenic.com/mercurial/hgrc.5.html#diff>`_.    Mercurial's patch routines do not deal well with mixed EOLN between  source files and patches. The **patch.eol** setting was introduced in  1.3 to improve this situation::     [patch]   eol = auto #strict, lf, or crlf    The work on the hgeol extension is also improving this area. Perhaps it -will be resolved by hg-1.5 +will be resolved by hg-1.5. +`patch section <http://www.selenic.com/mercurial/hgrc.5.html#patch>`_.   -Apply a patch is not a foolproof operation. If the source file has +Applying a patch is not a foolproof operation. If the source file has  diverged from the file that was used to create the patch, there may be  conflicts during the patch application. These are written to a file  with an .rej extension. Currently, these rejected changes must be  manually resolved by the user.      Export Patches  ==============    Changeset  ---------    To export a changeset as a patch file, use the changeset context menu of -the Repository Explorer. :menuselection:`Export --> Export Patch` You -will be asked to provide a filename. - +the Repository Explorer to select :menuselection:`Export --> Export Patch`. +You will be asked to provide a filename.    Changeset Ranges  ----------------    Select a range of changesets in the Repository Explorer. Left click on  the first (base) changeset, then right click on the last (target)  changeset. This opens a special revision range context menu. From this  menu you can generate patches, generate a bundle, send emails, or view  the accumulated changes.    This is a very powerful feature and there is no restriction on the base  and target changesets you can select.    Email  -----    To send a changeset as an email, use the changeset context menu of the  Repository Explorer. :menuselection:`Export --> Email Patch`. This  opens the e-mail dialog for this single changeset.    To send a changeset range, use the changeset range selection feature of  the Repository Explorer and select  :menuselection:`Email from here to selected...`   -..note:: - You must configure SMTP to send patches via email +Lastly, you can use the :guilabel:`Email` button on the syncbar of the +Repository Explorer to email all outgoing changes to the selected remote +repository. + +.. note:: + You must configure + `SMTP <http://www.selenic.com/mercurial/hgrc.5.html#smtp>`_ + to send patches via email    Cherry Picking  --------------    Use the changeset range selection feature of the Repository Explorer and  select :menuselection:`Diff with selected`. This opens up a status  viewer showing you the accumulated changes between your base and target  changesets.    From the status viewer, you can select files and diff hunks just as you  can in the commit tool, and preview the final result in the  :guilabel:`Save Preview` tab. Pressing :guilabel:`Save As` will save  the selected changes to a patch file.    For even finer cherry-picking, you can highlight a number of diff-hunks  in the hunk selection pane and hit CTRL-C. This will copy the  highlighted (mouse selected, not toggled) hunks to the clipboard.   -..note:: +.. note::   Reversing the order of your selection reverses the effect of the   patch.      Import Patches  ==============    Import dialog  Pitfall: requires clean working directory state  Pitfall: hg import can spawn an editor if patch has no header      Patch Queues  ============    MQ pane in Repository Explorer, Commit tool.    .. vim: noet ts=4