# HG changeset patch # User Martin von Zweigbergk # Date 1648184713 25200 # Node ID 2d519511c5c3af1794d092257250791f8b7f36a1 # Parent f808417db5cc9dd9dcd9cc3bb8c1527ed65e6e0c extensions: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12409 diff -r f808417db5cc -r 2d519511c5c3 mercurial/extensions.py --- a/mercurial/extensions.py Thu Mar 24 22:04:38 2022 -0700 +++ b/mercurial/extensions.py Thu Mar 24 22:05:13 2022 -0700 @@ -831,7 +831,7 @@ for name, path in paths.items(): doc = _disabledhelp(path) if doc and name != b'__index__': - exts[name] = doc.splitlines()[0] + exts[name] = stringutil.firstline(doc) return exts @@ -935,7 +935,7 @@ assert doc is not None # help pytype if shortname: ename = ename.split(b'.')[-1] - exts[ename] = doc.splitlines()[0].strip() + exts[ename] = stringutil.firstline(doc).strip() return exts