Merge lp:~luoyonggang/subvertpy/python2 into lp:~jelmer/subvertpy/trunk

Proposed by Yonggang Luo
Status: Needs review
Proposed branch: lp:~luoyonggang/subvertpy/python2
Merge into: lp:~jelmer/subvertpy/trunk
Diff against target: 136 lines (+45/-32)
3 files modified
subvertpy/client.c (+0/-7)
subvertpy/tests/test_client.py (+3/-3)
subvertpy/util.c (+42/-22)
To merge this branch: bzr merge lp:~luoyonggang/subvertpy/python2
Reviewer Review Type Date Requested Status
Jelmer Vernooij Pending
Review via email: mp+99889@code.launchpad.net

This proposal supersedes a proposal from 2012-03-28.

Description of the change

1.Deprecating os.tempfile, and under win7, os.tempfile can not works without Admin permission. So use the new tempfile.TemporaryFile function.
2.Becuase apr_os_file_put didn't works under win32, so use apr_file_open instead
apr_os_file_put under win32.
now test_diff are passed under win32.
With these patches, the test result turn out to be:

D:\CI\bld\vcs\subvertpy-python2>python setup.py test
running test
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\subvertpy
copying subvertpy\delta.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\marshall.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\properties.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\ra.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\ra_svn.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\server.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\__init__.py -> build\lib.win32-2.7\subvertpy
creating build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_client.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_core.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_delta.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_marshall.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_properties.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_ra.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_repos.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_server.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_wc.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\__init__.py -> build\lib.win32-2.7\subvertpy\tests
running build_ext
building 'subvertpy.client' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\subvertpy
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\client.c /Fobuild\temp.win32-2.7\Release\subvertpy\client.obj
client.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\editor.c /Fobuild\temp.win32-2.7\Release\subvertpy\editor.obj
editor.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\util.c /Fobuild\temp.win32-2.7\Release\subvertpy\util.obj
util.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\_ra.c /Fobuild\temp.win32-2.7\Release\subvertpy\_ra.obj
_ra.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\wc.c /Fobuild\temp.win32-2.7\Release\subvertpy\wc.obj
wc.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib /LIBPATH:D
:\CI\bld\vcs\svn-win32-1.6.17\lib\apr /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-iconv /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-util /LIBP
ATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\neon /LIBPATH:D:\CI\bld\vcs\db4-win32-4.4.20\lib /LIBPATH:D:\CI\bld\vcs\svn-win32-libintl\lib /LIBPATH:C:\Pytho
n27\libs /LIBPATH:C:\Python27\PCbuild libapr-1.lib libapriconv-1.lib libaprutil-1.lib libneon.lib libsvn_subr-1.lib libsvn_client-1.lib libsvn_ra-1.li
b libsvn_ra_local-1.lib libsvn_ra_svn-1.lib libsvn_repos-1.lib libsvn_wc-1.lib libsvn_delta-1.lib libsvn_diff-1.lib libsvn_fs-1.lib libsvn_repos-1.lib
 libsvn_fs_fs-1.lib libsvn_fs_base-1.lib intl3_svn.lib xml.lib advapi32.lib shell32.lib ws2_32.lib zlibstat.lib libdb44.lib /EXPORT:initclient build\t
emp.win32-2.7\Release\subvertpy\client.obj build\temp.win32-2.7\Release\subvertpy\editor.obj build\temp.win32-2.7\Release\subvertpy\util.obj build\tem
p.win32-2.7\Release\subvertpy\_ra.obj build\temp.win32-2.7\Release\subvertpy\wc.obj /OUT:build\lib.win32-2.7\subvertpy\client.pyd /IMPLIB:build\temp.w
in32-2.7\Release\subvertpy\client.lib /MANIFESTFILE:build\temp.win32-2.7\Release\subvertpy\client.pyd.manifest
   Creating library build\temp.win32-2.7\Release\subvertpy\client.lib and object build\temp.win32-2.7\Release\subvertpy\client.exp
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest build\temp.win32-2.7\Release\subvertpy\client.pyd.manifest -outputresource:
build\lib.win32-2.7\subvertpy\client.pyd;2
building 'subvertpy._ra' extension
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\_ra.c /Fobuild\temp.win32-2.7\Release\subvertpy\_ra.obj
_ra.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\util.c /Fobuild\temp.win32-2.7\Release\subvertpy\util.obj
util.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\editor.c /Fobuild\temp.win32-2.7\Release\subvertpy\editor.obj
editor.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib /LIBPATH:D
:\CI\bld\vcs\svn-win32-1.6.17\lib\apr /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-iconv /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-util /LIBP
ATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\neon /LIBPATH:D:\CI\bld\vcs\db4-win32-4.4.20\lib /LIBPATH:D:\CI\bld\vcs\svn-win32-libintl\lib /LIBPATH:C:\Pytho
n27\libs /LIBPATH:C:\Python27\PCbuild libapr-1.lib libapriconv-1.lib libaprutil-1.lib libneon.lib libsvn_subr-1.lib libsvn_client-1.lib libsvn_ra-1.li
b libsvn_ra_local-1.lib libsvn_ra_svn-1.lib libsvn_repos-1.lib libsvn_wc-1.lib libsvn_delta-1.lib libsvn_diff-1.lib libsvn_fs-1.lib libsvn_repos-1.lib
 libsvn_fs_fs-1.lib libsvn_fs_base-1.lib intl3_svn.lib xml.lib advapi32.lib shell32.lib ws2_32.lib zlibstat.lib libdb44.lib /EXPORT:init_ra build\temp
.win32-2.7\Release\subvertpy\_ra.obj build\temp.win32-2.7\Release\subvertpy\util.obj build\temp.win32-2.7\Release\subvertpy\editor.obj /OUT:build\lib.
win32-2.7\subvertpy\_ra.pyd /IMPLIB:build\temp.win32-2.7\Release\subvertpy\_ra.lib /MANIFESTFILE:build\temp.win32-2.7\Release\subvertpy\_ra.pyd.manife
st
   Creating library build\temp.win32-2.7\Release\subvertpy\_ra.lib and object build\temp.win32-2.7\Release\subvertpy\_ra.exp
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest build\temp.win32-2.7\Release\subvertpy\_ra.pyd.manifest -outputresource:bui
ld\lib.win32-2.7\subvertpy\_ra.pyd;2
building 'subvertpy.repos' extension
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\repos.c /Fobuild\temp.win32-2.7\Release\subvertpy\repos.obj
repos.c
subvertpy\repos.c(762) : warning C4244: 'function' : conversion from 'svn_filesize_t' to 'long', possible loss of data
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\util.c /Fobuild\temp.win32-2.7\Release\subvertpy\util.obj
util.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib /LIBPATH:D
:\CI\bld\vcs\svn-win32-1.6.17\lib\apr /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-iconv /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-util /LIBP
ATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\neon /LIBPATH:D:\CI\bld\vcs\db4-win32-4.4.20\lib /LIBPATH:D:\CI\bld\vcs\svn-win32-libintl\lib /LIBPATH:C:\Pytho
n27\libs /LIBPATH:C:\Python27\PCbuild libapr-1.lib libapriconv-1.lib libaprutil-1.lib libneon.lib libsvn_subr-1.lib libsvn_client-1.lib libsvn_ra-1.li
b libsvn_ra_local-1.lib libsvn_ra_svn-1.lib libsvn_repos-1.lib libsvn_wc-1.lib libsvn_delta-1.lib libsvn_diff-1.lib libsvn_fs-1.lib libsvn_repos-1.lib
 libsvn_fs_fs-1.lib libsvn_fs_base-1.lib intl3_svn.lib xml.lib advapi32.lib shell32.lib ws2_32.lib zlibstat.lib libdb44.lib /EXPORT:initrepos build\te
