Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/patchbomb.py @ 4280:a9336520a4ee
Improve documentation for patchbomb and email
author | John Goerzen <jgoerzen@complete.org> |
---|---|
date | Thu, 22 Mar 2007 14:02:39 -0500 |
parents | 126d1967a3f8 |
children | 8625504f507c |
comparison
equal
deleted
inserted
replaced
4279:126d1967a3f8 | 4280:a9336520a4ee |
---|---|
77 except ImportError: pass | 77 except ImportError: pass |
78 | 78 |
79 def patchbomb(ui, repo, *revs, **opts): | 79 def patchbomb(ui, repo, *revs, **opts): |
80 '''send changesets as a series of patch emails | 80 '''send changesets as a series of patch emails |
81 | 81 |
82 The series starts with a "[PATCH 0 of N]" introduction, which | 82 By default, the series starts with a "[PATCH 0 of N]" introduction, which |
83 describes the series as a whole. | 83 describes the series as a whole. |
84 | 84 |
85 Each patch email has a Subject line of "[PATCH M of N] ...", using | 85 Each patch email has a Subject line of "[PATCH M of N] ...", using |
86 the first line of the changeset description as the subject text. | 86 the first line of the changeset description as the subject text. |
87 The message contains two or three body parts. First, the rest of | 87 The message contains two or three body parts. First, the rest of |
88 the changeset description. Next, (optionally) if the diffstat | 88 the changeset description. Next, (optionally) if the diffstat |
89 program is installed, the result of running diffstat on the patch. | 89 program is installed, the result of running diffstat on the patch. |
90 Finally, the patch itself, as generated by "hg export". | 90 Finally, the patch itself, as generated by "hg export". |
91 | 91 |
92 With --outgoing, emails will be generated for patches not | 92 With --outgoing, emails will be generated for patches not |
93 found in the target repository (or only those which are | 93 found in the destination repository (or only those which are |
94 ancestors of the specified revisions if any are provided) | 94 ancestors of the specified revisions if any are provided) |
95 | |
96 With --bundle, changesets are selected as for --outgoing, | |
97 but a single email containing a binary Mercurial bundle as an | |
98 attachment will be sent. | |
99 | |
100 Examples: | |
101 | |
102 hg email -r 3000 # send patch 3000 only | |
103 hg email -r 3000 -r 3001 # send patches 3000 and 3001 | |
104 hg email -r 3000:3005 # send patches 3000 through 3005 | |
105 hg email 3000 # send patch 3000 (deprecated) | |
106 | |
107 hg email -o # send all patches not in default | |
108 hg email -o DEST # send all patches not in DEST | |
109 hg email -o -r 3000 # send all ancestors of 3000 not in default | |
110 hg email -o -r 3000 DEST # send all ancestors of 3000 not in DEST | |
111 | |
112 hg email -b # send bundle of all patches not in default | |
113 hg email -b DEST # send bundle of all patches not in DEST | |
114 hg email -b -r 3000 # bundle of all ancestors of 3000 not in default | |
115 hg email -b -r 3000 DEST # bundle of all ancestors of 3000 not in DEST | |
116 | |
117 Before using this command, you will need to enable email in your hgrc. | |
118 See hgrc(5) for details. | |
95 ''' | 119 ''' |
96 | 120 |
97 def prompt(prompt, default = None, rest = ': ', empty_ok = False): | 121 def prompt(prompt, default = None, rest = ': ', empty_ok = False): |
98 if default: prompt += ' [%s]' % default | 122 if default: prompt += ' [%s]' % default |
99 prompt += rest | 123 prompt += rest |