aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/repository.cpp6
-rw-r--r--src/repository.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/repository.cpp b/src/repository.cpp
index 1cb7c41..bec114b 100644
--- a/src/repository.cpp
+++ b/src/repository.cpp
@@ -201,7 +201,11 @@ void Repository::Transaction::commit()
s << "committer " << author << ' ' << datetime << " -0000" << endl;
Branch &br = repository->branches[branch];
- Q_ASSERT(br.created);
+ if (!br.created) {
+ qWarning() << "Branch" << branch << "doesn't exist at revision"
+ << revnum << "-- did you resume from the wrong revision?";
+ br.created = revnum;
+ }
s << "data " << message.length() << endl;
}
diff --git a/src/repository.h b/src/repository.h
index edd04b7..171b3b7 100644
--- a/src/repository.h
+++ b/src/repository.h
@@ -70,7 +70,7 @@ public:
private:
struct Branch
{
- uint created;
+ int created;
};
QHash<QString, Branch> branches;