# HG changeset patch # User Patrick Mezard # Date 2009-12-13 10:56:22 # Node ID dfc3ed37d58d921428a6a684001e4f708c445a52 # Parent dd37f044f1fa580117711b04851624f1fc9ecad4 # Parent a02d43acbc0414bef4988f16de98b7d20d2094bb Merge with crew-stable diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -1138,6 +1138,8 @@ class svn_sink(converter_sink, commandli try: rev = self.commit_re.search(output).group(1) except AttributeError: + if not files: + return parents[0] self.ui.warn(_('unexpected svn output:\n')) self.ui.warn(output) raise util.Abort(_('unable to cope with svn output')) diff --git a/tests/test-convert-hg-svn b/tests/test-convert-hg-svn --- a/tests/test-convert-hg-svn +++ b/tests/test-convert-hg-svn @@ -9,6 +9,7 @@ fix_path() echo "[extensions]" >> $HGRCPATH echo "convert = " >> $HGRCPATH +echo "mq = " >> $HGRCPATH svnpath=`pwd | fix_path`/svn-repo svnadmin create $svnpath @@ -59,9 +60,14 @@ hg convert -s hg -d svn $svnpath-hg $svn echo % new hg rev hg clone $svnpath-hg $svnpath-work -echo b > $svnpath-work/b -hg --cwd $svnpath-work add b -hg --cwd $svnpath-work ci -mb +cd $svnpath-work +echo b > b +hg add b +hg ci -mb +echo '% adding an empty revision' +hg qnew -m emtpy empty +hg qfinish -a +cd .. echo % echo hg to svn hg --cwd $svnpath-hg pull -q $svnpath-work diff --git a/tests/test-convert-hg-svn.out b/tests/test-convert-hg-svn.out --- a/tests/test-convert-hg-svn.out +++ b/tests/test-convert-hg-svn.out @@ -21,11 +21,13 @@ converting... % new hg rev updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved +% adding an empty revision % echo hg to svn scanning source... sorting... converting... -0 b +1 b +0 emtpy % svn back to hg should do nothing scanning source... sorting...