38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
------------------------------------------------------------------------
|
|
r1397 | cmpilato | 2006-07-21 09:51:13 +0000 (Fri, 21 Jul 2006) | 9 lines
|
|
Changed paths:
|
|
M /branches/1.0.x/lib/vclib/svn/__init__.py
|
|
|
|
Backport to the 1.0.x branch r1396, whose log message readly thusly:
|
|
|
|
Fix issue #18 (Annotate not working in windows for subversion).
|
|
Thanks to Hern?\195?\161n Mart?\195?\173nez Foffani <hernan.martinez@ecc.es> for testing
|
|
this patch on Windows.
|
|
|
|
* lib/vclib/svn/__init__.py
|
|
(BlameSource.__init__): Patch up the URLs passed to 'svn blame' on
|
|
systems that don't use forward-slashes for path separators.
|
|
---
|
|
lib/vclib/svn/__init__.py | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
Index: lib/vclib/svn/__init__.py
|
|
===================================================================
|
|
--- lib/vclib/svn/__init__.py.orig
|
|
+++ lib/vclib/svn/__init__.py
|
|
@@ -483,7 +483,14 @@ class BlameSource:
|
|
self.last = None
|
|
self.first_rev = first_rev
|
|
|
|
+ # Do a little dance to get a URL that works in both Unix-y and
|
|
+ # Windows worlds.
|
|
rootpath = os.path.abspath(rootpath)
|
|
+ if rootpath and rootpath[0] != '/':
|
|
+ rootpath = '/' + rootpath
|
|
+ if os.sep != '/':
|
|
+ rootpath = string.replace(rootpath, os.sep, '/')
|
|
+
|
|
url = 'file://' + string.join([rootpath, fs_path], "/")
|
|
fp = popen.popen(svn_client_path,
|
|
('blame', "-r%d" % int(rev), "%s@%d" % (url, int(rev))),
|