From a835885fc88de3a863bd3a93f08a1c6488501c81 Mon Sep 17 00:00:00 2001 From: paulie4 Date: Sun, 10 Jan 2021 20:58:36 -0500 Subject: [PATCH 1/2] local.py: status() now also checks props for changes --- svn/local.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/svn/local.py b/svn/local.py index 686063b..14be44c 100644 --- a/svn/local.py +++ b/svn/local.py @@ -84,7 +84,9 @@ def status(self, rel_path=None): wcstatus = entry.find('wc-status') wcstatus_attr = wcstatus.attrib - change_type_raw = wcstatus_attr['item'] + props = wcstatus_attr['props'] + change_type_raw = 'conflicted' if props == 'conflicted' else \ + 'modified' if props == 'modified' else wcstatus_attr['item'] change_type = svn.constants.STATUS_TYPE_LOOKUP[change_type_raw] # This will be absent if the file is "unversioned". It'll be "-1" From 0b5328fa4c1c372aec216eae267be3721a0dba7e Mon Sep 17 00:00:00 2001 From: paulie4 Date: Sun, 10 Jan 2021 21:25:28 -0500 Subject: [PATCH 2/2] test_local.py: add test for status of a modified prop --- tests/test_local.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_local.py b/tests/test_local.py index 445f4b8..4a1adcf 100644 --- a/tests/test_local.py +++ b/tests/test_local.py @@ -9,6 +9,10 @@ class TestLocalClient(unittest.TestCase): def test_status(self): with svn.test_support.temp_repo(): with svn.test_support.temp_checkout() as (_, lc): + lc.run_command('propset', ['someProp', 'someVal', '.']) + s = next(lc.status()) + self.assertTrue(s.type_raw_name == 'modified') + svn.test_support.populate_bigger_file_changes1() status = {}