changeset 37268: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 923362010525
children de4849b67fe0
files mercurial/subrepo.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Tue Apr 03 00:12:29 2018 +0530
+++ b/mercurial/subrepo.py	Mon Apr 02 08:43:08 2018 -0700
@@ -603,7 +603,7 @@
 
     @annotatesubrepoerror
     def phase(self, state):
-        return self._repo[state].phase()
+        return self._repo[state or '.'].phase()
 
     @annotatesubrepoerror
     def remove(self):