Mercurial > hg
diff mercurial/hg.py @ 45942:89a2afe31e82
formating: upgrade to black 20.8b1
This required a couple of small tweaks to un-confuse black, but now it
works. Big formatting changes come from:
* Dramatically improved collection-splitting logic upstream
* Black having a strong (correct IMO) opinion that """ is better than '''
Differential Revision: https://phab.mercurial-scm.org/D9430
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Fri, 27 Nov 2020 17:03:29 -0500 |
parents | d68618954ade |
children | 59fa3890d40a |
line wrap: on
line diff
--- a/mercurial/hg.py Fri Nov 27 17:00:00 2020 -0500 +++ b/mercurial/hg.py Fri Nov 27 17:03:29 2020 -0500 @@ -243,7 +243,7 @@ def defaultdest(source): - '''return default destination of clone if none is given + """return default destination of clone if none is given >>> defaultdest(b'foo') 'foo' @@ -257,7 +257,7 @@ '' >>> defaultdest(b'http://example.org/foo/') 'foo' - ''' + """ path = util.url(source).path if not path: return b'' @@ -333,7 +333,7 @@ def _prependsourcehgrc(repo): - """ copies the source repo config and prepend it in current repo .hg/hgrc + """copies the source repo config and prepend it in current repo .hg/hgrc on unshare. This is only done if the share was perfomed using share safe method where we share config of source in shares""" srcvfs = vfsmod.vfs(repo.sharedpath) @@ -443,10 +443,10 @@ def copystore(ui, srcrepo, destpath): - '''copy files from store of srcrepo in destpath + """copy files from store of srcrepo in destpath returns destlock - ''' + """ destlock = None try: hardlink = None @@ -517,7 +517,12 @@ for r in rev: with srcpeer.commandexecutor() as e: remoterevs.append( - e.callcommand(b'lookup', {b'key': r,}).result() + e.callcommand( + b'lookup', + { + b'key': r, + }, + ).result() ) revs = remoterevs @@ -751,7 +756,10 @@ try: with srcpeer.commandexecutor() as e: rootnode = e.callcommand( - b'lookup', {b'key': b'0',} + b'lookup', + { + b'key': b'0', + }, ).result() if rootnode != node.nullid: @@ -900,7 +908,12 @@ for rev in revs: with srcpeer.commandexecutor() as e: remoterevs.append( - e.callcommand(b'lookup', {b'key': rev,}).result() + e.callcommand( + b'lookup', + { + b'key': rev, + }, + ).result() ) revs = remoterevs @@ -974,7 +987,10 @@ if update is not True: with srcpeer.commandexecutor() as e: checkout = e.callcommand( - b'lookup', {b'key': update,} + b'lookup', + { + b'key': update, + }, ).result() uprev = None @@ -1176,7 +1192,10 @@ def merge( - ctx, force=False, remind=True, labels=None, + ctx, + force=False, + remind=True, + labels=None, ): """Branch merge with node, resolving changes. Return true if any unresolved conflicts."""