Better debugging

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35311 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2010-09-07 11:29:11 +00:00
parent 8ae629fd68
commit 8f457065c5
2 changed files with 7 additions and 3 deletions

View File

@ -312,7 +312,7 @@ bool RCS::prepareFileRevision(string const &revis, string & f)
} }
} }
FileName tmpf = FileName::tempName("lyxvcrev"); FileName tmpf = FileName::tempName("lyxvcrev_" + rev + "_");
if (tmpf.empty()) { if (tmpf.empty()) {
LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf); LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf);
return N_("Error: Could not generate logfile."); return N_("Error: Could not generate logfile.");
@ -1058,13 +1058,14 @@ bool SVN::prepareFileRevision(string const & revis, string & f)
return false; return false;
} }
FileName tmpf = FileName::tempName("lyxvcrev"); string revname = convert<string>(rev);
FileName tmpf = FileName::tempName("lyxvcrev_" + revname + "_");
if (tmpf.empty()) { if (tmpf.empty()) {
LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf); LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf);
return N_("Error: Could not generate logfile."); return N_("Error: Could not generate logfile.");
} }
doVCCommand("svn cat -r " + convert<string>(rev) + " " doVCCommand("svn cat -r " + revname + " "
+ quoteName(onlyFileName(owner_->absFileName())) + quoteName(onlyFileName(owner_->absFileName()))
+ " > " + quoteName(tmpf.toFilesystemEncoding()), + " > " + quoteName(tmpf.toFilesystemEncoding()),
FileName(owner_->filePath())); FileName(owner_->filePath()));

View File

@ -2686,6 +2686,9 @@ void GuiView::dispatchVC(FuncRequest const & cmd)
if (!buffer->lyxvc().prepareFileRevision(rev2, f2)) if (!buffer->lyxvc().prepareFileRevision(rev2, f2))
break; break;
} }
LYXERR(Debug::LYXVC, "Launching comparison for fetched revisions: " <<
f1 << "\n" << f2 << "\n" );
string par = "compare run " + f1 + " " + f2; string par = "compare run " + f1 + " " + f2;
lyx::dispatch(FuncRequest(LFUN_DIALOG_SHOW, par)); lyx::dispatch(FuncRequest(LFUN_DIALOG_SHOW, par));
break; break;