diff --git a/py/path/svn/testing/test_wccommand.py b/py/path/svn/testing/test_wccommand.py index 096623561..09da681e9 100644 --- a/py/path/svn/testing/test_wccommand.py +++ b/py/path/svn/testing/test_wccommand.py @@ -33,6 +33,7 @@ class TestWCSvnCommandPath(CommonSvnTests): 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 @@ class TestWCSvnCommandPath(CommonSvnTests): assert s.added assert not s.modified assert not s.prop_modified + assert not s.replaced finally: nf.revert() @@ -58,6 +60,7 @@ class TestWCSvnCommandPath(CommonSvnTests): assert not s.added assert s.modified assert not s.prop_modified + assert not s.replaced finally: nf.revert() @@ -113,6 +116,17 @@ class TestWCSvnCommandPath(CommonSvnTests): 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) diff --git a/py/path/svn/wccommand.py b/py/path/svn/wccommand.py index 1950cdb82..28fec9e1a 100644 --- a/py/path/svn/wccommand.py +++ b/py/path/svn/wccommand.py @@ -306,6 +306,8 @@ class SvnWCCommandPath(common.FSPathBase): 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 @@ if verbose is True, then the LogEntry instances also know which files changed. 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):