aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago@cassini.local.lan>2007-12-25 20:39:25 -0200
committerThiago Macieira <thiago@cassini.local.lan>2007-12-25 20:39:25 -0200
commitbdc20860cb0bd30bcef6732e5e2f1811b8c2cdf4 (patch)
tree005c69d7b26378eb2b55211faae93a3879603772
parente087596c78237db34511211719218fe0fb2e8e51 (diff)
downloadsvn2git-bdc20860cb0bd30bcef6732e5e2f1811b8c2cdf4.tar
svn2git-bdc20860cb0bd30bcef6732e5e2f1811b8c2cdf4.tar.gz
svn2git-bdc20860cb0bd30bcef6732e5e2f1811b8c2cdf4.tar.bz2
svn2git-bdc20860cb0bd30bcef6732e5e2f1811b8c2cdf4.tar.xz
svn2git-bdc20860cb0bd30bcef6732e5e2f1811b8c2cdf4.zip
Don't crash when running in dry-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;