If a selected directory for [Check for modification...] has property
changes, the name of the directory is shown in the list. This is
ambiguous when the directory contains a directory which has the same
name with its parent.
The attached patch will solve this ambiguousness. In the above case,
the parent will be shown as ".", and the child will be shown as its
name. This behavior also matches the command line client.
As before, I can't compile this by myself. Please tweak as needed.
Sorry.
If this is ok, please merge this into 1.4.x branch as a bug fix.
Too late for 1.4.1 release?
--
k_satoda
Index: src/SVN/SVNStatusListCtrl.cpp
===================================================================
--- src/SVN/SVNStatusListCtrl.cpp (revision 7989)
+++ src/SVN/SVNStatusListCtrl.cpp (working copy)
@@ -1120,9 +1120,7 @@
TCHAR buf[100];
int index = listIndex;
int nCol = 1;
- CString entryname = entry->path.GetDisplayString(&entry->basepath);
- if (entryname.IsEmpty())
- entryname = entry->path.GetFileOrDirectoryName();
+ CString entryname = entry->GetDisplayName();
int icon_idx = 0;
if (entry->isfolder)
icon_idx = m_nIconFolder;
@@ -3994,14 +3992,10 @@
POSITION pos = GetFirstSelectedItemPosition();
int index;
- CString entryname;
while ((index = GetNextSelectedItem(pos)) >= 0)
{
FileEntry * entry = GetListEntry(index);
- entryname = entry->path.GetDisplayString(&entry->basepath);
- if (entryname.IsEmpty())
- entryname = entry->path.GetFileOrDirectoryName();
- sClipboard += entryname;
+ sClipboard += entry->GetDisplayName();
if (dwCols & SVNSLC_COLEXT)
{
sClipboard += _T("\t")+entry->path.GetFileExtension();
Index: src/SVN/SVNStatusListCtrl.h
===================================================================
--- src/SVN/SVNStatusListCtrl.h (revision 7989)
+++ src/SVN/SVNStatusListCtrl.h (working copy)
@@ -206,6 +206,19 @@
{
return differentrepo;
}
+ CString GetDisplayName() const
+ {
+ CString const& chopped = path.GetDisplayString(&basepath);
+ if(!chopped.IsEmpty())
+ {
+ return chopped;
+ }
+ else
+ {
+ // "Display name" must not be empty.
+ return path.IsDirectory() ? CString(".") : path.GetFileOrDirectoryName();
+ }
+ }
public:
svn_wc_status_kind status; ///< local status
private:
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Nov 10 22:52:35 2006