• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision13459 (tree)
Zeit2008-07-11 02:06:16
Autorstefankueng

Log Message

Merge r13457-13458 from trunk:
* Fix parsing the blame text file for situations where the merge path had spaces in it.
* Escape spaces in merge paths longer than 60 chars to avoid problems with TortoiseBlame.

Ändern Zusammenfassung

Diff

--- branches/1.5.x/src/Changelog.txt (revision 13458)
+++ branches/1.5.x/src/Changelog.txt (revision 13459)
@@ -43,6 +43,7 @@
4343 - BUG: Crash when moving folders in the repository browser. (Stefan)
4444 - BUG: Moving files to the "ignore-on-commit" changelist would leave them
4545 checked for commit. (Stefan)
46+- BUG: TortoiseBlame didn't work if the merge paths had spaces. (Stefan)
4647
4748 Version 1.5.0
4849 - CHG: Support for IPv6 disabled due to problems with merging and terrible
--- branches/1.5.x/src/TortoiseBlame/TortoiseBlame.cpp (revision 13458)
+++ branches/1.5.x/src/TortoiseBlame/TortoiseBlame.cpp (revision 13459)
@@ -240,7 +240,17 @@
240240 // unfortunately, the 'path' entry can be longer than the 60 chars
241241 // we made the column. We therefore have to step through the path
242242 // string until we find a space
243- trimptr = _tcschr(lineptr, ' ');
243+ trimptr = lineptr;
244+ do
245+ {
246+ // TODO: how can we deal with the situation where the path has
247+ // a space in it, but the space is after the 60 chars reserved
248+ // for it?
249+ // The only way to deal with that would be to use a custom
250+ // binary format for the blame file.
251+ trimptr++;
252+ trimptr = _tcschr(trimptr, ' ');
253+ } while ((trimptr)&&(trimptr+1 < lineptr+61));
244254 if (trimptr)
245255 *trimptr = 0;
246256 else
--- branches/1.5.x/src/TortoiseProc/Blame.cpp (revision 13458)
+++ branches/1.5.x/src/TortoiseProc/Blame.cpp (revision 13459)
@@ -64,6 +64,15 @@
6464 m_bHasMerges = true;
6565 }
6666
67+ if (pathA.Find(' ') >= 60)
68+ {
69+ // the merge path has spaces in it:
70+ // TortoiseBlame can't deal with such paths if the space is after
71+ // the 60 char which is reserved for the path length in the blame file
72+ // To avoid these problems, we escape the space
73+ // (not the best solution, but it works)
74+ pathA.Replace(" ", "%20");
75+ }
6776 if (authorA.GetLength() > 30 )
6877 authorA = authorA.Left(30);
6978 if (m_bNoLineNo)
--- branches/1.5.x/test/blame/test.ascii.txt (revision 13458)
+++ branches/1.5.x/test/blame/test.ascii.txt (revision 13459)
@@ -1,18 +1,18 @@
11 line rev date path author content
22
3- 0 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking Das Lied von der Glocke
3+ 0 474 07.12.2003 10:05:41 /trunk/src/TortoistestingeMerge/Test iles/Schiller'sGlocke_base.txt steveking Das Lied von der Glocke
44 1 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking (Friedrich Schiller)
5- 2 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking
6- 3 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking Festgemauert in der Erden
5+ 2 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Test iles/Schiller'sGlocke_base.txt steveking
6+ 3 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Test iles/Schiller'sGlocke_base.txt steveking Festgemauert in der Erden
77 4 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking Steht die Form, aus Lehm gebrannt.
88 5 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking Heute muß die Glocke werden,
99 6 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking Frisch, Gesellen, seid zur Hand.
1010 7 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking Von der Stirne heiß
11- 8 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking Rinnen muß der Schweiß,
11+ 8 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Test iles/Schiller'sGlocke_base.txt steveking Rinnen muß der Schweiß,
1212 9 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking Soll das Werk den Meister loben,
1313 10 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking Doch der Segen kommt von oben.
1414 11 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking
15- 12 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking Zum Werke, das wir ernst bereiten,
15+ 12 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Test iles/Schiller'sGlocke_base.txt steveking Zum Werke, das wir ernst bereiten,
1616 13 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking Geziemt sich wohl ein ernstes Wort;
1717 14 474 07.12.2003 10:05:41 /trunk/src/TortoiseMerge/Testfiles/Schiller'sGlocke_base.txt steveking Wenn gute Reden sie begleiten,
1818 15 6709 04.06.2006 10:26:32 /trunk/test/mergediff/Schiller'sGlocke_base.txt steveking Dann fort.
Show on old repository browser