Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
8f03874b
Commit
8f03874b
authored
Feb 10, 2009
by
Friedemann Kleint
Browse files
Fixes: Add log message to SVN description
parent
53fde645
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/subversion/subversionplugin.cpp
View file @
8f03874b
...
...
@@ -864,7 +864,20 @@ void SubversionPlugin::describe(const QString &source, const QString &changeNr)
const
int
number
=
changeNr
.
toInt
(
&
ok
);
if
(
!
ok
||
number
<
2
)
return
;
QStringList
args
(
QLatin1String
(
"diff"
));
// Run log to obtain message (local utf8)
QString
description
;
QStringList
args
(
QLatin1String
(
"log"
));
args
.
push_back
(
QLatin1String
(
"-r"
));
args
.
push_back
(
changeNr
);
args
.
push_back
(
topLevel
);
const
SubversionResponse
logResponse
=
runSvn
(
args
,
subversionShortTimeOut
,
false
);
if
(
logResponse
.
error
)
return
;
description
=
logResponse
.
stdOut
;
// Run diff (encoding via source codec)
args
.
clear
();
args
.
push_back
(
QLatin1String
(
"diff"
));
args
.
push_back
(
QLatin1String
(
"-r"
));
QString
diffArg
;
QTextStream
(
&
diffArg
)
<<
(
number
-
1
)
<<
':'
<<
number
;
...
...
@@ -875,16 +888,17 @@ void SubversionPlugin::describe(const QString &source, const QString &changeNr)
const
SubversionResponse
response
=
runSvn
(
args
,
subversionShortTimeOut
,
false
,
codec
);
if
(
response
.
error
)
return
;
description
+=
response
.
stdOut
;
// Re-use an existing view if possible to support
// the common usage pattern of continuously changing and diffing a file
const
QString
id
=
diffArg
+
source
;
const
QString
id
=
diffArg
+
source
;
if
(
Core
::
IEditor
*
editor
=
locateEditor
(
"describeChange"
,
id
))
{
editor
->
createNew
(
r
es
ponse
.
stdOut
);
editor
->
createNew
(
d
es
cription
);
Core
::
EditorManager
::
instance
()
->
setCurrentEditor
(
editor
);
}
else
{
const
QString
title
=
tr
(
"svn describe %1#%2"
).
arg
(
QFileInfo
(
source
).
fileName
(),
changeNr
);
Core
::
IEditor
*
newEditor
=
showOutputInEditor
(
title
,
r
es
ponse
.
stdOut
,
VCSBase
::
DiffOutput
,
source
,
codec
);
Core
::
IEditor
*
newEditor
=
showOutputInEditor
(
title
,
d
es
cription
,
VCSBase
::
DiffOutput
,
source
,
codec
);
newEditor
->
setProperty
(
"describeChange"
,
id
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment