# HG changeset patch # User Sean Farley # Date 1395678054 18000 # Node ID 0326686199f5c016622bcc9a0e60d7e7e918b11c # Parent 9e46dfddd3a940b2b2e44b4bcdf495ed9e2a4f24 wrappers: use meta.layout instead of accessing config directly diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py --- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -399,13 +399,12 @@ def pull(repo, source, heads=[], force=F stopat_rev = util.parse_revnum(svn, checkout) - layout = layouts.detect.layout_from_config(meta, allow_auto=True) - if layout == 'auto': - layout = meta.layout_from_subversion(svn, (stopat_rev or None)) - repo.ui.note('using %s layout\n' % layout) + if meta.layout == 'auto': + meta.layout = meta.layout_from_subversion(svn, (stopat_rev or None)) + repo.ui.note('using %s layout\n' % meta.layout) if meta.branch: - if layout != 'single': + if meta.layout != 'single': msg = ('branch cannot be specified for Subversion clones using ' 'standard directory layout') raise hgutil.Abort(msg) @@ -422,7 +421,7 @@ def pull(repo, source, heads=[], force=F 'startrev', 0)) if start > 0: - if layout == 'standard': + if meta.layout == 'standard': raise hgutil.Abort('non-zero start revisions are only ' 'supported for single-directory clones.') ui.note('starting at revision %d; any prior will be ignored\n'