mp.win32-2.7\Release\subvertpy\repos.obj build\temp.win32-2.7\Release\subvertpy\util.obj /OUT:build\lib.win32-2.7\subvertpy\repos.pyd /IMPLIB:build\te
mp.win32-2.7\Release\subvertpy\repos.lib /MANIFESTFILE:build\temp.win32-2.7\Release\subvertpy\repos.pyd.manifest
   Creating library build\temp.win32-2.7\Release\subvertpy\repos.lib and object build\temp.win32-2.7\Release\subvertpy\repos.exp
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest build\temp.win32-2.7\Release\subvertpy\repos.pyd.manifest -outputresource:b
uild\lib.win32-2.7\subvertpy\repos.pyd;2
building 'subvertpy.wc' extension
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\wc.c /Fobuild\temp.win32-2.7\Release\subvertpy\wc.obj
wc.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\util.c /Fobuild\temp.win32-2.7\Release\subvertpy\util.obj
util.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\editor.c /Fobuild\temp.win32-2.7\Release\subvertpy\editor.obj
editor.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib /LIBPATH:D
:\CI\bld\vcs\svn-win32-1.6.17\lib\apr /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-iconv /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-util /LIBP
ATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\neon /LIBPATH:D:\CI\bld\vcs\db4-win32-4.4.20\lib /LIBPATH:D:\CI\bld\vcs\svn-win32-libintl\lib /LIBPATH:C:\Pytho
n27\libs /LIBPATH:C:\Python27\PCbuild libapr-1.lib libapriconv-1.lib libaprutil-1.lib libneon.lib libsvn_subr-1.lib libsvn_client-1.lib libsvn_ra-1.li
b libsvn_ra_local-1.lib libsvn_ra_svn-1.lib libsvn_repos-1.lib libsvn_wc-1.lib libsvn_delta-1.lib libsvn_diff-1.lib libsvn_fs-1.lib libsvn_repos-1.lib
 libsvn_fs_fs-1.lib libsvn_fs_base-1.lib intl3_svn.lib xml.lib advapi32.lib shell32.lib ws2_32.lib zlibstat.lib libdb44.lib /EXPORT:initwc build\temp.
win32-2.7\Release\subvertpy\wc.obj build\temp.win32-2.7\Release\subvertpy\util.obj build\temp.win32-2.7\Release\subvertpy\editor.obj /OUT:build\lib.wi
n32-2.7\subvertpy\wc.pyd /IMPLIB:build\temp.win32-2.7\Release\subvertpy\wc.lib /MANIFESTFILE:build\temp.win32-2.7\Release\subvertpy\wc.pyd.manifest
   Creating library build\temp.win32-2.7\Release\subvertpy\wc.lib and object build\temp.win32-2.7\Release\subvertpy\wc.exp
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest build\temp.win32-2.7\Release\subvertpy\wc.pyd.manifest -outputresource:buil
d\lib.win32-2.7\subvertpy\wc.pyd;2
running build_scripts
creating build\scripts-2.7
copying and adjusting bin\subvertpy-fast-export -> build\scripts-2.7
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libapr-1.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libapriconv-1.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libaprutil-1.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libsvn_client-1.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libsvn_delta-1.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libsvn_diff-1.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libsvn_fs-1.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libsvn_ra-1.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libsvn_repos-1.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libsvn_subr-1.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libsvn_wc-1.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libsasl.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libdb44.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\intl3_svn.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\libeay32.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
copying D:\CI\bld\vcs\svn-win32-1.6.17\bin\ssleay32.dll -> D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy
Running unittest without install.
.E.....................................................................s............................................................................F.
.E....................
======================================================================
ERROR: test_add_recursive (subvertpy.tests.test_client.TestClient)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy\tests\test_client.py", line 100, in test_add_recursive
    e = adm.entry(os.path.join(os.getcwd(), "dc", "trunk"))
KeyError: "No such entry 'c:\\users\\dreamkxd\\appdata\\local\\temp\\tmpwwrwhr\\dc\\trunk'"

