Hi Jasper, Jasper Spaans wrote: > I'm currently exploring the py.path module, and am trying to get it > svnwc to work with svn locking. The following would be nice to have, > as the current version doesn't provide a method to find out if a file > has been locked: > > --- path/svn/wccommand.py~ 2008-04-01 17:13:09.000000000 +0200 > +++ path/svn/wccommand.py 2008-04-01 17:13:09.000000000 +0200 > @@ -644,7 +644,10 @@ > if 'lastchangeddate' in d: > self.mtime = parse_wcinfotime(d['lastchangeddate']) > self.time = self.mtime * 1000000 > - > + if 'lockowner' in d: > + self.lock = { 'owner': d['lockowner'], > + 'mtime': parse_wcinfotime(d['lockcreated']) } > + > def __eq__(self, other): > return self.__dict__ == other.__dict__ > > > Proof of concept of the output: > >>> import py > >>> x = py.path.svnwc('/tmp/svnstoragetest-TMUVVD/root.xml') > >>> dir(x.info()) > ['__doc__', '__eq__', '__init__', '__module__', 'created_rev', 'kind', > 'last_author', 'lock', 'mtime', 'path', 'rev', 'size', 'time', 'url'] > >>> x.info().lock > {'owner': 'foo', 'mtime': 1207067232}
Could you write a few tests for that feature too? Otherwise I can't really apply the patch. Thanks, Carl Friedrich _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev