Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:hg_tips

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
becki:linux:hg_tips [2009-12-07 15:23]
becki removed
— (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 
- 
-===== Configuration == 
-==== 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 == 
- 
-Sources: [[http://​mercurial.selenic.com/​wiki/​TipsAndTricks#​Generating_color_diff_output_with_extdiff_and_colordiff|TipsAndTricks]] [[http://​mercurial.selenic.com/​wiki/​ExtdiffExtension|Extdiff extension]] [[http://​hgbook.red-bean.com/​read/​adding-functionality-with-extensions.html|HGBook]] 
- 
-=== Command Line Diff == 
- 
-Download and install colordiff from www.slackbuilds.org. Then add the following to ''​$HOME/​.hgrc'':​ 
- 
-<code ini> 
-[extensions] 
-hgext.extdiff = 
- 
-[extdiff] 
-cmd.cdiff = colordiff 
-opts.cdiff = -uprN 
-</​code>​ 
- 
-Usage: ''​%%hg cdiff [...] [| less -R]%%''​ 
- 
-=== Graphical Diff == 
- 
-Add the following to ''​$HOME/​.hgrc'':​ 
- 
-<code ini> 
-[extensions] 
-hgext.extdiff = 
- 
-[extdiff] 
-cmd.kdiff = kompare 
-</​code>​ 
- 
-===== Usage == 
-==== 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]] 
- 
-==== Single User working Practice == 
- 
-Proposal: Have a central repository per project which is not worked on. For each subproblem to solve clone the central, work on the clone and push the modifications back to the central. More than one subproblem specific repostiories at the same time are possible and [[http://​mercurial.selenic.com/​wiki/​WorkingPractices|encouraged]]. 
- 
-<code bash> 
-hg clone project project-subproblem # clone repository to get new working dir 
-cd project-subproblem 
-# make changes 
-hg commit 
-hg push ../project 
-</​code>​ 
- 
-Note, that after the push, the working dir in the central (''​project''​) are not modified, the parent (''​hg parent''​) is still the old revision. Use ''​hg update''​ in the central to mend this. 
- 
-[[http://​mercurial.selenic.com/​wiki/​QuickStart#​Clone.2C_Commit.2C_Merge|Source]] 
- 
- 
-==== Undoing Changes == 
-=== Undoing lokal Changes == 
- 
-  hg revert <​file1>​ [<​file2>​] 
- 
-Restores the files in the working directory to the state when they had been last commited. Much more options are posssible, see ''​hg help resore''​ [[http://​hgbook.red-bean.com/​read/​finding-and-fixing-mistakes.html#​id391367|Hgbook]] [[http://​mercurial.selenic.com/​wiki/​Revert|Wiki]] 
- 
-=== Undoing committed Changes == 
- 
-FIXME 
  
becki/linux/hg_tips.1260199434.txt.gz · Zuletzt geändert: 2009-12-07 15:23 von becki

Impressum - Datenschutzerklärung