aboutsummaryrefslogtreecommitdiffstats
path: root/src/svn.cpp
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-05-28 23:34:35 +0100
committerColin Guthrie <colin@mageia.org>2014-05-28 23:50:40 +0100
commit1dbf0a91195c6e8bd4404cc6b922ba35dd5e9b4e (patch)
tree7369e927673164a656d12a84543dbabfa7873d16 /src/svn.cpp
parent3b270cf149ee67bcf2dace4edec34c91abe13bc5 (diff)
downloadsvn2git-1dbf0a91195c6e8bd4404cc6b922ba35dd5e9b4e.tar
svn2git-1dbf0a91195c6e8bd4404cc6b922ba35dd5e9b4e.tar.gz
svn2git-1dbf0a91195c6e8bd4404cc6b922ba35dd5e9b4e.tar.bz2
svn2git-1dbf0a91195c6e8bd4404cc6b922ba35dd5e9b4e.tar.xz
svn2git-1dbf0a91195c6e8bd4404cc6b922ba35dd5e9b4e.zip
Move the repo renaming to a method for convenience.
This also renames log and marks files.
Diffstat (limited to 'src/svn.cpp')
-rw-r--r--src/svn.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/svn.cpp b/src/svn.cpp
index ed49f48..72f73cd 100644
--- a/src/svn.cpp
+++ b/src/svn.cpp
@@ -724,20 +724,9 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha
return repo->deleteBranch(branch, revnum);
}
- // Master is deleted, which generally means we're obsoleting our package
- // Rename the repository instead (and keep the revision number in-case it's
- // resurrected later
- if (!QDir(repository).exists()) { // repo doesn't exist yet.
- qCritical() << "Cannot find repository dir for" << repository;
- return EXIT_FAILURE;
- }
-
QString newreponame = repository + "-r" + QString::number(revnum);
- if (!QFile::rename(repository, newreponame)) {
- qCritical() << "Could not rename repository dir for" << repository;
+ if (!repo->rename(newreponame))
return EXIT_FAILURE;
- }
-
repositories->remove(repository);
repositories->insert(newreponame, repo);
return EXIT_SUCCESS;