From: Tony Duckles Date: Sat, 4 Feb 2012 04:50:14 +0000 (-0600) Subject: Handle empty "svn log" commit messages X-Git-Tag: v1.2.0~11 X-Git-Url: http://git.nynim.org/svn2svn.git/commitdiff_plain/48bae98598036623462d574457b3833d4a87ee66 Handle empty "svn log" commit messages --- 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