# HG changeset patch # User Vincent Hatakeyama # Date 1620721225 -7200 # Tue May 11 10:20:25 2021 +0200 # Node ID 7615056b82e62f43b55247cc2a882582cacfd4c7 # Parent 3dec151080ae036e55f8a98bbbb6b0e299edc60d Do not set rootpath when using prefix_with_layout diff --git a/hgext3rd/confman/configuration.py b/hgext3rd/confman/configuration.py --- a/hgext3rd/confman/configuration.py +++ b/hgext3rd/confman/configuration.py @@ -217,7 +217,13 @@ # if managed is a sub configuration, we add the rootpath # to its hgrc which allows to work from the managed confman - if conf.get('expand') is not None: + # This is not done in the case of the use of prefix_with_layout, + # so that cfensure in the reused repository works. + # If there is white or black listing done, this would not work + if ( + conf.get('expand') is not None and + conf.get('layout_prefix') is None + ): frompath = os.path.join(dest, '.hg') key = 'hgrc.confman.rootpath' if key in conf: diff --git a/hgext3rd/confman/utils.py b/hgext3rd/confman/utils.py --- a/hgext3rd/confman/utils.py +++ b/hgext3rd/confman/utils.py @@ -325,6 +325,8 @@ value = m.group(2) if item == "layout" and layout_prefix: value = os.path.join(layout_prefix, value) + # source is not set as it is in parent .hgconf file + self.set(section, "layout_prefix", layout_prefix) self.set(section, item, value, "%s:%d" % (src, line)) continue m = unsetre.match(l)