From 97a6dc9b7672d324451a6f941aa7af5537aeafaa Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Sun, 24 Apr 2011 22:13:28 +0300 Subject: Do not recurse() into the svn path unless it is an existing directory. Otherwise "action recurse" may fail on files or something else unknown. --- src/svn.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/svn.cpp b/src/svn.cpp index 09495be..3933df3 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -815,6 +815,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)); -- cgit v1.2.1 From d257d0e911a18d2c248fc44328917ef209542a95 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Sun, 18 Jul 2010 20:00:14 +0300 Subject: Initialize branches specified in the create repository ruleset. Otherwise, what's the point of that directive. Sometimes repository does not start from the master branch. --- src/repository.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repository.cpp b/src/repository.cpp index e6ea81c..c51496b 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); } -- cgit v1.2.1 From 2ce7467917ef046dd9abfb1eb5464cd1ee7c7726 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Sun, 18 Jul 2010 20:01:41 +0300 Subject: Do not initialize master branch if branches were specified in the ruleset. --- src/repository.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/repository.cpp b/src/repository.cpp index c51496b..e6c0f55 100644 --- a/src/repository.cpp +++ b/src/repository.cpp @@ -72,8 +72,9 @@ Repository::Repository(const Rules::Repository &rule) branches.insert(branchRule.name, branch); } - // create the default branch - branches["master"].created = 1; + // create the default branch if no branches were manually specified + if (rule.branches.length() == 0) + branches["master"].created = 1; fastImport.setWorkingDirectory(name); if (!CommandLineParser::instance()->contains("dry-run")) { -- cgit v1.2.1