Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
becki:linux:hg_tips [2009-07-10 09:08] becki |
— (aktuell) | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | [[CVS Tips]] - [[SVN Tips]] | ||
| - | |||
| - | ====== Mercurial Tips == | ||
| - | ===== Getting Help == | ||
| - | |||
| - | * ''hg'' lists basic commands, ''hg help'' lists all commands and ''hg help <command>'' shows the help for ''<command>'' | ||
| - | * [[http://mercurial.selenic.com/|Mercurial homepage]] with docu links | ||
| - | |||
| - | ===== Initial import == | ||
| - | |||
| - | Cd into the root directory of your project and type ''hg init''. This merely creates the subdir ''.hg'' which //is// the repository.:?: The current dir becomes the working dir of the project. | ||
| - | |||
| - | Add all files to the project by ''hg add'' and ''hg commit'' | ||
| - | |||
| - | [[http://mercurial.selenic.com/wiki/QuickStart#Setting_up_a_new_Mercurial_project|Source]] | ||
| - | |||
| - | ===== Enable graphical log == | ||
| - | |||
| - | Add this to the file ''$HOME/.hgrc'': | ||
| - | |||
| - | <code ini> | ||
| - | [extensions] | ||
| - | hgext.graphlog = | ||
| - | </code> | ||
| - | |||
| - | Usage: ''hg glog [OPTIONS]'' | ||
| - | |||
| - | [[http://mercurial.selenic.com/wiki/GraphlogExtension|Source]] | ||
| - | |||
| - | ===== More user friendly diff == | ||
| - | |||
| - | Download and install colordiff from www.slackbuilds.org. Thed add the following to ''$HOME/.hgrc'': | ||
| - | |||
| - | <code ini> | ||
| - | [extensions] | ||
| - | hgext.extdiff = | ||
| - | |||
| - | [extdiff] | ||
| - | cmd.cdiff = colordiff | ||
| - | opts.cdiff = -uprN | ||
| - | </code> | ||
| - | |||
| - | Usage: ''%%hg cdiff [...] [| less -R]%%'' | ||
| - | |||
| - | Sources: [[http://mercurial.selenic.com/wiki/TipsAndTricks#Generating_color_diff_output_with_extdiff_and_colordiff|1]] [[http://mercurial.selenic.com/wiki/ExtdiffExtension|2]] [[http://hgbook.red-bean.com/read/adding-functionality-with-extensions.html|3]] | ||