changeset 983:0ba09ecf5df2

Layout option can be accepted only auto, single, or standard.
author Mitsuhiro Koga <shiena.jp@gmail.com>
date Thu, 22 Nov 2012 12:45:43 +0900
parents ea8ef4dd967e
children 6315bdd1546e
files hgsubversion/svnmeta.py hgsubversion/wrappers.py
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
@@ -110,6 +110,8 @@ class SVNMeta(object):
             lo = self.repo.ui.config('hgsubversion', 'layout', default='auto')
             if lo == 'auto':
                 raise hgutil.Abort('layout not yet determined')
+            elif not lo in ('single', 'standard'):
+                raise hgutil.Abort('unknown layout \'%s\'' % lo)
             self._layout = lo
             f = open(self.layoutfile, 'w')
             f.write(self._layout)
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -317,6 +317,8 @@ def pull(repo, source, heads=[], force=F
         stopat_rev = util.parse_revnum(svn, checkout)
 
         layout = repo.ui.config('hgsubversion', 'layout', 'auto')
+        if not layout in ('auto', 'single', 'standard'):
+            raise hgutil.Abort('unknown layout \'%s\'' % layout)
         if layout == 'auto':
             try:
                 rootlist = svn.list_dir('', revision=(stopat_rev or None))