changeset 10052:dfc3ed37d58d

Merge with crew-stable
author Patrick Mezard <pmezard@gmail.com>
date Sun, 13 Dec 2009 11:56:22 +0100
parents dd37f044f1fa (current diff) a02d43acbc04 (diff)
children 5c5c6295533d
files
diffstat 3 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Mon Dec 07 19:18:03 2009 +0900
+++ b/hgext/convert/subversion.py	Sun Dec 13 11:56:22 2009 +0100
@@ -1138,6 +1138,8 @@
             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'))
--- a/tests/test-convert-hg-svn	Mon Dec 07 19:18:03 2009 +0900
+++ b/tests/test-convert-hg-svn	Sun Dec 13 11:56:22 2009 +0100
@@ -9,6 +9,7 @@
 
 echo "[extensions]" >> $HGRCPATH
 echo "convert = " >> $HGRCPATH
+echo "mq = " >> $HGRCPATH
 
 svnpath=`pwd | fix_path`/svn-repo
 svnadmin create $svnpath
@@ -59,9 +60,14 @@
 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
--- a/tests/test-convert-hg-svn.out	Mon Dec 07 19:18:03 2009 +0900
+++ b/tests/test-convert-hg-svn.out	Sun Dec 13 11:56:22 2009 +0100
@@ -21,11 +21,13 @@
 % 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...