Mercurial > evolve
comparison hgext3rd/evolve/cmdrewrite.py @ 4403:8b3172c8f753
evolve: unindent some lines caught by flake8
The message was: "E117 over-indented".
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 13 Feb 2019 21:39:10 +0800 |
parents | 054ff759f2fd |
children | 8ff5e557432a |
comparison
equal
deleted
inserted
replaced
4402:cdc095c32e01 | 4403:8b3172c8f753 |
---|---|
166 _writectxmetadata(repo, old, fp) | 166 _writectxmetadata(repo, old, fp) |
167 matcher = scmutil.match(old, pats, opts) | 167 matcher = scmutil.match(old, pats, opts) |
168 for chunk, label in patch.diffui(repo, p1.node(), old.node(), | 168 for chunk, label in patch.diffui(repo, p1.node(), old.node(), |
169 match=matcher, | 169 match=matcher, |
170 opts=diffopts): | 170 opts=diffopts): |
171 fp.write(chunk) | 171 fp.write(chunk) |
172 newnode = _editandapply(ui, repo, pats, old, p1, fp, diffopts) | 172 newnode = _editandapply(ui, repo, pats, old, p1, fp, diffopts) |
173 if newnode == old.node(): | 173 if newnode == old.node(): |
174 raise error.Abort(_("nothing changed")) | 174 raise error.Abort(_("nothing changed")) |
175 metadata = {} | 175 metadata = {} |
176 if opts.get('note'): | 176 if opts.get('note'): |
202 # write rest of the files in the patch | 202 # write rest of the files in the patch |
203 restmatcher = scmutil.match(old, [], opts={'exclude': pats}) | 203 restmatcher = scmutil.match(old, [], opts={'exclude': pats}) |
204 for chunk, label in patch.diffui(repo, p1.node(), old.node(), | 204 for chunk, label in patch.diffui(repo, p1.node(), old.node(), |
205 match=restmatcher, | 205 match=restmatcher, |
206 opts=diffopts): | 206 opts=diffopts): |
207 afp.write(chunk) | 207 afp.write(chunk) |
208 | 208 |
209 user_patch = afp.getvalue() | 209 user_patch = afp.getvalue() |
210 if not user_patch: | 210 if not user_patch: |
211 raise error.Abort(_("empty patch file, amend aborted")) | 211 raise error.Abort(_("empty patch file, amend aborted")) |
212 if user_patch == previous_patch: | 212 if user_patch == previous_patch: |
578 diffopts.nodates = True | 578 diffopts.nodates = True |
579 diffopts.git = True | 579 diffopts.git = True |
580 fp = stringio() | 580 fp = stringio() |
581 for chunk, label in patch.diffui(repo, tempnode, old.node(), None, | 581 for chunk, label in patch.diffui(repo, tempnode, old.node(), None, |
582 opts=diffopts): | 582 opts=diffopts): |
583 fp.write(chunk) | 583 fp.write(chunk) |
584 | 584 |
585 fp.seek(0) | 585 fp.seek(0) |
586 newnode = _patchtocommit(ui, repo, old, fp) | 586 newnode = _patchtocommit(ui, repo, old, fp) |
587 # creating obs marker temp -> () | 587 # creating obs marker temp -> () |
588 obsolete.createmarkers(repo, [(repo[tempnode], ())], operation="uncommit") | 588 obsolete.createmarkers(repo, [(repo[tempnode], ())], operation="uncommit") |
609 operation='discard') | 609 operation='discard') |
610 if not chunks: | 610 if not chunks: |
611 raise error.Abort(_("nothing selected to uncommit")) | 611 raise error.Abort(_("nothing selected to uncommit")) |
612 fp = stringio() | 612 fp = stringio() |
613 for c in chunks: | 613 for c in chunks: |
614 c.write(fp) | 614 c.write(fp) |
615 | 615 |
616 fp.seek(0) | 616 fp.seek(0) |
617 oldnode = node.hex(old.node())[:12] | 617 oldnode = node.hex(old.node())[:12] |
618 message = 'temporary commit for uncommiting %s' % oldnode | 618 message = 'temporary commit for uncommiting %s' % oldnode |
619 tempnode = _patchtocommit(ui, repo, old, fp, message, oldnode) | 619 tempnode = _patchtocommit(ui, repo, old, fp, message, oldnode) |