diff options
author | Modestas Vainius <modestas@vainius.eu> | 2011-04-24 19:33:54 +0300 |
---|---|---|
committer | Modestas Vainius <modestas@vainius.eu> | 2011-04-24 19:45:39 +0300 |
commit | 22f53393d5adc5674e636d79c4a61137015be12b (patch) | |
tree | 387f7982d5797167f7821ccbbd7a038ba85aec9d /src/repository.h | |
parent | 197979b6a641b8b5fa4856c700b1235491c73a41 (diff) | |
download | svn2git-22f53393d5adc5674e636d79c4a61137015be12b.tar svn2git-22f53393d5adc5674e636d79c4a61137015be12b.tar.gz svn2git-22f53393d5adc5674e636d79c4a61137015be12b.tar.bz2 svn2git-22f53393d5adc5674e636d79c4a61137015be12b.tar.xz svn2git-22f53393d5adc5674e636d79c4a61137015be12b.zip |
Add support for adding svn commit info metadata as git notes.
The patch add --add-metadata-notes command line option which is similar to
--add-metadata except rather embedding svn commit info into the commit message,
it is added as a note for the respective commit.
Diffstat (limited to 'src/repository.h')
-rw-r--r-- | src/repository.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/repository.h b/src/repository.h index 349cf97..4716ced 100644 --- a/src/repository.h +++ b/src/repository.h @@ -126,6 +126,9 @@ public: void deleteFile(const QString &path); QIODevice *addFile(const QString &path, int mode, qint64 length); + + void commitNote(const QByteArray ¬eText, bool append, + const QByteArray &commit = QByteArray()); }; Repository(const Rules::Repository &rule); int setupIncremental(int &cutoff); @@ -144,12 +147,20 @@ public: void finalizeTags(); void commit(); + static QByteArray formatMetadataMessage(const QByteArray &svnprefix, int revnum, + const QByteArray &tag = QByteArray()); + + bool branchExists(const QString& branch) const; + const QByteArray branchNote(const QString& branch) const; + void setBranchNote(const QString& branch, const QByteArray& noteText); + private: struct Branch { int created; QVector<int> commits; QVector<int> marks; + QByteArray note; }; struct AnnotatedTag { |