diff -r 050efe9a1644 -r 61b60b28c381 mercurial/formatter.py --- a/mercurial/formatter.py Sat Jun 17 16:32:20 2017 +0900 +++ b/mercurial/formatter.py Sat Apr 22 21:29:00 2017 +0900 @@ -453,6 +453,11 @@ partsmap = {spec.ref: spec.ref} # initial ref must exist in t if spec.mapfile: partsmap.update((p, p) for p in partnames if p in t) + elif spec.ref: + for part in partnames: + ref = '%s:%s' % (spec.ref, part) # select config sub-section + if ref in t: + partsmap[part] = ref return partsmap def loadtemplater(ui, spec, cache=None):