Mercurial > hg-website
comparison text/learning_mercurial_in_workflows.txt @ 108:ed683ad3947f
learning in workflows: Send changes by email.
author | Arne Babenhauserheide <bab@draketo.de> |
---|---|
date | Wed, 22 Apr 2009 13:56:35 +0200 |
parents | ee4b04bac02c |
children | 8c8c8aaaaad7 |
comparison
equal
deleted
inserted
replaced
107:ee4b04bac02c | 108:ed683ad3947f |
---|---|
209 | 209 |
210 At this point you all can work as if you had pulled from a local repository. All the data is now in your individual repositories and you can merge the changes and work with them without needing any connection to the served repository. | 210 At this point you all can work as if you had pulled from a local repository. All the data is now in your individual repositories and you can merge the changes and work with them without needing any connection to the served repository. |
211 | 211 |
212 ==== Sending changes by email ==== | 212 ==== Sending changes by email ==== |
213 | 213 |
214 Often you won't have direct access to the repository of someone else, be it because he's behind a restrictive firewall, or because you live in different timezones. You might also want to keep your changes confidential and prefer internal email (be sure to encrypt your emails with GnuPG!). | |
215 | |
216 In that case, you can easily export your changes as patches and send them by email. | |
217 | |
218 Another reason to send them by email can be that your policy requires manual review of the changes when the other developers are used to reading diffs in emails. I'm sure you can think of more reasons. | |
219 | |
220 Sending the changes via email is pretty straightforward with Mercurial. You just "export" your changes and attach (or copy paste) it in your email. Your collegues can then just "import" them. | |
221 | |
222 First check which changes you want to export | |
223 | |
224 $ cd project | |
225 $ hg log | |
226 | |
227 We assume that you want to export changeset 3 and 4: | |
228 | |
229 $ hg export 3 > change3.diff | |
230 $ hg export 4 > change4.diff | |
231 | |
232 Now attach them to an email and your collegues can just run "import" in both to get your full changes, including your user account. | |
233 | |
234 To be careful, they first clone their repository to have an integration directory: | |
235 | |
236 $ hg clone project integration | |
237 $ cd integration | |
238 $ hg import change3.diff | |
239 $ hg import change4.diff | |
240 | |
241 That's it. They can now test your changes in feature clones. If tehy accept it, they | |
242 | |
243 Note: The patchbomb extension automates the email-sending, but you don't need it for this workflow. | |
244 | |
214 ==== Using a shared repository ==== | 245 ==== Using a shared repository ==== |
215 | 246 |
216 -> bitbucket | 247 -> bitbucket |