comparison mercurial/subrepo.py @ 41759:aaad36b88298

cleanup: use () to wrap long lines instead of \ This is a little less brittle, and often helps indentation. In a surprising number of cases the entire cleanup was deleting the \, as the expression was *already* parenthesized in a workable way. Differential Revision: https://phab.mercurial-scm.org/D5993
author Augie Fackler <augie@google.com>
date Wed, 20 Feb 2019 19:28:51 -0500
parents 980e05204ed8
children f6540aba8e3e
comparison
equal deleted inserted replaced
41758:15d3facfa40a 41759:aaad36b88298
367 warnings.append(_("warning: removefiles not implemented (%s)") 367 warnings.append(_("warning: removefiles not implemented (%s)")
368 % self._path) 368 % self._path)
369 return 1 369 return 1
370 370
371 def revert(self, substate, *pats, **opts): 371 def revert(self, substate, *pats, **opts):
372 self.ui.warn(_('%s: reverting %s subrepos is unsupported\n') \ 372 self.ui.warn(_('%s: reverting %s subrepos is unsupported\n')
373 % (substate[0], substate[2])) 373 % (substate[0], substate[2]))
374 return [] 374 return []
375 375
376 def shortid(self, revid): 376 def shortid(self, revid):
377 return revid 377 return revid
378 378
695 if inrepo: 695 if inrepo:
696 urepo = repo.unfiltered() 696 urepo = repo.unfiltered()
697 ctx = urepo[revision] 697 ctx = urepo[revision]
698 if ctx.hidden(): 698 if ctx.hidden():
699 urepo.ui.warn( 699 urepo.ui.warn(
700 _('revision %s in subrepository "%s" is hidden\n') \ 700 _('revision %s in subrepository "%s" is hidden\n')
701 % (revision[0:12], self._path)) 701 % (revision[0:12], self._path))
702 repo = urepo 702 repo = urepo
703 hg.updaterepo(repo, revision, overwrite) 703 hg.updaterepo(repo, revision, overwrite)
704 704
705 @annotatesubrepoerror 705 @annotatesubrepoerror
1785 1785
1786 if diffopts.ignorews: 1786 if diffopts.ignorews:
1787 cmd.append('--ignore-all-space') 1787 cmd.append('--ignore-all-space')
1788 if diffopts.ignorewsamount: 1788 if diffopts.ignorewsamount:
1789 cmd.append('--ignore-space-change') 1789 cmd.append('--ignore-space-change')
1790 if self._gitversion(self._gitcommand(['--version'])) >= (1, 8, 4) \ 1790 if (self._gitversion(self._gitcommand(['--version'])) >= (1, 8, 4)
1791 and diffopts.ignoreblanklines: 1791 and diffopts.ignoreblanklines):
1792 cmd.append('--ignore-blank-lines') 1792 cmd.append('--ignore-blank-lines')
1793 1793
1794 cmd.append(node1) 1794 cmd.append(node1)
1795 if node2: 1795 if node2:
1796 cmd.append(node2) 1796 cmd.append(node2)