From: Thiago Macieira Date: Tue, 25 Dec 2007 22:39:25 +0000 (-0200) Subject: Don't crash when running in dry-mode X-Git-Url: http://andersk.mit.edu/gitweb/svn-all-fast-export.git/commitdiff_plain/bdc20860cb0bd30bcef6732e5e2f1811b8c2cdf4 Don't crash when running in dry-mode --- 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 branches;