canmove, Confirmed users, Bureaucrats and Sysops emeriti
1,093
edits
No edit summary |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
Here are some tips about using Mercurial, based on our experiences managing the Bespin project with it. | |||
==== Getting Started ==== | ==== Getting Started ==== | ||
Our main code repository is hosted at http://hg.mozilla.org/labs/ | Our main code repository is hosted at http://hg.mozilla.org/labs/bespinclient. You can pull from that by: | ||
* [http://www.selenic.com/mercurial/wiki/ Downloading Mercurial] | * [http://www.selenic.com/mercurial/wiki/ Downloading Mercurial] | ||
Line 14: | Line 12: | ||
[extensions] | [extensions] | ||
rebase = | |||
hgext.extdiff = | hgext.extdiff = | ||
Line 33: | Line 31: | ||
==== Best Practices ==== | ==== Best Practices ==== | ||
* Use "hg | * Use "hg pull --rebase" | ||
** You need the " | ** You need the "rebase =" line in your config | ||
** It will automatically handle merging, so instead of manually doing hg pull / hg merge, just do hg | ** It will automatically handle merging, so instead of manually doing hg pull / hg merge, just do hg pull --rebase and let it do its job. By rebasing, we don't end up with lots of merge commits in the history. | ||
* Look ahead | * Look ahead | ||
Line 45: | Line 40: | ||
* Eek, broken! How do I get back! | * Eek, broken! How do I get back! | ||
** If you do a fetch/pull and something messes up (or any operation) you can do a "hg rollback" to revert back | ** If you do a fetch/pull and something messes up (or any operation) you can do a "hg rollback" to revert back | ||
* When checking in, use the bug number at the beginning of the message and then the web view will auto link to the bug. | |||
** E.g. hg ci -m "487459: Fixes the selection bug in Safari with -webkit-user-select: none;" | |||
==== Contributing Back ==== | ==== Contributing Back ==== | ||
When you are ready to | When you are ready to send code back to the main repository, please take a look at [[Labs/Bespin/Contributing|Contributing to Bespin]]. | ||