diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
index e6d3d39cc1c78aff00079cbf820215c71e836dd6_bWVyY3VyaWFsL2xvY2FscmVwby5weQ==..d3e761f9ac0a74e75c9acd4d7ce712616116cee6_bWVyY3VyaWFsL2xvY2FscmVwby5weQ== 100644
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2792,7 +2792,7 @@
     if unknownopts:
         raise error.Abort(_('unable to create repository because of unknown '
                             'creation option: %s') %
-                          ', '.sorted(unknownopts),
+                          ', '.join(sorted(unknownopts)),
                           hint=_('is a required extension not loaded?'))
 
     requirements = newreporequirements(ui, createopts=createopts)