From 008b28e0f4c48de8d740c51c053020d1a36315bf Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Thu, 22 Jul 2010 18:32:21 +0530 Subject: 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/". --- src/ruleparser.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/ruleparser.cpp') 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' -- cgit v1.2.1