D7732: convert: refactor authormap into separate function for outside use
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Fri Jan 17 10:08:53 EST 2020
pulkit added a comment.
Amending the following in flight to make `test-check-format.t` (or black) happy:
diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py
+++ b/hgext/convert/convcmd.py
@@ -55,6 +55,7 @@ svn_source = subversion.svn_source
orig_encoding = b'ascii'
+
def readauthormap(ui, authorfile, authors=None):
if authors is None:
authors = {}
@@ -84,6 +85,7 @@ def readauthormap(ui, authorfile, author
ui.status(m % (srcauthor, authors[srcauthor], dstauthor))
return authors
+
def recode(s):
if isinstance(s, pycompat.unicode):
return s.encode(pycompat.sysstr(orig_encoding), 'replace')
REPOSITORY
rHG Mercurial
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7732/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7732
To: joerg.sonnenberger, #hg-reviewers, pulkit
Cc: pulkit, mercurial-devel
More information about the Mercurial-devel
mailing list