Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/subrepo.py @ 43117:8ff1ecfadcd1
cleanup: join string literals that are already on one line
Thanks to Kyle for noticing this and for providing the regular
expression to run on the codebase.
This patch has been reviewed by the test suite and they approved of
it.
# skip-blame: fallout from mass reformatting
Differential Revision: https://phab.mercurial-scm.org/D7028
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 08 Oct 2019 15:06:18 -0700 |
parents | d783f945a701 |
children | 9f70512ae2cf |
comparison
equal
deleted
inserted
replaced
43116:defabf63e969 | 43117:8ff1ecfadcd1 |
---|---|
1230 | 1230 |
1231 @annotatesubrepoerror | 1231 @annotatesubrepoerror |
1232 def remove(self): | 1232 def remove(self): |
1233 if self.dirty(): | 1233 if self.dirty(): |
1234 self.ui.warn( | 1234 self.ui.warn( |
1235 _(b'not removing repo %s because ' b'it has changes.\n') | 1235 _(b'not removing repo %s because it has changes.\n') |
1236 % self._path | 1236 % self._path |
1237 ) | 1237 ) |
1238 return | 1238 return |
1239 self.ui.note(_(b'removing subrepo %s\n') % self._path) | 1239 self.ui.note(_(b'removing subrepo %s\n') % self._path) |
1240 | 1240 |
1570 ) | 1570 ) |
1571 # try only origin: the originally cloned repo | 1571 # try only origin: the originally cloned repo |
1572 self._gitcommand([b'fetch']) | 1572 self._gitcommand([b'fetch']) |
1573 if not self._githavelocally(revision): | 1573 if not self._githavelocally(revision): |
1574 raise error.Abort( | 1574 raise error.Abort( |
1575 _(b'revision %s does not exist in subrepository ' b'"%s"\n') | 1575 _(b'revision %s does not exist in subrepository "%s"\n') |
1576 % (revision, self._relpath) | 1576 % (revision, self._relpath) |
1577 ) | 1577 ) |
1578 | 1578 |
1579 @annotatesubrepoerror | 1579 @annotatesubrepoerror |
1580 def dirty(self, ignoreupdate=False, missing=False): | 1580 def dirty(self, ignoreupdate=False, missing=False): |
1628 _sanitize(self.ui, self.wvfs, b'.git') | 1628 _sanitize(self.ui, self.wvfs, b'.git') |
1629 | 1629 |
1630 def rawcheckout(): | 1630 def rawcheckout(): |
1631 # no branch to checkout, check it out with no branch | 1631 # no branch to checkout, check it out with no branch |
1632 self.ui.warn( | 1632 self.ui.warn( |
1633 _(b'checking out detached HEAD in ' b'subrepository "%s"\n') | 1633 _(b'checking out detached HEAD in subrepository "%s"\n') |
1634 % self._relpath | 1634 % self._relpath |
1635 ) | 1635 ) |
1636 self.ui.warn( | 1636 self.ui.warn( |
1637 _(b'check out a git branch if you intend ' b'to make changes\n') | 1637 _(b'check out a git branch if you intend to make changes\n') |
1638 ) | 1638 ) |
1639 checkout([b'-q', revision]) | 1639 checkout([b'-q', revision]) |
1640 | 1640 |
1641 if revision not in rev2branch: | 1641 if revision not in rev2branch: |
1642 rawcheckout() | 1642 rawcheckout() |
1820 def remove(self): | 1820 def remove(self): |
1821 if self._gitmissing(): | 1821 if self._gitmissing(): |
1822 return | 1822 return |
1823 if self.dirty(): | 1823 if self.dirty(): |
1824 self.ui.warn( | 1824 self.ui.warn( |
1825 _(b'not removing repo %s because ' b'it has changes.\n') | 1825 _(b'not removing repo %s because it has changes.\n') |
1826 % self._relpath | 1826 % self._relpath |
1827 ) | 1827 ) |
1828 return | 1828 return |
1829 # we can't fully delete the repository as it may contain | 1829 # we can't fully delete the repository as it may contain |
1830 # local-only history | 1830 # local-only history |