[py-svn] r6962 - py/dist/py/path/svn
hpk at codespeak.net
hpk at codespeak.net
Sun Oct 17 05:01:55 CEST 2004
Author: hpk
Date: Sun Oct 17 05:01:54 2004
New Revision: 6962
Modified:
py/dist/py/path/svn/test_wccommand.py
py/dist/py/path/svn/wccommand.py
Log:
streamlined the subversion working copy api,
you don't provide an initial URL anymore.
Modified: py/dist/py/path/svn/test_wccommand.py
==============================================================================
--- py/dist/py/path/svn/test_wccommand.py (original)
+++ py/dist/py/path/svn/test_wccommand.py Sun Oct 17 05:01:54 2004
@@ -18,8 +18,8 @@
raise py.test.run.Skipped(msg='could not create temporary svn test repository')
wcdir.ensure(dir=1)
print "created svn repository", repo
- wc = py.path.svnwc(wcdir, url='file://%s' % repo)
- wc.checkout()
+ wc = py.path.svnwc(wcdir)
+ wc.checkout(url='file://%s' % repo)
print "checked out new repo into", wc
setuptestfs(wc)
wc.join('samplefile').propset('svn:eol-style', 'native')
Modified: py/dist/py/path/svn/wccommand.py
==============================================================================
--- py/dist/py/path/svn/wccommand.py (original)
+++ py/dist/py/path/svn/wccommand.py Sun Oct 17 05:01:54 2004
@@ -20,10 +20,9 @@
class SvnWCCommandPath(common.FSPathBase):
sep = os.sep
- def __new__(cls, wcpath=None, url=None):
+ def __new__(cls, wcpath=None):
self = object.__new__(cls)
self.localpath = path.local(wcpath)
- self._url = url
return self
strpath = property(lambda x: str(x.localpath), None, None, "string path")
@@ -32,7 +31,7 @@
return self.localpath == getattr(other, 'localpath', None)
def _geturl(self):
- if self._url is None:
+ if getattr(self, '_url', None) is None:
info = self.info()
self._url = info.url #SvnPath(info.url, info.rev)
assert isinstance(self._url, str)
@@ -66,7 +65,7 @@
out = py.process.cmdexec(string)
return out
- def checkout(self, rev = None, url=None):
+ def checkout(self, url=None, rev = None):
""" checkout from url to local wcpath. """
if url is None:
url = self.url
@@ -283,11 +282,9 @@
def new(self, **kw):
if kw:
localpath = self.localpath.new(**kw)
- url = None
else:
localpath = self.localpath
- url = self._url
- return self.__class__(localpath, url)
+ return self.__class__(localpath)
def join(self, *args, **kwargs):
""" return a new Path (with the same revision) which is composed
@@ -329,8 +326,7 @@
paths = []
for localpath in self.localpath.listdir(notsvn):
- name = localpath.get('basename')
- p = self.__class__(localpath, '%s/%s' % (self.url, name)) # XXX
+ p = self.__class__(localpath)
paths.append(p)
if fil or sort:
More information about the pytest-commit
mailing list