aboutsummaryrefslogtreecommitdiffstats
path: root/src/ruleparser.cpp
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@hurrynot.org>2010-07-22 18:32:21 +0530
committerRaja R Harinath <harinath@hurrynot.org>2010-07-22 18:32:21 +0530
commit008b28e0f4c48de8d740c51c053020d1a36315bf (patch)
tree6acd61c923518b0f9af289f1ad81e8bf6deeb463 /src/ruleparser.cpp
parentf0b31cfe9d31421b83507316d1274d191336a1f7 (diff)
downloadsvn2git-008b28e0f4c48de8d740c51c053020d1a36315bf.tar
svn2git-008b28e0f4c48de8d740c51c053020d1a36315bf.tar.gz
svn2git-008b28e0f4c48de8d740c51c053020d1a36315bf.tar.bz2
svn2git-008b28e0f4c48de8d740c51c053020d1a36315bf.tar.xz
svn2git-008b28e0f4c48de8d740c51c053020d1a36315bf.zip
Provide a way to merge repositories
Suppose you have multiple repositories in SVN that you want to merge into a single one in GIT, it can get very messy to handle all the special-case rules. Instead, we introduce a new "forwarding repository" concept, which looks like repository subordinate repository unified prefix foo/ end repository This forwards all commits on the "subordinate" SVN tree to the "unified" GIT tree, with each file prefixed with "foo/".
Diffstat (limited to 'src/ruleparser.cpp')
-rw-r--r--src/ruleparser.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp
index 42334b7..d1f5cd4 100644
--- a/src/ruleparser.cpp
+++ b/src/ruleparser.cpp
@@ -81,7 +81,13 @@ void Rules::load()
repo.branches += branch;
continue;
- } else if (line == "end repository") {
+ } else if (matchRepoLine.exactMatch(line)) {
+ repo.forwardTo = matchRepoLine.cap(1);
+ continue;
+ } else if (matchPrefixLine.exactMatch(line)) {
+ repo.prefix = matchPrefixLine.cap(1);
+ continue;
+ } else if (line == "end repository") {
m_repositories += repo;
{
// clear out 'repo'