From 4112f7856817fcaa04c1f42cbe3e871c0bd7c61c Mon Sep 17 00:00:00 2001 From: Torgny Nyblom Date: Tue, 18 May 2010 19:51:52 +0200 Subject: Save the exported marks along with the associated revisions for later use. --- src/repository.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/repository.cpp b/src/repository.cpp index f81bb26..88b17c3 100644 --- a/src/repository.cpp +++ b/src/repository.cpp @@ -97,6 +97,19 @@ void Repository::closeFastImport() } processHasStarted = false; processCache.remove(this); + // Save the exported marks + QString revsFile = name; + revsFile.replace('/', '_'); + revsFile.prepend("revisions-"); + QFile exportedMarks(revsFile); + qDebug() << exportedMarks.open(QIODevice::Truncate | QIODevice::Text | QIODevice::WriteOnly); + + int mark; + foreach(mark, exportedCommits) + { + exportedMarks.write(QString(":%2 r%1\n").arg(mark).arg(commitMarks.value(mark)).toLocal8Bit()); + } + exportedMarks.close(); } void Repository::reloadBranches() -- cgit v1.2.1