aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Kaseorg <andersk@MIT.EDU>2009-01-03 18:21:56 -0500
committerThiago Macieira <thiago@kde.org>2009-01-08 16:58:07 +0100
commit29b44c19819e52a2489860e5636d72c7a41eda36 (patch)
treeb8ff0cacc7c516ecd612bb515869f3d52d1e517b
parent4c4a6cf1dd9075859f59713bda04b2568ae7e115 (diff)
downloadsvn2git-29b44c19819e52a2489860e5636d72c7a41eda36.tar
svn2git-29b44c19819e52a2489860e5636d72c7a41eda36.tar.gz
svn2git-29b44c19819e52a2489860e5636d72c7a41eda36.tar.bz2
svn2git-29b44c19819e52a2489860e5636d72c7a41eda36.tar.xz
svn2git-29b44c19819e52a2489860e5636d72c7a41eda36.zip
Add a --no-metadata option to suppress the svn info in commit messages.
Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Thiago Macieira <thiago@kde.org>
-rw-r--r--src/options.cpp2
-rw-r--r--src/repository.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/options.cpp b/src/options.cpp
index 0de8625..892b6e1 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -42,7 +42,7 @@ void Options::showHelp()
void Options::parseArguments(const QStringList &argumentList)
{
QSet<QString> validOptions;
- validOptions << "help";
+ validOptions << "help" << "metadata";
QSet<QString> validOptionsWithComplement;
validOptionsWithComplement << "resume-from" << "max-rev" << "identity-map";
diff --git a/src/repository.cpp b/src/repository.cpp
index 5faf2af..9c2a9d5 100644
--- a/src/repository.cpp
+++ b/src/repository.cpp
@@ -16,6 +16,7 @@
*/
#include "repository.h"
+#include "options.h"
#include <QTextStream>
#include <QDebug>
#include <QLinkedList>
@@ -246,7 +247,8 @@ void Repository::Transaction::commit()
QByteArray message = log;
if (!message.endsWith('\n'))
message += '\n';
- message += "\nsvn path=" + svnprefix + "; revision=" + QByteArray::number(revnum) + "\n";
+ if (Options::globalOptions->switches.value("metadata", true))
+ message += "\nsvn path=" + svnprefix + "; revision=" + QByteArray::number(revnum) + "\n";
{
QByteArray branchRef = branch;