"Display 'moved here' and 'moved away' status in working copy status list

Ivan Zhakov <[email protected]>
Newsgroups gmane.comp.version-control.subversion.tortoisesvn.devel
Message-ID <CABw-3Yf4xh=LsWxh4KHqPOyN8VBFcnnVvC_J7UWAbjSZirms+A@mail.gmail.com>
Hi,

Subversion records moves as first-class operation in the working copy
since version 1.8 [1]. For example here is how 'svn status' looks for
working copy where file 'foo.txt' was renamed to 'bar.txt':
[[[
A  +    bar.txt
        > moved from foo.txt
D       foo.txt
        > moved to bar.txt
]]]

But TortoiseSVN only displays this information in a tooltip in the
status list. I suggest adding 'moved here' and 'moved away' to
TortoiseSVN. See the attached patch and screenshot.

[1] https://subversion.apache.org/docs/release-notes/1.8.html#moves


-- 
Ivan Zhakov

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=3187479

To unsubscribe from this discussion, e-mail: [[email protected]].
tsvn-moved-here-away-1.png (image/png, 43.1 KB) - not displayed
tsvn-moved-here-away-1.patch (text/x-patch, 2.1 KB)
Index: src/Resources/TortoiseProcENG.rc
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: src/SVN/SVNStatusListCtrl.cpp
===================================================================
--- src/SVN/SVNStatusListCtrl.cpp	(revision 27459)
+++ src/SVN/SVNStatusListCtrl.cpp	(working copy)
@@ -1669,6 +1669,8 @@
     static const CString treeconflict(MAKEINTRESOURCE(IDS_STATUSLIST_TREECONFLICT));
     static const CString sNested(MAKEINTRESOURCE(IDS_STATUSLIST_NESTED));
     static const CString sLockBroken(MAKEINTRESOURCE(IDS_STATUSLIST_LOCKBROKEN));
+    static const CString sMovedHere(MAKEINTRESOURCE(IDS_STATUSLIST_MOVEDHERE));
+    static const CString sMovedAway(MAKEINTRESOURCE(IDS_STATUSLIST_MOVEDAWAY));
     static const CString empty;
     static HINSTANCE hResourceHandle(AfxGetResourceHandle());
     static WORD langID = (WORD)CRegStdDWORD(L"Software\\TortoiseSVN\\LanguageID", GetUserDefaultLangID());
@@ -1694,9 +1696,21 @@
             if (entry->isNested)
                 return sNested;
 
-            SVNStatus::GetStatusString(hResourceHandle, entry->status, buf, _countof(buf), (WORD)langID);
-            if ((entry->copied)&&(wcslen(buf)>1))
-                wcscat_s(buf, L" (+)");
+            if (!entry->moved_from_abspath.IsEmpty())
+            {
+                wcscpy_s(buf, sMovedHere);
+            }
+            else if (!entry->moved_to_abspath.IsEmpty())
+            {
+                wcscpy_s(buf, sMovedAway);
+            }
+            else
+            {
+                SVNStatus::GetStatusString(hResourceHandle, entry->status, buf, _countof(buf), (WORD)langID);
+                if ((entry->copied) && (wcslen(buf)>1))
+                    wcscat_s(buf, L" (+)");
+            }
+
             if ((entry->switched)&&(wcslen(buf)>1))
                 wcscat_s(buf, L" (s)");
             if ((entry->status == entry->propstatus)&&
Index: src/TortoiseProc/resource.h
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.