changeset 1317:62fc5850eb28

svncommads: document the auto layout block
author Sean Farley <sean.michael.farley@gmail.com>
date Sun, 08 Feb 2015 17:32:21 -0800
parents 91eb0ad1376a
children f1b8029cf8e9
files hgsubversion/svncommands.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svncommands.py
+++ b/hgsubversion/svncommands.py
@@ -184,8 +184,13 @@ def _buildmeta(ui, repo, args, partial=F
         assert revpath.startswith(subdir), ('That does not look like the '
                                             'right location in the repo.')
 
+        # meta.layout is a config-cached property so instead of testing for
+        # None we test to see if the layout is 'auto' and, if so, try to guess
+        # the layout based on the commits (where subdir is compared to the
+        # revpath extracted from the commit)
         if meta.layout == 'auto':
-            meta.layout = meta.layout_from_commit(subdir, revpath, ctx.branch())
+            meta.layout = meta.layout_from_commit(subdir, revpath,
+                                                  ctx.branch())
         elif meta.layout == 'single':
             assert (subdir or '/') == revpath, ('Possible layout detection'
                                                 ' defect in replay')