Mercurial > hg-stable
changeset 14152:00121103546a
convert: handle invalid subversion source paths
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 01 May 2011 17:35:05 +0200 |
parents | 1fe82c93b8e2 |
children | f8047a059ca0 |
files | hgext/convert/subversion.py tests/test-convert-svn-source.t |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Sun May 01 17:34:16 2011 +0200 +++ b/hgext/convert/subversion.py Sun May 01 17:35:05 2011 +0200 @@ -278,7 +278,10 @@ 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)
--- a/tests/test-convert-svn-source.t Sun May 01 17:34:16 2011 +0200 +++ b/tests/test-convert-svn-source.t Sun May 01 17:35:05 2011 +0200 @@ -107,6 +107,11 @@ 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