# HG changeset patch # User Mads Kiilerich # Date 2011-05-01 15:35:05 # Node ID 00121103546ae38624861411feb6d024787f3a34 # Parent 1fe82c93b8e2306f904c682d396a830215764964 convert: handle invalid subversion source paths diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -278,7 +278,10 @@ class svn_source(converter_source): raise util.Abort(_('svn: start revision %s is not an integer') % self.startrev) - self.head = self.latest(self.module, latest) + try: + self.head = self.latest(self.module, latest) + except SvnPathNotFound: + self.head = None if not self.head: raise util.Abort(_('no revision found in module %s') % self.module) diff --git a/tests/test-convert-svn-source.t b/tests/test-convert-svn-source.t --- a/tests/test-convert-svn-source.t +++ b/tests/test-convert-svn-source.t @@ -107,6 +107,11 @@ Update svn repository again Committed revision 8. $ cd .. + $ hg convert -s svn "$svnurl/non-existent-path" dest + initializing destination dest repository + abort: no revision found in module /proj B/non-existent-path + [255] + ######################################## Test incremental conversion