[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Some problems with "Revert changes from this revision"

From: Kazutoshi Satoda <k_satoda_at_f2.dion.ne.jp>
Date: 2006-10-27 01:06:30 CEST

Stefan Küng wrote:
> Kazutoshi Satoda wrote:
>> Deleted files are treated as special case since r4106. It had helped us
>> (at least me) much. Please reenable this pretty sensible function.
>
> You're good!
> Fixed in revision 7852.

Thank you again. I verified this with nightly r7854.

But I think it's better if the existance of wcPath is checked before
the confirmation. Generaly, It's a bit annoying if a program show an
error right after confirmation without trying the actual operation.

How about the attached patch? (As before, I can't compile this by
myself. Please tweak as needed. Sorry.)

--
k_satoda

Index: src/TortoiseProc/LogDlg.cpp
===================================================================
--- src/TortoiseProc/LogDlg.cpp (revision 7865)
+++ src/TortoiseProc/LogDlg.cpp (working copy)
@@ -1619,36 +1619,34 @@
                                                 CString wcPath = m_path.GetWinPathString().Left(leftcount);
                                                 wcPath += fileURL.Mid(i);
                                                 wcPath.Replace('/', '\\');
+ CSVNProgressDlg dlg;
+ CString sAction;
+ sAction.LoadString(IDS_SVNACTION_DELETE);
+ if (changedlogpath->sAction.Compare(sAction)==0)
+ {
+ // a deleted path! Since the path isn't there anymore, merge
+ // won't work. So just do a copy url->wc
+ dlg.SetParams(CSVNProgressDlg::Copy, 0, CTSVNPathList(CTSVNPath(fileURL)), wcPath, _T(""), rev2);
+ }
+ else
+ {
+ if (!PathFileExists(wcPath))
+ {
+ // seems the path got renamed
+ // tell the user how to work around this.
+ CMessageBox::Show(this->m_hWnd, IDS_LOG_REVERTREV_ERROR, IDS_APPNAME, MB_ICONERROR);
+ EnableOKButton();
+ theApp.DoWaitCursor(-1);
+ break; //exit
+ }
+ dlg.SetParams(CSVNProgressDlg::Enum_Merge, 0, CTSVNPathList(CTSVNPath(wcPath)), fileURL, fileURL, rev1); //use the message as the second url
+ dlg.m_RevisionEnd = rev2;
+ }
                                                 CString msg;
                                                 msg.Format(IDS_LOG_REVERT_CONFIRM, wcPath);
                                                 if (CMessageBox::Show(this->m_hWnd, msg, _T("TortoiseSVN"), MB_YESNO | MB_ICONQUESTION) == IDYES)
                                                 {
- CString sAction;
- sAction.LoadString(IDS_SVNACTION_DELETE);
- if (changedlogpath->sAction.Compare(sAction)==0)
- {
- // a deleted path! Since the path isn't there anymore, merge
- // won't work. So just do a copy url->wc
- CSVNProgressDlg dlg;
- dlg.SetParams(CSVNProgressDlg::Copy, 0, CTSVNPathList(CTSVNPath(fileURL)), wcPath, _T(""), rev2);
- dlg.DoModal();
- }
- else
- {
- if (!PathFileExists(wcPath))
- {
- // seems the path got renamed
- // tell the user how to work around this.
- CMessageBox::Show(this->m_hWnd, IDS_LOG_REVERTREV_ERROR, IDS_APPNAME, MB_ICONERROR);
- EnableOKButton();
- theApp.DoWaitCursor(-1);
- break; //exit
- }
- CSVNProgressDlg dlg;
- dlg.SetParams(CSVNProgressDlg::Enum_Merge, 0, CTSVNPathList(CTSVNPath(wcPath)), fileURL, fileURL, rev1); //use the message as the second url
- dlg.m_RevisionEnd = rev2;
- dlg.DoModal();
- }
+ dlg.DoModal();
                                                 }
                                                 theApp.DoWaitCursor(-1);
                                         }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Oct 27 01:06:41 2006

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.