changeset 1017:c6e9889dba27

layouts: use layouts library for branch mappingduring push
author David Schleimer <dschleimer@fb.com>
date Mon, 29 Apr 2013 15:11:55 -0700
parents 438dc704b0d6
children f67f9d28b0ac
files hgsubversion/pushmod.py
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/pushmod.py
+++ b/hgsubversion/pushmod.py
@@ -99,12 +99,7 @@ def commit(ui, repo, rev_ctx, meta, base
     file_data = {}
     parent = rev_ctx.parents()[0]
     parent_branch = rev_ctx.parents()[0].branch()
-    branch_path = 'trunk'
-
-    if meta.layout == 'single':
-        branch_path = ''
-    elif parent_branch and parent_branch != 'default':
-        branch_path = 'branches/%s' % parent_branch
+    branch_path = meta.layoutobj.remotename(parent_branch)
 
     extchanges = svnexternals.diff(svnexternals.parse(ui, parent),
                                    svnexternals.parse(ui, rev_ctx))
@@ -139,7 +134,7 @@ def commit(ui, repo, rev_ctx, meta, base
                     copies[file] = renamed[0]
                     base_data = parent[renamed[0]].data()
                 else:
-                    autoprops = svn.autoprops_config.properties(file) 
+                    autoprops = svn.autoprops_config.properties(file)
                     if autoprops:
                         props.setdefault(file, {}).update(autoprops)