[py-svn] r48347 - in py/trunk/py/path/svn: . testing
cfbolz at codespeak.net
cfbolz at codespeak.net
Tue Nov 6 23:11:31 CET 2007
Author: cfbolz
Date: Tue Nov 6 23:11:30 2007
New Revision: 48347
Modified:
py/trunk/py/path/svn/testing/test_wccommand.py
py/trunk/py/path/svn/wccommand.py
Log:
make status on working copy objects deal with replaced files
Modified: py/trunk/py/path/svn/testing/test_wccommand.py
==============================================================================
--- py/trunk/py/path/svn/testing/test_wccommand.py (original)
+++ py/trunk/py/path/svn/testing/test_wccommand.py Tue Nov 6 23:11:30 2007
@@ -33,6 +33,7 @@
assert not s.prop_modified
assert not s.added
assert not s.deleted
+ assert not s.replaced
dpath = self.root.join('sampledir')
assert_nochange(self.root.join('sampledir'))
@@ -47,6 +48,7 @@
assert s.added
assert not s.modified
assert not s.prop_modified
+ assert not s.replaced
finally:
nf.revert()
@@ -58,6 +60,7 @@
assert not s.added
assert s.modified
assert not s.prop_modified
+ assert not s.replaced
finally:
nf.revert()
@@ -113,6 +116,17 @@
finally:
r.update()
+ def test_status_replaced(self):
+ p = self.root.join("samplefile")
+ p.remove()
+ p.ensure(dir=0)
+ p.add()
+ try:
+ s = self.root.status()
+ assert p.basename in [item.basename for item in s.replaced]
+ finally:
+ self.root.revert(rec=1)
+
def test_diff(self):
p = self.root / 'anotherfile'
out = p.diff(rev=2)
Modified: py/trunk/py/path/svn/wccommand.py
==============================================================================
--- py/trunk/py/path/svn/wccommand.py (original)
+++ py/trunk/py/path/svn/wccommand.py Tue Nov 6 23:11:30 2007
@@ -306,6 +306,8 @@
rootstatus.kindmismatch.append(wcpath)
elif c0 == '!':
rootstatus.incomplete.append(wcpath)
+ elif c0 == 'R':
+ rootstatus.replaced.append(wcpath)
elif not c0.strip():
rootstatus.unchanged.append(wcpath)
else:
@@ -566,7 +568,7 @@
class WCStatus:
attrnames = ('modified','added', 'conflict', 'unchanged', 'external',
'deleted', 'prop_modified', 'unknown', 'update_available',
- 'incomplete', 'kindmismatch', 'ignored', 'locked'
+ 'incomplete', 'kindmismatch', 'ignored', 'locked', 'replaced'
)
def __init__(self, wcpath, rev=None, modrev=None, author=None):
More information about the py-svn
mailing list