# # # patch "src/monotone/MonotoneUtil.cpp" # from [2e09b05ab3d7c299d0b39655254326030cd6511f] # to [337414f278e2f74e22c73a134de0e40d475a7af9] # ============================================================ --- src/monotone/MonotoneUtil.cpp 2e09b05ab3d7c299d0b39655254326030cd6511f +++ src/monotone/MonotoneUtil.cpp 337414f278e2f74e22c73a134de0e40d475a7af9 @@ -351,8 +351,10 @@ QString MonotoneUtil::getFileId(const Da return data; } -// strip mtn: warning: and alike from error strings coming from mtn -// and unwrap them, if this fails we add the original string unwrapped +/*! + Strips mtn: warning: and alike from error strings coming from mtn + and unwraps them, if this fails we add the original string unwrapped +*/ QString MonotoneUtil::stripMtnPrefix(const QString & input) { QString output; @@ -361,7 +363,8 @@ QString MonotoneUtil::stripMtnPrefix(con // FIXME: we should actually use basename(mtnBinaryPath) in case // the binary is renamed, but I'm too lazy for this right now... // and this would also require to make this method non-static - QRegExp rx = QRegExp("^(?:mtn\\:[ ]+)?[^:]+\\:[ ]*(.+)"); + QRegExp rx = QRegExp("^(?:mtn\\:[ ])?\\w+\\:[ ]+(.+)"); + rx.setPatternSyntax(QRegExp::RegExp2); for (int i=0, j=list.size(); i