User Tools

Site Tools


mercurial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mercurial [2013/08/29 14:54]
mstraub
mercurial [2013/08/29 14:54] (current)
mstraub
Line 1: Line 1:
 +====== Mercurial (hg) ======
 +
 +
 +=== Extract parts of a repository into another repository ===
 +.. and also keep the history!
 +
 +
 +Step 1: use the [[http://​mercurial.selenic.com/​wiki/​ConvertExtension|convert extension]] for extraction
 +
 +Step 1a: [[http://​mercurial.selenic.com/​wiki/​UsingExtensions|Enable Extension]]
 +
 +Step 1b: Create a filemap
 +
 +<​code>​
 +include repo_subdir
 +exclude repo_subdir/​bigfile.csv
 +rename repo_subdir .
 +</​code>​
 +
 +Step 1c:
 +<code bash>
 +hg convert --filemap /​path/​to/​filemap /​path/​to/​old/​repo /​path/​to/​extracted/​repo
 +</​code>​
 +
 +Step 2: Pull the created repo into your current repo
 +<code bash>
 +cd /​path/​to/​repo
 +hg pull /​path/​to/​extracted/​repo
 +</​code>​