diff options
author | Modestas Vainius <modestas@vainius.eu> | 2011-04-24 22:25:57 +0300 |
---|---|---|
committer | Modestas Vainius <modestas@vainius.eu> | 2011-04-24 22:25:57 +0300 |
commit | e8a16c9a47eef7c625686d2a868ec91d05fd95c5 (patch) | |
tree | 74b76d3730ee2b9961734ce6589ab659e48eb796 /src/repository.cpp | |
parent | 197979b6a641b8b5fa4856c700b1235491c73a41 (diff) | |
download | svn2git-e8a16c9a47eef7c625686d2a868ec91d05fd95c5.tar svn2git-e8a16c9a47eef7c625686d2a868ec91d05fd95c5.tar.gz svn2git-e8a16c9a47eef7c625686d2a868ec91d05fd95c5.tar.bz2 svn2git-e8a16c9a47eef7c625686d2a868ec91d05fd95c5.tar.xz svn2git-e8a16c9a47eef7c625686d2a868ec91d05fd95c5.zip |
Support 'description' field in the create repository rule.
Its value is used to fill in repository/description file used by gitweb.
Diffstat (limited to 'src/repository.cpp')
-rw-r--r-- | src/repository.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/repository.cpp b/src/repository.cpp index e6ea81c..abf0b21 100644 --- a/src/repository.cpp +++ b/src/repository.cpp @@ -84,6 +84,15 @@ Repository::Repository(const Rules::Repository &rule) init.setWorkingDirectory(name); init.start("git", QStringList() << "--bare" << "init"); init.waitForFinished(-1); + // Write description + if (!rule.description.isEmpty()) { + QFile fDesc(QDir(name).filePath("description")); + if (fDesc.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) { + fDesc.write(rule.description.toUtf8()); + fDesc.putChar('\n'); + fDesc.close(); + } + } { QFile marks(name + "/" + marksFileName(name)); marks.open(QIODevice::WriteOnly); |