aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp14
-rw-r--r--src/repository.cpp2
-rw-r--r--src/ruleparser.cpp2
-rw-r--r--src/svn.cpp3
4 files changed, 15 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 09a4225..ec969c5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -55,12 +55,18 @@ QHash<QByteArray, QByteArray> loadIdentityMapFile(const QString &fileName)
// Support git-svn author files, too
// - svn2git native: loginname Joe User <user@example.com>
// - git-svn: loginname = Joe User <user@example.com>
- int rightspace = space;
- if (line.indexOf(" = ") == space)
- rightspace += 2;
+ int rightspace = line.indexOf(" = ");
+ int leftspace = space;
+ if (rightspace == -1) {
+ rightspace = space;
+ } else {
+ leftspace = rightspace;
+ rightspace += 2;
+ }
QByteArray realname = line.mid(rightspace).trimmed();
- line.truncate(space);
+ line.truncate(leftspace);
+
result.insert(line, realname);
};
file.close();
diff --git a/src/repository.cpp b/src/repository.cpp
index abd037a..4d23cab 100644
--- a/src/repository.cpp
+++ b/src/repository.cpp
@@ -67,7 +67,7 @@ Repository::Repository(const Rules::Repository &rule)
{
foreach (Rules::Repository::Branch branchRule, rule.branches) {
Branch branch;
- branch.created = 0; // not created
+ branch.created = 1;
branches.insert(branchRule.name, branch);
}
diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp
index b11ea5b..437f3f8 100644
--- a/src/ruleparser.cpp
+++ b/src/ruleparser.cpp
@@ -141,7 +141,7 @@ void Rules::load(const QString &filename)
QRegExp matchBranchSubstLine("substitute branch\\s+(.+)$", Qt::CaseInsensitive);
QRegExp matchRevLine("(min|max) revision (\\d+)", Qt::CaseInsensitive);
QRegExp matchAnnotateLine("annotated\\s+(\\S+)", Qt::CaseInsensitive);
- QRegExp matchPrefixLine("prefix\\s+(\\S+)", Qt::CaseInsensitive);
+ QRegExp matchPrefixLine("prefix\\s+(.*)$", Qt::CaseInsensitive);
QRegExp declareLine("declare\\s+("+varRegex+")\\s*=\\s*(\\S+)", Qt::CaseInsensitive);
QRegExp variableLine("\\$\\{("+varRegex+")(\\|[^}$]*)?\\}", Qt::CaseInsensitive);
QRegExp includeLine("include\\s+(.*)", Qt::CaseInsensitive);
diff --git a/src/svn.cpp b/src/svn.cpp
index 0c28cf2..d95ccb3 100644
--- a/src/svn.cpp
+++ b/src/svn.cpp
@@ -817,6 +817,9 @@ int SvnRevision::recurse(const char *path, const svn_fs_path_change_t *change,
if(kind == svn_node_none) {
qWarning() << "WARN: Trying to recurse using a nonexistant path" << path << ", ignoring";
return EXIT_SUCCESS;
+ } else if(kind != svn_node_dir) {
+ qWarning() << "WARN: Trying to recurse using a non-directory path" << path << ", ignoring";
+ return EXIT_SUCCESS;
}
SVN_ERR(svn_fs_dir_entries(&entries, fs_root, path, pool));