Commit 0188b74a authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

ClearCase: Use check out comment on check in

Task-number: QTCREATORBUG-12846
Change-Id: I02b3d713df8cc0e28d1bd32a401f692460c5fdbd
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent c69e4f27
......@@ -1244,8 +1244,9 @@ void ClearCasePlugin::startCheckIn(const QString &workingDir, const QStringList
// Create a new submit change file containing the submit template
TempFileSaver saver;
saver.setAutoRemove(false);
// TODO: Retrieve submit template from
const QString submitTemplate;
QString submitTemplate;
if (files.count() == 1)
submitTemplate = ccGetComment(workingDir, files.first());
// Create a submit
saver.write(submitTemplate.toUtf8());
if (!saver.finalize()) {
......@@ -1992,6 +1993,13 @@ ViewData ClearCasePlugin::ccGetView(const QString &workingDir) const
return res;
}
QString ClearCasePlugin::ccGetComment(const QString &workingDir, const QString &fileName) const
{
QStringList args(QLatin1String("describe"));
args << QLatin1String("-fmt") << QLatin1String("%c") << fileName;
return runCleartoolSync(workingDir, args);
}
void ClearCasePlugin::updateStreamAndView()
{
QStringList args(QLatin1String("lsstream"));
......
......@@ -152,6 +152,7 @@ public:
QString ccGetPredecessor(const QString &version) const;
QStringList ccGetActiveVobs() const;
ViewData ccGetView(const QString &workingDir) const;
QString ccGetComment(const QString &workingDir, const QString &fileName) const;
bool ccFileOp(const QString &workingDir, const QString &title, const QStringList &args,
const QString &fileName, const QString &file2 = QString());
FileStatus vcsStatus(const QString &file) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment