]> andersk Git - svn-all-fast-export.git/blobdiff - src/repository.h
Add SVN code
[svn-all-fast-export.git] / src / repository.h
index 7779bdf31ff6f0a918c133aaf54ae61667825b4e..cd50cdc0439a9bde255457a167c7b593fe520c4e 100644 (file)
 class Repository
 {
 public:
-    struct Branch
+    class Transaction
     {
-        QString branchFrom;
-        bool isCreated;
-    };
+        Q_DISABLE_COPY(Transaction)
+        friend class Repository;
+        struct FileProperties {
+            int mode;
+            int mark;
+        };
+
+        Repository *repository;
+        QByteArray branchRef;
+        QByteArray svnprefix;
+        QByteArray author;
+        QByteArray log;
+        uint datetime;
+        int revnum;
 
+        QStringList deletedFiles;
+        QHash<QString, FileProperties> modifiedFiles;
+
+    public:
+        ~Transaction();
+        void commit();
+
+        void setAuthor(const QByteArray &author);
+        void setDateTime(uint dt);
+        void setLog(const QByteArray &log);
+
+        void deleteFile(const QString &path);
+        QIODevice *addFile(const QString &path, int mode, qint64 length);
+    };
     Repository(const Rules::Repository &rule);
     ~Repository();
 
+    Transaction *newTransaction(const QString &branch, const QString &svnprefix, int revnum);
+
 private:
+    struct Branch
+    {
+        QString branchFrom;
+        bool isCreated;
+    };
+
     QHash<QString, Branch> branches;
     QProcess fastImport;
+
+    Q_DISABLE_COPY(Repository)
 };
 
 #endif
This page took 0.025879 seconds and 4 git commands to generate.