dbhub: Improve support for different branches

This adds initial support for handling of different branches. Before
this we would always assume we were working with the master branch even
if in fact we were not. Now we respect the actual branch name and
support checkouts of different branches of the same database.
This commit is contained in:
Martin Kleusberg
2020-07-10 10:52:08 +02:00
parent d763672994
commit 6c2e38c269
2 changed files with 30 additions and 11 deletions
+2 -2
View File
@@ -79,10 +79,10 @@ private:
// Helper functions for managing the list of locally available databases
void localAssureOpened();
QString localAdd(QString filename, QString identity, const QUrl& url, const std::string& new_commit_id);
QString localAdd(QString filename, QString identity, const QUrl& url, const std::string& new_commit_id, const std::string& branch);
QString localExists(const QUrl& url, QString identity);
QString localCheckFile(const QString& local_file);
std::string localLastCommitId(QString clientCert, const QUrl& url);
std::string localLastCommitId(QString clientCert, const QUrl& url, const std::string& branch);
// Helper functions for building multi-part HTTP requests
void addPart(QHttpMultiPart* multipart, const QString& name, const QString& value) const;