That works perfectly!!!

It also runs fast.
For other people using TortoiseSVN together with XYplorer (both are great products), the scripts above can help you.
What you have to do:
1. Add a custom button on the toolbar;
2. Assign the first script to the button;
3. Define a custom column in settings:
Infomation | Custom Columns;
4. Define the newly added custom column with the second script.
Now add the custom column to the tab, navigate to your working copy, and press the custom button, you'll see the SVN status appears in the custom column! You'll then be able to sort files according to SVN status, and quickly locate those modified.
Update: I make a few modifications to the original scripts for improvement (maybe
), as follows:
For the custom toolbar button:
Code: Select all
perm $P_SVN_Result;
run "cmd /c svn status -v ""<curpath>"" > ""<xydata>\temp\output.txt""", ,2,0;
$P_SVN_Result = readfile("<xydata>\temp\output.txt");
if !$P_SVN_Result { status "No svn repository path, aborted!", "8B4513", "stop"; end true; }
//remove null chars at the beginning of each line
$P_SVN_Result = regexreplace($P_SVN_Result, "^\x00+", "");
//replace the first space in each line with "N"
$P_SVN_Result = regexreplace($P_SVN_Result, "^ ", "N");
//remove all lines starting with "?"
$P_SVN_Result = regexreplace($P_SVN_Result, "^\?.*<crlf>", "");
#485; // View - Refresh List
For the custom column:
Code: Select all
if (!$P_SVN_Result) { return ""; }
$tk_index = gettokenindex("*<cc_path><cc_name>", $P_SVN_Result, <crlf>, "w");
$matched_line = gettoken($P_SVN_Result,$tk_index ,<crlf>);
if (!$matched_line) { return ""; }
$field = gettoken($matched_line);
switch ($field) {
case "M": $field = "modified"; break;
case "?": $field = ""; break;
case "A": $field = "added"; break;
case "C": $field = "conflict"; break;
case "D": $field = "deleted"; break;
case "N": $field = "normal"; break;
default: $field = "error";
}
return $field;
Update: the third line of the first scipt should be updated
[code] $users = "%username%|hybrid2016";
perm $P_SVN_Result;
$P_SVN_Result = runret("""svn"" status -v ""<curpath>""", "%TEMP%");
if (regexmatches($P_SVN_Result, "w155007")) { status "No svn repository path, aborted!", "8B4513", "stop"; end true; }
$P_SVN_Result = regexreplace($P_SVN_Result, "^([acdm? ])\s+([0-9]+)?\s+([0-9?]+)?\s+($users)?\s+(.+)$", "$1|$3|$4|$5");
#485; // View - Refresh List
writepv;[/code]
Note the "-u" parameter above, it forces retrieving SVN information from the repository, rather than from the local cache. Thus, every time you modify a file, click the button, the SVN status will be updated from "normal" to "modified". (My fault
)
Comment(s):
1. You have to manully click the button to update the SVN text status for each item in the list.
2. "svn status -u -v" sometimes fail to return anything in my environment, so I fall back to "svn status -v" and it works fine.
The scipts are only applicable to files, not folders. In other words, it won't show SVN status for folders.
However, it suffices daily use since the files are what we are really going to edit and the number of them is larger than folders.
Thanks again for highend's great scripts!
Cheers