From 48bae98598036623462d574457b3833d4a87ee66 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Fri, 3 Feb 2012 22:50:14 -0600 Subject: [PATCH] Handle empty "svn log" commit messages --- svn2svn/svnclient.py | 2 +- tests/make-ref-repo.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/svn2svn/svnclient.py b/svn2svn/svnclient.py index e5e8abc..04f5eee 100644 --- a/svn2svn/svnclient.py +++ b/svn2svn/svnclient.py @@ -91,7 +91,7 @@ def parse_svn_log_xml(xml_string): d['date'] = svn_date_to_timestamp(date.text) else: d['date'] = None - d['message'] = msg is not None and msg.text.replace('\r\n', '\n').replace('\n\r', '\n').replace('\r', '\n') or "" + d['message'] = msg is not None and msg.text and msg.text.replace('\r\n', '\n').replace('\n\r', '\n').replace('\r', '\n') or "" paths = [] for path in entry.findall('.//paths/path'): copyfrom_rev = path.get('copyfrom-rev') diff --git a/tests/make-ref-repo.sh b/tests/make-ref-repo.sh index c0af8cf..004f1a5 100755 --- a/tests/make-ref-repo.sh +++ b/tests/make-ref-repo.sh @@ -61,6 +61,10 @@ svn ci -q --with-revprop 'testprop=Test 1 message' -m "Test 1: Add Module/Projec svn up -q show_last_commit +# Empty commit message +echo "Module/ProjectB/FileB1.txt (Test 1.1)" >> $WC/Module/ProjectB/FileB1.txt +svn_commit "" + # Test #2: Rename files # * Test rename support # * Test committing rename in two different branch commits: first deletion, then add -- 2.45.2