======================================================================
ERROR: test_probe_try (subvertpy.tests.test_wc.AdmTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy\tests\test_wc.py", line 300, in test_probe_try
    self.assertEquals("checkout", adm.probe_try(os.path.join("checkout", "bar")).access_path())
AttributeError: 'NoneType' object has no attribute 'access_path'

======================================================================
FAIL: test_is_wc_root (subvertpy.tests.test_wc.AdmTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy\tests\test_wc.py", line 226, in test_is_wc_root
    self.assertFalse(adm.is_wc_root(os.path.join(self.test_dir, "bar")))
AssertionError: True is not false

----------------------------------------------------------------------
Ran 172 tests in 60.135s

FAILED (failures=1, errors=2, skipped=1)

D:\CI\bld\vcs\subvertpy-python2>

Test result without this patch:

D:\CI\bld\vcs\subvertpy-python2>python setup.py test
running test
running build
running build_py
copying subvertpy\delta.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\marshall.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\properties.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\ra.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\ra_svn.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\server.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\__init__.py -> build\lib.win32-2.7\subvertpy
copying subvertpy\tests\test_client.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_core.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_delta.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_marshall.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_properties.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_ra.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_repos.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_server.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\test_wc.py -> build\lib.win32-2.7\subvertpy\tests
copying subvertpy\tests\__init__.py -> build\lib.win32-2.7\subvertpy\tests
running build_ext
building 'subvertpy.client' extension
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\client.c /Fobuild\temp.win32-2.7\Release\subvertpy\client.obj
client.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\editor.c /Fobuild\temp.win32-2.7\Release\subvertpy\editor.obj
editor.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\util.c /Fobuild\temp.win32-2.7\Release\subvertpy\util.obj
util.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\_ra.c /Fobuild\temp.win32-2.7\Release\subvertpy\_ra.obj
_ra.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\wc.c /Fobuild\temp.win32-2.7\Release\subvertpy\wc.obj
wc.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib /LIBPATH:D
:\CI\bld\vcs\svn-win32-1.6.17\lib\apr /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-iconv /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-util /LIBP
ATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\neon /LIBPATH:D:\CI\bld\vcs\db4-win32-4.4.20\lib /LIBPATH:D:\CI\bld\vcs\svn-win32-libintl\lib /LIBPATH:C:\Pytho
n27\libs /LIBPATH:C:\Python27\PCbuild libapr-1.lib libapriconv-1.lib libaprutil-1.lib libneon.lib libsvn_subr-1.lib libsvn_client-1.lib libsvn_ra-1.li
b libsvn_ra_local-1.lib libsvn_ra_svn-1.lib libsvn_repos-1.lib libsvn_wc-1.lib libsvn_delta-1.lib libsvn_diff-1.lib libsvn_fs-1.lib libsvn_repos-1.lib
 libsvn_fs_fs-1.lib libsvn_fs_base-1.lib intl3_svn.lib xml.lib advapi32.lib shell32.lib ws2_32.lib zlibstat.lib libdb44.lib /EXPORT:initclient build\t
emp.win32-2.7\Release\subvertpy\client.obj build\temp.win32-2.7\Release\subvertpy\editor.obj build\temp.win32-2.7\Release\subvertpy\util.obj build\tem
p.win32-2.7\Release\subvertpy\_ra.obj build\temp.win32-2.7\Release\subvertpy\wc.obj /OUT:build\lib.win32-2.7\subvertpy\client.pyd /IMPLIB:build\temp.w
in32-2.7\Release\subvertpy\client.lib /MANIFESTFILE:build\temp.win32-2.7\Release\subvertpy\client.pyd.manifest
   Creating library build\temp.win32-2.7\Release\subvertpy\client.lib and object build\temp.win32-2.7\Release\subvertpy\client.exp
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest build\temp.win32-2.7\Release\subvertpy\client.pyd.manifest -outputresource:
build\lib.win32-2.7\subvertpy\client.pyd;2
building 'subvertpy._ra' extension
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\_ra.c /Fobuild\temp.win32-2.7\Release\subvertpy\_ra.obj
_ra.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\util.c /Fobuild\temp.win32-2.7\Release\subvertpy\util.obj
util.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\editor.c /Fobuild\temp.win32-2.7\Release\subvertpy\editor.obj
editor.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib /LIBPATH:D
:\CI\bld\vcs\svn-win32-1.6.17\lib\apr /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-iconv /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-util /LIBP
ATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\neon /LIBPATH:D:\CI\bld\vcs\db4-win32-4.4.20\lib /LIBPATH:D:\CI\bld\vcs\svn-win32-libintl\lib /LIBPATH:C:\Pytho
n27\libs /LIBPATH:C:\Python27\PCbuild libapr-1.lib libapriconv-1.lib libaprutil-1.lib libneon.lib libsvn_subr-1.lib libsvn_client-1.lib libsvn_ra-1.li
b libsvn_ra_local-1.lib libsvn_ra_svn-1.lib libsvn_repos-1.lib libsvn_wc-1.lib libsvn_delta-1.lib libsvn_diff-1.lib libsvn_fs-1.lib libsvn_repos-1.lib
 libsvn_fs_fs-1.lib libsvn_fs_base-1.lib intl3_svn.lib xml.lib advapi32.lib shell32.lib ws2_32.lib zlibstat.lib libdb44.lib /EXPORT:init_ra build\temp
.win32-2.7\Release\subvertpy\_ra.obj build\temp.win32-2.7\Release\subvertpy\util.obj build\temp.win32-2.7\Release\subvertpy\editor.obj /OUT:build\lib.
win32-2.7\subvertpy\_ra.pyd /IMPLIB:build\temp.win32-2.7\Release\subvertpy\_ra.lib /MANIFESTFILE:build\temp.win32-2.7\Release\subvertpy\_ra.pyd.manife
st
   Creating library build\temp.win32-2.7\Release\subvertpy\_ra.lib and object build\temp.win32-2.7\Release\subvertpy\_ra.exp
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest build\temp.win32-2.7\Release\subvertpy\_ra.pyd.manifest -outputresource:bui
ld\lib.win32-2.7\subvertpy\_ra.pyd;2
building 'subvertpy.repos' extension
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\repos.c /Fobuild\temp.win32-2.7\Release\subvertpy\repos.obj
repos.c
subvertpy\repos.c(762) : warning C4244: 'function' : conversion from 'svn_filesize_t' to 'long', possible loss of data
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\util.c /Fobuild\temp.win32-2.7\Release\subvertpy\util.obj
util.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib /LIBPATH:D
:\CI\bld\vcs\svn-win32-1.6.17\lib\apr /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-iconv /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-util /LIBP
ATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\neon /LIBPATH:D:\CI\bld\vcs\db4-win32-4.4.20\lib /LIBPATH:D:\CI\bld\vcs\svn-win32-libintl\lib /LIBPATH:C:\Pytho
n27\libs /LIBPATH:C:\Python27\PCbuild libapr-1.lib libapriconv-1.lib libaprutil-1.lib libneon.lib libsvn_subr-1.lib libsvn_client-1.lib libsvn_ra-1.li
b libsvn_ra_local-1.lib libsvn_ra_svn-1.lib libsvn_repos-1.lib libsvn_wc-1.lib libsvn_delta-1.lib libsvn_diff-1.lib libsvn_fs-1.lib libsvn_repos-1.lib
 libsvn_fs_fs-1.lib libsvn_fs_base-1.lib intl3_svn.lib xml.lib advapi32.lib shell32.lib ws2_32.lib zlibstat.lib libdb44.lib /EXPORT:initrepos build\te
mp.win32-2.7\Release\subvertpy\repos.obj build\temp.win32-2.7\Release\subvertpy\util.obj /OUT:build\lib.win32-2.7\subvertpy\repos.pyd /IMPLIB:build\te
mp.win32-2.7\Release\subvertpy\repos.lib /MANIFESTFILE:build\temp.win32-2.7\Release\subvertpy\repos.pyd.manifest
   Creating library build\temp.win32-2.7\Release\subvertpy\repos.lib and object build\temp.win32-2.7\Release\subvertpy\repos.exp
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest build\temp.win32-2.7\Release\subvertpy\repos.pyd.manifest -outputresource:b
uild\lib.win32-2.7\subvertpy\repos.pyd;2
building 'subvertpy.wc' extension
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\wc.c /Fobuild\temp.win32-2.7\Release\subvertpy\wc.obj
wc.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\util.c /Fobuild\temp.win32-2.7\Release\subvertpy\util.obj
util.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32 -I. -I. -ID:\CI\bld\vcs\svn-win32-1.6.17
\include\apr -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-util -ID:\CI\bld\vcs\svn-win32-1.6.17\include\apr-iconv -ID:\CI\bld\vcs\svn-win32-1.6.17\inc
lude -Isubvertpy -IC:\Python27\include -IC:\Python27\PC /Tcsubvertpy\editor.c /Fobuild\temp.win32-2.7\Release\subvertpy\editor.obj
editor.c
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib /LIBPATH:D
:\CI\bld\vcs\svn-win32-1.6.17\lib\apr /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-iconv /LIBPATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\apr-util /LIBP
ATH:D:\CI\bld\vcs\svn-win32-1.6.17\lib\neon /LIBPATH:D:\CI\bld\vcs\db4-win32-4.4.20\lib /LIBPATH:D:\CI\bld\vcs\svn-win32-libintl\lib /LIBPATH:C:\Pytho
n27\libs /LIBPATH:C:\Python27\PCbuild libapr-1.lib libapriconv-1.lib libaprutil-1.lib libneon.lib libsvn_subr-1.lib libsvn_client-1.lib libsvn_ra-1.li
b libsvn_ra_local-1.lib libsvn_ra_svn-1.lib libsvn_repos-1.lib libsvn_wc-1.lib libsvn_delta-1.lib libsvn_diff-1.lib libsvn_fs-1.lib libsvn_repos-1.lib
 libsvn_fs_fs-1.lib libsvn_fs_base-1.lib intl3_svn.lib xml.lib advapi32.lib shell32.lib ws2_32.lib zlibstat.lib libdb44.lib /EXPORT:initwc build\temp.
win32-2.7\Release\subvertpy\wc.obj build\temp.win32-2.7\Release\subvertpy\util.obj build\temp.win32-2.7\Release\subvertpy\editor.obj /OUT:build\lib.wi
n32-2.7\subvertpy\wc.pyd /IMPLIB:build\temp.win32-2.7\Release\subvertpy\wc.lib /MANIFESTFILE:build\temp.win32-2.7\Release\subvertpy\wc.pyd.manifest
   Creating library build\temp.win32-2.7\Release\subvertpy\wc.lib and object build\temp.win32-2.7\Release\subvertpy\wc.exp
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest build\temp.win32-2.7\Release\subvertpy\wc.pyd.manifest -outputresource:buil
d\lib.win32-2.7\subvertpy\wc.pyd;2
running build_scripts
Running unittest without install.
.E...E.................................................................s............................................................................F.
.E....................
======================================================================
ERROR: test_add_recursive (subvertpy.tests.test_client.TestClient)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy\tests\test_client.py", line 100, in test_add_recursive
    e = adm.entry(os.path.join(os.getcwd(), "dc", "trunk"))
KeyError: "No such entry 'c:\\users\\dreamkxd\\appdata\\local\\temp\\tmprsjtvk\\dc\\trunk'"

======================================================================
ERROR: test_diff (subvertpy.tests.test_client.TestClient)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy\tests\test_client.py", line 142, in test_diff
    (outf, errf) = self.client.diff(1, 2, self.repos_url, self.repos_url)
OSError: [Errno 13] Permission denied

======================================================================
ERROR: test_probe_try (subvertpy.tests.test_wc.AdmTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy\tests\test_wc.py", line 300, in test_probe_try
    self.assertEquals("checkout", adm.probe_try(os.path.join("checkout", "bar")).access_path())
AttributeError: 'NoneType' object has no attribute 'access_path'

======================================================================
FAIL: test_is_wc_root (subvertpy.tests.test_wc.AdmTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\CI\bld\vcs\subvertpy-python2\build\lib.win32-2.7\subvertpy\tests\test_wc.py", line 226, in test_is_wc_root
    self.assertFalse(adm.is_wc_root(os.path.join(self.test_dir, "bar")))
AssertionError: True is not false

----------------------------------------------------------------------
Ran 172 tests in 49.563s

FAILED (failures=1, errors=3, skipped=1)

D:\CI\bld\vcs\subvertpy-python2>

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Posted in a previous version of this proposal

> Note: Please review utils.c carefully, the whole file are use tab.
I didn't say I object to converting that function to use tabs. I objected to mixing that change in with code changes, because that makes it hard to see what functional changes you have made.

Really minor thing; it's usually better to use self.addCleanup(outf.close) for cleaning up files in the testsuite, that way they get cleaned up even if one of the assertions beforehand fails.

>> * Please don't reopen files in apr_file_from_object(); this may not always
>> be possible
> That's the key to get diff works under windows.
> Because the file handle can not directly covert to apr_file_t.
It currently already has some code for dealing with windows. Why doesn't that work? Can't you use tempfile.TemporaryFile() or SpooledTemporaryFile() rather than tempfile.NamedTemporaryFile().

Your change breaks the ability to pass in an object that doesn't represent a file on disk (or, on UNIX, if the path no longer represents the same file), and cases (e.g. on Windows) where somebody has an exclusive lock open on the file.

Revision history for this message
Yonggang Luo (luoyonggang) wrote : Posted in a previous version of this proposal

2012/3/28 Jelmer Vernooij <email address hidden>

> > Note: Please review utils.c carefully, the whole file are use tab.
> I didn't say I object to converting that function to use tabs. I objected
> to mixing that change in with code changes, because that makes it hard to
> see what functional changes you have made.
>
> Really minor thing; it's usually better to use self.addCleanup(outf.close)
> for cleaning up files in the testsuite, that way they get cleaned up even
> if one of the assertions beforehand fails.
>
> >> * Please don't reopen files in apr_file_from_object(); this may not
> always
> >> be possible
> > That's the key to get diff works under windows.
> > Because the file handle can not directly covert to apr_file_t.
> It currently already has some code for dealing with windows. Why doesn't
> that work? Can't you use tempfile.TemporaryFile() or SpooledTemporaryFile()
> rather than tempfile.NamedTemporaryFile().
>
> Your change breaks the ability to pass in an object that doesn't represent
> a file on disk (or, on UNIX, if the path no longer

If we really need that functional, I think a whole new function can be
write, but here, we just need the function with file exist on disk.

> represents the same file), and cases (e.g. on Windows) where somebody has
> an exclusive lock open on the file.
>
Indeed, I am try hard to use your exist win32 code, but always failed under
my OS(indeed, it's cost a LOT of my time to get this method out). Because
this is a temp file, so the LOCK and other related problems should not be
considered, and after DIFF, the file
should be returned to the normal state. I didn't test under Unix, but it
should be works.

> --
> https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99752
> You are the owner of lp:~luoyonggang/subvertpy/python2.
>

--
         æ­¤è‡´
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Posted in a previous version of this proposal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/28/2012 05:50 PM, Yonggang Luo wrote:
> 2012/3/28 Jelmer Vernooij <email address hidden>
>
>>>> * Please don't reopen files in apr_file_from_object(); this may not
>> always
>>>> be possible
>>> That's the key to get diff works under windows.
>>> Because the file handle can not directly covert to apr_file_t.
>> It currently already has some code for dealing with windows. Why doesn't
>> that work? Can't you use tempfile.TemporaryFile() or
SpooledTemporaryFile()
>> rather than tempfile.NamedTemporaryFile().
>>
>> Your change breaks the ability to pass in an object that doesn't represent
>> a file on disk (or, on UNIX, if the path no longer
>
> If we really need that functional, I think a whole new function can be
> write, but here, we just need the function with file exist on disk.
I don't think exclusive locks are that unusual on Windows. I'm happy to
discuss adding limits to this functionality, but not without a good reason.

>
>> represents the same file), and cases (e.g. on Windows) where somebody has
>> an exclusive lock open on the file.
>>
> Indeed, I am try hard to use your exist win32 code, but always failed under
> my OS(indeed, it's cost a LOT of my time to get this method out). Because
> this is a temp file, so the LOCK and other related problems should not be
> considered, and after DIFF, the file
> should be returned to the normal state. I didn't test under Unix, but it
> should be works.
Why should the LOCK not be considered for tempfiles? It seems like
tempfiles are one of the things for you would by default claim an
exclusive lock, since nobody else should care about them. The
RemoteAccess class allows providing a custom function that opens tempfiles.

How does it fail on Windows? On UNIX, just using tempfile.TemporaryFile
rather than os.tempfile seems to work perfectly fine.

Cheers,

Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPczbIAAoJEACAbyvXKaRX6A4P/3RVAhWtCtJ+h44/ZJxqq4mf
skuWsg8gLOw1q051lupBtq5Qe7iLr536nb4kf04XCVcZcenhfwFrXv7UnGeZJfq3
iaCXYO0TGiC2eL481U4nPFh6q5cUiS7MGOIjy7XBTnLPEwyzqT9TmgwlXlN82iei
mSdLwhtP73Ho6IEMnnbkftp+Ixp+9YGGXUsZiIgFWLf8GQ6lBycN+/BOyppv7yf6
O3DGAT8N94m5ADOpB+XP3EtTlzWNpm8cf4VKTeCmKJU/CNWqJatDBOi/DxyCGbJO
g2asAZDGEosSNT4cznNdHbiVTQwGFiUj84YuuHO+n+afWesAY7jP0cniblFBUAvQ
5bslPgGksihBcDutdBLq7FKMhtf6ZXMU45DnQY/qPdNJaqSOMeaILWzWrmoGr2Yk
TxqpbSH5KzVCSd0I09vQiweZr/XJuZDgP0LYNX4wPIOdvpcSze8bxhk6P2xrsw9s
LmSj2sWwuw4TDcq/XchcXmT9i6AhraiH7THCTTNNJpvaaXiAo85Gzfc7tvxQt40j
A877fkU0PJ+CkEmtKQmEJZV/lMUgbHo/6+vwLJ8cpGeGmIpSYkTcI5P+fAUIoKdT
TdV5QiqsIyZd8Qb51nLR3xBMYxWSuxfQTL54/SsX/m4XUkdtIHcTUcdSHzggCVZm
1h8WwGuzbgo5d3+wifKW
=7Tuw
-----END PGP SIGNATURE-----

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Am 29/03/12 09:47, schrieb Yonggang Luo:
> Yonggang Luo has proposed merging lp:~luoyonggang/subvertpy/python2 into lp:subvertpy.
>
> Requested reviews:
> Jelmer Vernooij (jelmer)
>
> For more details, see:
> https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99889
>
> Split merge into two part. first deprecating os.tempfile, and use the new tempfile.TemporaryFile,
> but it not works under Windows.
I'm not sure I follow - wasn't the whole point the fix this code so it
works on Windows? It already works on UNIX without this patch, so I'm
not sure what this is good for.

Cheers,

Jelmer

Revision history for this message
Yonggang Luo (luoyonggang) wrote :

2012/3/29 Jelmer Vernooij <email address hidden>

> Am 29/03/12 09:47, schrieb Yonggang Luo:
> > Yonggang Luo has proposed merging lp:~luoyonggang/subvertpy/python2 into
> lp:subvertpy.
> >
> > Requested reviews:
> > Jelmer Vernooij (jelmer)
> >
> > For more details, see:
> > https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99889
> >
> > Split merge into two part. first deprecating os.tempfile, and use the
> new tempfile.TemporaryFile,
> > but it not works under Windows.
> I'm not sure I follow - wasn't the whole point the fix this code so it
> works on Windows? It already works on UNIX without this patch, so I'm
> not sure what this is good for.
>
> A step to get closer to get it works under Windows.
So we can get the problem be more clearer.

> Cheers,
>
> Jelmer
>
>
> --
> https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99889
> You are the owner of lp:~luoyonggang/subvertpy/python2.
>

--
         æ­¤è‡´
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Am 29/03/12 13:34, schrieb Yonggang Luo:
> 2012/3/29 Jelmer Vernooij <email address hidden>
>
>> Am 29/03/12 09:47, schrieb Yonggang Luo:
>>> Yonggang Luo has proposed merging lp:~luoyonggang/subvertpy/python2 into
>> lp:subvertpy.
>>> Requested reviews:
>>> Jelmer Vernooij (jelmer)
>>>
>>> For more details, see:
>>> https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99889
>>>
>>> Split merge into two part. first deprecating os.tempfile, and use the
>> new tempfile.TemporaryFile,
>>> but it not works under Windows.
>> I'm not sure I follow - wasn't the whole point the fix this code so it
>> works on Windows? It already works on UNIX without this patch, so I'm
>> not sure what this is good for.
>>
>> A step to get closer to get it works under Windows.
> So we can get the problem be more clearer.
Why does it have to be merged for that ?

Cheers,

Jelmer

Revision history for this message
Yonggang Luo (luoyonggang) wrote :

2012/3/29 Jelmer Vernooij <email address hidden>

> Am 29/03/12 13:34, schrieb Yonggang Luo:
> > 2012/3/29 Jelmer Vernooij <email address hidden>
> >
> >> Am 29/03/12 09:47, schrieb Yonggang Luo:
> >>> Yonggang Luo has proposed merging lp:~luoyonggang/subvertpy/python2
> into
> >> lp:subvertpy.
> >>> Requested reviews:
> >>> Jelmer Vernooij (jelmer)
> >>>
> >>> For more details, see:
> >>> https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99889
> >>>
> >>> Split merge into two part. first deprecating os.tempfile, and use the
> >> new tempfile.TemporaryFile,
> >>> but it not works under Windows.
> >> I'm not sure I follow - wasn't the whole point the fix this code so it
> >> works on Windows? It already works on UNIX without this patch, so I'm
> >> not sure what this is good for.
> >>
> >> A step to get closer to get it works under Windows.
> > So we can get the problem be more clearer.
> Why does it have to be merged for that ?
>
I'am already clarified, under windows, the line ending is \r\n,
linux is \n
and os.tempfile didn't works under win7 without administration permission.

>
> Cheers,
>
> Jelmer
>
>
> --
> https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99889
> You are the owner of lp:~luoyonggang/subvertpy/python2.
>

--
         æ­¤è‡´
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

Revision history for this message
Yonggang Luo (luoyonggang) wrote :

I think you have two choice, one is trust me that I can get subvertpy works
under Win32,
the second is install an win32 environment on your computer and verify it.

--
         æ­¤è‡´
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Am 29/03/12 13:49, schrieb Yonggang Luo:
> 2012/3/29 Jelmer Vernooij <email address hidden>
>
>> Am 29/03/12 13:34, schrieb Yonggang Luo:
>>> 2012/3/29 Jelmer Vernooij <email address hidden>
>>>
>>>> Am 29/03/12 09:47, schrieb Yonggang Luo:
>>>>> Yonggang Luo has proposed merging lp:~luoyonggang/subvertpy/python2
>> into
>>>> lp:subvertpy.
>>>>> Requested reviews:
>>>>> Jelmer Vernooij (jelmer)
>>>>>
>>>>> For more details, see:
>>>>> https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99889
>>>>>
>>>>> Split merge into two part. first deprecating os.tempfile, and use the
>>>> new tempfile.TemporaryFile,
>>>>> but it not works under Windows.
>>>> I'm not sure I follow - wasn't the whole point the fix this code so it
>>>> works on Windows? It already works on UNIX without this patch, so I'm
>>>> not sure what this is good for.
>>>>
>>>> A step to get closer to get it works under Windows.
>>> So we can get the problem be more clearer.
>> Why does it have to be merged for that ?
>>
> I'am already clarified, under windows, the line ending is \r\n,
> linux is \n
> and os.tempfile didn't works under win7 without administration permission.
That file line ending change is fine, but this branch contains a lot
more changes than just that.

Let's not make changes that are unnecessary. It seems kindof pointless
to switch to tempfile.TemporaryFile instead of os.tempfile if it doesn't
improve the situation on Windows.

Cheers,

Jelmer

Revision history for this message
Yonggang Luo (luoyonggang) wrote :

2012/3/29 Jelmer Vernooij <email address hidden>

> Am 29/03/12 13:49, schrieb Yonggang Luo:
> > 2012/3/29 Jelmer Vernooij <email address hidden>
> >
> >> Am 29/03/12 13:34, schrieb Yonggang Luo:
> >>> 2012/3/29 Jelmer Vernooij <email address hidden>
> >>>
> >>>> Am 29/03/12 09:47, schrieb Yonggang Luo:
> >>>>> Yonggang Luo has proposed merging lp:~luoyonggang/subvertpy/python2
> >> into
> >>>> lp:subvertpy.
> >>>>> Requested reviews:
> >>>>> Jelmer Vernooij (jelmer)
> >>>>>
> >>>>> For more details, see:
> >>>>>
> https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99889
> >>>>>
> >>>>> Split merge into two part. first deprecating os.tempfile, and use the
> >>>> new tempfile.TemporaryFile,
> >>>>> but it not works under Windows.
> >>>> I'm not sure I follow - wasn't the whole point the fix this code so it
> >>>> works on Windows? It already works on UNIX without this patch, so I'm
> >>>> not sure what this is good for.
> >>>>
> >>>> A step to get closer to get it works under Windows.
> >>> So we can get the problem be more clearer.
> >> Why does it have to be merged for that ?
> >>
> > I'am already clarified, under windows, the line ending is \r\n,
> > linux is \n
> > and os.tempfile didn't works under win7 without administration
> permission.
> That file line ending change is fine, but this branch contains a lot
> more changes than just that.
>
> Let's not make changes that are unnecessary. It seems kindof pointless
> to switch to tempfile.TemporaryFile instead of os.tempfile if it doesn't
> improve the situation on Windows.
>
> Yes, it is, it's a blocker to get diff works under win7. because we first
need to create a temp file, then we can do succeeding things.
For example, if we want do some big modification on source code, should we
do it peace by peace or
just submit a enormous single patch?

> Cheers,
>
> Jelmer
>
>
> --
> https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99889
> You are the owner of lp:~luoyonggang/subvertpy/python2.
>

--
         æ­¤è‡´
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Am 29/03/12 14:16, schrieb Yonggang Luo:
> 2012/3/29 Jelmer Vernooij <email address hidden>
>
>> Am 29/03/12 13:49, schrieb Yonggang Luo:
>>> 2012/3/29 Jelmer Vernooij <email address hidden>
>>>
>>>> Am 29/03/12 13:34, schrieb Yonggang Luo:
>>>>> 2012/3/29 Jelmer Vernooij <email address hidden>
>>>>>
>>>>>> Am 29/03/12 09:47, schrieb Yonggang Luo:
>>>>>>> Yonggang Luo has proposed merging lp:~luoyonggang/subvertpy/python2
>>>> into
>>>>>> lp:subvertpy.
>>>>>>> Requested reviews:
>>>>>>> Jelmer Vernooij (jelmer)
>>>>>>>
>>>>>>> For more details, see:
>>>>>>>
>> https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99889
>>>>>>> Split merge into two part. first deprecating os.tempfile, and use the
>>>>>> new tempfile.TemporaryFile,
>>>>>>> but it not works under Windows.
>>>>>> I'm not sure I follow - wasn't the whole point the fix this code so it
>>>>>> works on Windows? It already works on UNIX without this patch, so I'm
>>>>>> not sure what this is good for.
>>>>>>
>>>>>> A step to get closer to get it works under Windows.
>>>>> So we can get the problem be more clearer.
>>>> Why does it have to be merged for that ?
>>>>
>>> I'am already clarified, under windows, the line ending is \r\n,
>>> linux is \n
>>> and os.tempfile didn't works under win7 without administration
>> permission.
>> That file line ending change is fine, but this branch contains a lot
>> more changes than just that.
>>
>> Let's not make changes that are unnecessary. It seems kindof pointless
>> to switch to tempfile.TemporaryFile instead of os.tempfile if it doesn't
>> improve the situation on Windows.

>> Yes, it is, it's a blocker to get diff works under win7. because we first
> need to create a temp file, then we can do succeeding things.
You said that TemporaryFile didn't work for you either. If that is the
case, then why change this code? Let's figure out what works first
before including it upstream.
> For example, if we want do some big modification on source code, should we
> do it peace by peace or
> just submit a enormous single patch?
Changes should either be self-contained, or you should explain why they
are necessary. In general, splitting up changes is good since that means
they can land independently of each other if there is a problem with one
of them.

Cheers,

Jelmer

Revision history for this message
Yonggang Luo (luoyonggang) wrote :

>
> You said that TemporaryFile didn't work for you either. If that is the
> case, then why change this code? Let's figure out what works first
> before including it upstream.
>
Because I need to access the filename of Temporary File, so I use
NamedTemporaryFile before,
but now, I found TemporaryFile also have a filename, eventhough I don't
why, but it's still works under
windows, so, as your required, I used TemporaryFile instead
of NamedTemporaryFile .

> > For example, if we want do some big modification on source code, should
> we
> > do it peace by peace or
> > just submit a enormous single patch?
> Changes should either be self-contained, or you should explain why they
> are necessary. In general, splitting up changes is good since that means
>
????? I was get confused, I think i've already explained in the LOG of the
commit.
Didn't you see that?

> they can land independently of each other if there is a problem with one
> of them.

> Cheers,
>
> Jelmer
>
>
> --
> https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99889
> You are the owner of lp:~luoyonggang/subvertpy/python2.
>

--
         æ­¤è‡´
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Am 29/03/12 15:40, schrieb Yonggang Luo:
>> You said that TemporaryFile didn't work for you either. If that is the
>> case, then why change this code? Let's figure out what works first
>> before including it upstream.
>>
> Because I need to access the filename of Temporary File, so I use
> NamedTemporaryFile before,
> but now, I found TemporaryFile also have a filename, eventhough I don't
> why, but it's still works under
> windows, so, as your required, I used TemporaryFile instead
> of NamedTemporaryFile .
I never said you should use TemporaryFile. I suggested that as one of
the alternatives you could try if tmpfile() didn't work but perhaps
still was a valid file-like object that apr_file_from_py_object supported.

You mentioned that TemporaryFile doesn't work for you either, so why
would we change the code to use that instead?
>
>>> For example, if we want do some big modification on source code, should
>> we
>>> do it peace by peace or
>>> just submit a enormous single patch?
>> Changes should either be self-contained, or you should explain why they
>> are necessary. In general, splitting up changes is good since that means
>>
> ????? I was get confused, I think i've already explained in the LOG of the
> commit.
> Didn't you see that?
In the log of the commit there is *no* explanation whatsoever of why the
existing apr_file_from_py_object() implementation doesn't work. You're
simply changing it without explaining what's wrong with the previous
implementation. There are lots of people already using subvertpy on
Windows without running into issues with tmpfile.

Cheers,

Jelmer

Revision history for this message
Yonggang Luo (luoyonggang) wrote :

2012/3/29 Jelmer Vernooij <email address hidden>

> Am 29/03/12 15:40, schrieb Yonggang Luo:
> >> You said that TemporaryFile didn't work for you either. If that is the
> >> case, then why change this code? Let's figure out what works first
> >> before including it upstream.
> >>
> > Because I need to access the filename of Temporary File, so I use
> > NamedTemporaryFile before,
> > but now, I found TemporaryFile also have a filename, eventhough I don't
> > why, but it's still works under
> > windows, so, as your required, I used TemporaryFile instead
> > of NamedTemporaryFile .
> I never said you should use TemporaryFile. I suggested that as one of
> the alternatives you could try if tmpfile() didn't work but perhaps
> still was a valid file-like object that apr_file_from_py_object supported.
>
> You mentioned that TemporaryFile doesn't work for you either, so why
> would we change the code to use that instead?
>
Still not works, is not because of TemporaryFile, that's the right
direction! It's because the original apr_file_from_py_object is WRONG
under windows.
Can you do not repeat the same question again and again?

> >
> >>> For example, if we want do some big modification on source code, should
> >> we
> >>> do it peace by peace or
> >>> just submit a enormous single patch?
> >> Changes should either be self-contained, or you should explain why they
> >> are necessary. In general, splitting up changes is good since that means
> >>
> > ????? I was get confused, I think i've already explained in the LOG of
> the
> > commit.
> > Didn't you see that?
> In the log of the commit there is *no* explanation whatsoever of why the
> existing apr_file_from_py_object() implementation doesn't work. You're
> simply changing it without explaining what's wrong with the previous
> implementation. There are lots of people already using subvertpy on
> Windows without running into issues with tmpfile.

Will, because they didn't use that feature, can you make sure each API were
used?
I think you can not make such a conclusion, and I running the unittest show
that was failed?
If you think I was cheat you, why don't just have a try, please don't make
conclusion when you don't know that.

>

> Cheers,
>
> Jelmer
>
>
>
> --
> https://code.launchpad.net/~luoyonggang/subvertpy/python2/+merge/99889
> You are the owner of lp:~luoyonggang/subvertpy/python2.
>

--
         æ­¤è‡´
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

Revision history for this message
Jelmer Vernooij (jelmer) wrote :
Download full text (4.0 KiB)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/29/2012 05:46 PM, Yonggang Luo wrote:
> 2012/3/29 Jelmer Vernooij <email address hidden>
>
>> Am 29/03/12 15:40, schrieb Yonggang Luo:
>>>> You said that TemporaryFile didn't work for you either. If that is the
>>>> case, then why change this code? Let's figure out what works first
>>>> before including it upstream.
>>>>
>>> Because I need to access the filename of Temporary File, so I use
>>> NamedTemporaryFile before,
>>> but now, I found TemporaryFile also have a filename, eventhough I don't
>>> why, but it's still works under
>>> windows, so, as your required, I used TemporaryFile instead
>>> of NamedTemporaryFile .
>> I never said you should use TemporaryFile. I suggested that as one of
>> the alternatives you could try if tmpfile() didn't work but perhaps
>> still was a valid file-like object that apr_file_from_py_object supported.
>>
>> You mentioned that TemporaryFile doesn't work for you either, so why
>> would we change the code to use that instead?
>>
> Still not works, is not because of TemporaryFile, that's the right
> direction! It's because the original apr_file_from_py_object is WRONG
> under windows.
> Can you do not repeat the same question again and again?
You haven't properly answered that question yet, which is why I keep
repeating it. Sure, you've said that apr_file_from_py_object doesn't
work for you under Windows, but *why* doesn't it work? If you can tell
me why it doesn't work, it's a lot easier to decide whether to accept a
gross hack that has other bad consequences and may introduce new bugs.

>
>
>>>
>>>>> For example, if we want do some big modification on source code, should
>>>> we
>>>>> do it peace by peace or
>>>>> just submit a enormous single patch?
>>>> Changes should either be self-contained, or you should explain why they
>>>> are necessary. In general, splitting up changes is good since that means
>>>>
>>> ????? I was get confused, I think i've already explained in the LOG of
>> the
>>> commit.
>>> Didn't you see that?
>> In the log of the commit there is *no* explanation whatsoever of why the
>> existing apr_file_from_py_object() implementation doesn't work. You're
>> simply changing it without explaining what's wrong with the previous
>> implementation. There are lots of people already using subvertpy on
>> Windows without running into issues with tmpfile.
>
> Will, because they didn't use that feature, can you make sure each API were
> used?
Fair enough, I have no idea how many people are using that API. It's not
just people using client.diff() though, it's also people who override
the tmp function used by subvertpy.ra.

>
> I think you can not make such a conclusion, and I running the unittest show
> that was failed?
> If you think I was cheat you, why don't just have a try, please don't make
> conclusion when you don't know that.
?? I haven't seen any unittest output from you. If you're referring to
output you posted in a bug some time ago, or in another merge proposal,
please either include it again or include a link. I don't keep all
previous bug reports and merge proposals for subvertpy in memory.

Cheers,

Jelmer
-----BEGIN PGP SIGNATURE-----
Ve...

Read more...

lp:~luoyonggang/subvertpy/python2 updated
2453. By Yonggang Luo

Becuase apr_os_file_put didn't works under win32, so use apr_file_open instead
apr_os_file_put under win32.

2454. By Yonggang Luo

comments update.

Unmerged revisions

2454. By Yonggang Luo

comments update.

2453. By Yonggang Luo

Becuase apr_os_file_put didn't works under win32, so use apr_file_open instead
apr_os_file_put under win32.

2452. By Yonggang Luo

Use addCleanup instead directly file close.

2451. By Yonggang Luo

Python 2.4 didn't support for b prefix.
apr_pool_destroy(temp_pool) can close files.

2450. By Yonggang Luo

The newlines are different under Windows to Unix-like system.
So only compare with splits.
The diff resulted files should be closed.

2449. By Yonggang Luo

os.tmpfile is deperated and not works properly under Win7. use tempfile.NamedTemporaryFile
instead, so that it works under Windows.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'subvertpy/client.c'
2--- subvertpy/client.c 2012-03-12 17:27:31 +0000
3+++ subvertpy/client.c 2012-04-06 06:28:17 +0000
4@@ -1280,7 +1280,6 @@
5 apr_array_header_t *c_diffopts;
6 PyObject *outfile, *errfile;
7 apr_file_t *c_outfile, *c_errfile;
8- apr_off_t offset;
9
10 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|zzzOsbbb:diff", kwnames,
11 &rev1, &rev2, &path1, &path2,
12@@ -1349,12 +1348,6 @@
13 ignore_content_type, encoding,
14 c_outfile, c_errfile, NULL,
15 client->client, temp_pool));
16-
17- offset = 0;
18- apr_file_seek(c_outfile, APR_SET, &offset);
19- offset = 0;
20- apr_file_seek(c_errfile, APR_SET, &offset);
21-
22 apr_pool_destroy(temp_pool);
23
24 return Py_BuildValue("(NN)", outfile, errfile);
25
26=== modified file 'subvertpy/tests/test_client.py'
27--- subvertpy/tests/test_client.py 2012-03-04 20:32:19 +0000
28+++ subvertpy/tests/test_client.py 2012-04-06 06:28:17 +0000
29@@ -140,8 +140,8 @@
30 return # Skip test
31
32 (outf, errf) = self.client.diff(1, 2, self.repos_url, self.repos_url)
33- outf.seek(0)
34- errf.seek(0)
35+ self.addCleanup(outf.close)
36+ self.addCleanup(errf.close)
37 self.assertEquals("""Index: foo
38 ===================================================================
39 --- foo\t(revision 1)
40@@ -151,7 +151,7 @@
41 \\ No newline at end of file
42 +foo2
43 \\ No newline at end of file
44-""", outf.read())
45+""".splitlines(), outf.read().splitlines())
46 self.assertEquals("", errf.read())
47
48 def assertCatEquals(self, value, revision=None):
49
50=== modified file 'subvertpy/util.c'
51--- subvertpy/util.c 2012-02-24 06:42:47 +0000
52+++ subvertpy/util.c 2012-04-06 06:28:17 +0000
53@@ -178,14 +178,14 @@
54
55 PyObject *PyOS_tmpfile(void)
56 {
57- PyObject *osmodule, *tmpfile_fn, *ret;
58+ PyObject *tempfile, *tmpfile_fn, *ret;
59
60- osmodule = PyImport_ImportModule("os");
61- if (osmodule == NULL)
62+ tempfile = PyImport_ImportModule("tempfile");
63+ if (tempfile == NULL)
64 return NULL;
65
66- tmpfile_fn = PyObject_GetAttrString(osmodule, "tmpfile");
67- Py_DECREF(osmodule);
68+ tmpfile_fn = PyObject_GetAttrString(tempfile, "NamedTemporaryFile");
69+ Py_DECREF(tempfile);
70
71 if (tmpfile_fn == NULL)
72 return NULL;
73@@ -717,26 +717,46 @@
74
75 apr_file_t *apr_file_from_object(PyObject *object, apr_pool_t *pool)
76 {
77- apr_status_t status;
78- FILE *file;
79- apr_file_t *fp;
80- apr_os_file_t osfile;
81-
82- file = PyFile_AsFile(object);
83+ PyObject *filenameObject = NULL;
84+ apr_file_t *fp = NULL;
85+ apr_status_t status;
86+ int fd = -1;
87+ int is_filename = 0;
88+ if ((fd = PyObject_AsFileDescriptor(object)) >= 0) {
89 #ifdef WIN32
90- osfile = (apr_os_file_t)_get_osfhandle(_fileno(file));
91+ /* apr_os_file_put is not works under Win32, so we directly retrieve
92+ * filename and open it. It's also works for _ra.py_open_tmp_file
93+ * under win32.*/
94+ is_filename = 1;
95+ filenameObject = PyObject_GetAttrString(object, "name");
96 #else
97- osfile = (apr_os_file_t)fileno(file);
98+ is_filename = 0;
99 #endif
100-
101- status = apr_os_file_put(&fp, &osfile,
102- APR_FOPEN_WRITE | APR_FOPEN_CREATE, pool);
103- if (status) {
104- PyErr_SetAprStatus(status);
105- return NULL;
106- }
107-
108- return fp;
109+ }
110+ else
111+ {
112+ PyErr_SetString(PyExc_TypeError, "Unknown type for file variable");
113+ return NULL;
114+ }
115+
116+ if (is_filename)
117+ {
118+ char *filename = PyString_AsString(filenameObject);
119+ status = apr_file_open(&fp, filename,
120+ APR_WRITE | APR_CREATE, APR_REG, pool);
121+ }
122+ else
123+ {
124+ apr_os_file_t osfile = (apr_os_file_t)fd;
125+ status = apr_os_file_put(&fp, &osfile,
126+ APR_FOPEN_WRITE | APR_FOPEN_CREATE, pool);
127+ }
128+ if (status) {
129+ PyErr_SetAprStatus(status);
130+ return NULL;
131+ }
132+
133+ return fp;
134 }
135
136 static void stream_dealloc(PyObject *self)

Subscribers

People subscribed via source and target branches

to all changes: