changeset 1015:ea6109f5c000

layouts: use layouts library for branch mapping with generating .hgignore
author David Schleimer <dschleimer@fb.com>
date Mon, 29 Apr 2013 13:51:52 -0700
parents 0ed7cf23e801
children 438dc704b0d6
files hgsubversion/svncommands.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svncommands.py
+++ b/hgsubversion/svncommands.py
@@ -374,10 +374,9 @@ def genignore(ui, repo, force=False, **o
     hashes = meta.revmap.hashes()
     parent = util.parentrev(ui, repo, meta, hashes)
     r, br = hashes[parent.node()]
-    if meta.layout == 'single':
-        branchpath = ''
-    else:
-        branchpath = br and ('branches/%s/' % br) or 'trunk/'
+    branchpath = meta.layoutobj.remotename(br)
+    if branchpath:
+        branchpath += '/'
     ignorelines = ['.hgignore', 'syntax:glob']
     dirs = [''] + [d[0] for d in svn.list_files(branchpath, r)
                    if d[1] == 'd']