[svn r44248] Fixed problem with calling .remove() on wcpaths of non-versioned files.
--HG-- branch : trunk
This commit is contained in:
parent
29e19de6a4
commit
bdfb5ea88b
|
@ -156,6 +156,15 @@ class TestWCSvnCommandPath(CommonSvnTests):
|
|||
finally:
|
||||
notexisting.remove()
|
||||
|
||||
def test_nonversioned_remove(self):
|
||||
assert self.root.check(versioned=1)
|
||||
somefile = self.root.join('nonversioned/somefile')
|
||||
nonwc = py.path.local(somefile)
|
||||
nonwc.ensure()
|
||||
assert somefile.check()
|
||||
assert not somefile.check(versioned=True)
|
||||
somefile.remove() # this used to fail because it tried to 'svn rm'
|
||||
|
||||
def test_properties(self):
|
||||
try:
|
||||
self.root.propset('gaga', 'this')
|
||||
|
|
|
@ -180,6 +180,10 @@ class SvnWCCommandPath(common.FSPathBase):
|
|||
underlying svn semantics.
|
||||
"""
|
||||
assert rec, "svn cannot remove non-recursively"
|
||||
if not self.check(versioned=True):
|
||||
# not added to svn (anymore?), just remove
|
||||
py.path.local(self).remove()
|
||||
return
|
||||
flags = []
|
||||
if force:
|
||||
flags.append('--force')
|
||||
|
|
Loading…
Reference in New Issue