Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 37266:32857300846c
subrepo: use repo['.'] instead of repo['']
The "state" value (a revision) passed to abstractsubrepo.phase() can
be '' to represent the currently checked out revisions. Let's convert
that to the more common '.'.
I think this is the last of use of repo['.'] in core.
Differential Revision: https://phab.mercurial-scm.org/D3019
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 02 Apr 2018 08:43:08 -0700 |
parents | 0348c778bf70 |
children | 14cd5290c4e6 |
comparison
equal
deleted
inserted
replaced
37265:923362010525 | 37266:32857300846c |
---|---|
601 return self._repo['.'].hex() # different version checked out | 601 return self._repo['.'].hex() # different version checked out |
602 return node.hex(n) | 602 return node.hex(n) |
603 | 603 |
604 @annotatesubrepoerror | 604 @annotatesubrepoerror |
605 def phase(self, state): | 605 def phase(self, state): |
606 return self._repo[state].phase() | 606 return self._repo[state or '.'].phase() |
607 | 607 |
608 @annotatesubrepoerror | 608 @annotatesubrepoerror |
609 def remove(self): | 609 def remove(self): |
610 # we can't fully delete the repository as it may contain | 610 # we can't fully delete the repository as it may contain |
611 # local-only history | 611 # local-only history |