On Mon, 20 Mar 2017 00:49:07 -0700, Phil Cohen wrote: > # HG changeset patch > # User Phil Cohen <phil...@fb.com> > # Date 1489996027 25200 > # Mon Mar 20 00:47:07 2017 -0700 > # Node ID f37121209a2bbcde572e986f2b038bf2da7f954a > # Parent 1ca023fb02cbe4747e2b5b625866cfa538cbebd3 > localrepo: pass args and command running as store/write lock metadata > > diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py > --- a/mercurial/localrepo.py > +++ b/mercurial/localrepo.py > @@ -10,6 +10,7 @@ > import errno > import hashlib > import inspect > +import json > import os > import random > import time > @@ -1355,10 +1356,15 @@ > if parentenvvar is not None: > parentlock = encoding.environ.get(parentenvvar) > try: > + metadata = json.dumps({ > + 'cmd': self.ui.commandname, > + 'args': self.ui.args > + })
json requires commandname and args are valid unicode, but they aren't. It's 90% wrong to use the json module directly in Mercurial codebase. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel