diff options
author | Ian Clatworthy <ian.clatworthy@canonical.com> | 2009-09-28 01:40:50 +1000 |
---|---|---|
committer | Ian Clatworthy <ian.clatworthy@canonical.com> | 2009-09-28 01:40:50 +1000 |
commit | b4feab671585d451b21d14d2a54ecabcb1eea4af (patch) | |
tree | 0f4c2c21edc230ab85035f5067cbaa59baeee298 | |
parent | e321c5ad3a006e1c3811319231ac48ce0f2f5915 (diff) | |
parent | 9b24078fd6e51403509420d7c1234d6536161b01 (diff) | |
download | python-fastimport-b4feab671585d451b21d14d2a54ecabcb1eea4af.tar.gz |
merge fix for empty patch name handling in darcs-fast-import
-rwxr-xr-x | exporters/darcs/darcs-fast-export | 4 | ||||
-rw-r--r-- | exporters/darcs/t/lib.sh | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/exporters/darcs/darcs-fast-export b/exporters/darcs/darcs-fast-export index d94618e..1f233b9 100755 --- a/exporters/darcs/darcs-fast-export +++ b/exporters/darcs/darcs-fast-export @@ -66,7 +66,9 @@ def get_patchname(patch): s = "" if patch.attributes['inverted'].value == 'True': s = "UNDO: " - ret.append(s + patch.getElementsByTagName("name")[0].childNodes[0].data) + cs = patch.getElementsByTagName("name")[0].childNodes + if cs.length > 0: + ret.append(s + cs[0].data) lines = patch.getElementsByTagName("comment") if lines: for i in lines[0].childNodes[0].data.split('\n'): diff --git a/exporters/darcs/t/lib.sh b/exporters/darcs/t/lib.sh index 1529f6f..dcdc0f8 100644 --- a/exporters/darcs/t/lib.sh +++ b/exporters/darcs/t/lib.sh @@ -78,6 +78,10 @@ third line" _drrec -a -m "remove and rename" darcs mv a b _drrecamend + echo c > c + darcs add c + # empty commit message + _drrec -a -m "" cd .. } |