From: Thiago Macieira Date: Mon, 24 Dec 2007 17:32:49 +0000 (-0200) Subject: remove the source branch in the rules X-Git-Url: http://andersk.mit.edu/gitweb/svn-all-fast-export.git/commitdiff_plain/973fa95b8703cfa2b29933e98a20e1c8b8026c40 remove the source branch in the rules --- diff --git a/src/repository.cpp b/src/repository.cpp index 08a5306..1a422f8 100644 --- a/src/repository.cpp +++ b/src/repository.cpp @@ -24,9 +24,6 @@ Repository::Repository(const Rules::Repository &rule) { foreach (Rules::Repository::Branch branchRule, rule.branches) { Branch branch; - branch.branchFrom = branchRule.branchFrom; - if (!branch.branchFrom.startsWith("refs/")) - branch.branchFrom.prepend("refs/heads/"); branch.isCreated = false; branches.insert(branchRule.name, branch); @@ -204,7 +201,6 @@ void Repository::Transaction::commit() Branch &br = repository->branches[branch]; if (!br.isCreated) { br.isCreated = true; - s << "from " << br.branchFrom << endl; } s << "data " << message.length() << endl; diff --git a/src/repository.h b/src/repository.h index b6b0708..2cee3f2 100644 --- a/src/repository.h +++ b/src/repository.h @@ -70,7 +70,6 @@ public: private: struct Branch { - QString branchFrom; bool isCreated; }; diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp index da05749..e9a1192 100644 --- a/src/ruleparser.cpp +++ b/src/ruleparser.cpp @@ -48,7 +48,7 @@ void Rules::load() // initialize the regexps we will use QRegExp repoLine("create repository\\s+(\\S+)", Qt::CaseInsensitive); - QRegExp repoBranchLine("branch\\s+(\\S+)\\s+from\\s+(\\S+)", Qt::CaseInsensitive); + QRegExp repoBranchLine("branch\\s+(\\S+)", Qt::CaseInsensitive); QRegExp matchLine("match\\s+(.*)", Qt::CaseInsensitive); QRegExp matchRepoLine("repository\\s+(\\S+)", Qt::CaseInsensitive); @@ -76,7 +76,6 @@ void Rules::load() if (repoBranchLine.exactMatch(line)) { Repository::Branch branch; branch.name = repoBranchLine.cap(1); - branch.branchFrom = repoBranchLine.cap(2); repo.branches += branch; continue; diff --git a/src/ruleparser.h b/src/ruleparser.h index f882289..4433862 100644 --- a/src/ruleparser.h +++ b/src/ruleparser.h @@ -30,7 +30,6 @@ public: struct Branch { QString name; - QString branchFrom; }; QString name; diff --git a/src/svn.cpp b/src/svn.cpp index 7ec3908..6cb7bc7 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -353,7 +353,7 @@ int SvnPrivate::exportRevision(int revnum) if (path_from == NULL) { // no, it's a new directory being added // Git doesn't handle directories, so we don't either - qDebug() << " mkdir ignored:" << key; + //qDebug() << " mkdir ignored:" << key; continue; }