comparison hgext/transplant.py @ 44452:9d2b2df2c2ba

cleanup: run pyupgrade on our source tree to clean up varying things Built with: hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/**' | xargs pyupgrade --keep-percent-format --keep-extraneous-parens and then blackened. pyupgrade comes from https://github.com/asottile/pyupgrade with a patch to let me preserve extraneous parens (which we use for marking strings that shouldn't be translated), and lets us clean up a bunch of idioms that have cruftily accumulated over the years. # skip-blame no-op automated code cleanups Differential Revision: https://phab.mercurial-scm.org/D8255
author Augie Fackler <augie@google.com>
date Fri, 06 Mar 2020 13:27:41 -0500
parents d4c1501225c4
children 03726f5b6092
comparison
equal deleted inserted replaced
44449:ff72bd52d56a 44452:9d2b2df2c2ba
838 tp.resume(repo, source, opts) 838 tp.resume(repo, source, opts)
839 return 839 return
840 840
841 tf = tp.transplantfilter(repo, source, p1) 841 tf = tp.transplantfilter(repo, source, p1)
842 if opts.get(b'prune'): 842 if opts.get(b'prune'):
843 prune = set( 843 prune = {
844 source[r].node() 844 source[r].node()
845 for r in scmutil.revrange(source, opts.get(b'prune')) 845 for r in scmutil.revrange(source, opts.get(b'prune'))
846 ) 846 }
847 matchfn = lambda x: tf(x) and x not in prune 847 matchfn = lambda x: tf(x) and x not in prune
848 else: 848 else:
849 matchfn = tf 849 matchfn = tf
850 merges = pycompat.maplist(source.lookup, opts.get(b'merge', ())) 850 merges = pycompat.maplist(source.lookup, opts.get(b'merge', ()))
851 revmap = {} 851 revmap = {}