Fix missing tags in output

The reason is a Mercurial API change:

Before, repo[None] returned the checked-out changectx.
Now repo[None] returns the workingctx (which doesn't have tags),
and repo['.'] returns the checked-out changectx.

This fixes changes guestctx to repo['.']. Where the working directory
parents are needed, a separate repo[None] lookup is made.
2 files changed, 6 insertions(+), 7 deletions(-)

M guestrepo/grconfig.py
M guestrepo/guestrepo.py
M guestrepo/grconfig.py +2 -2
@@ 70,14 70,14 @@ class Guestrepo(object):
         Output all of the metadata associated with a Guestrepo as a dict
         '''
         guestrepo = self.get_repo(ui)
-        guestctx = guestrepo[None]
+        guestctx = guestrepo['.']  # The checked-out commit
 
         # Set up GR attributes in JSON
         json_dict = {'path' : self.canonpath}
         json_dict['branch'] = guestctx.branch()
         json_dict['remote_name'] = self.name
 
-        parents = guestctx.parents()
+        parents = guestrepo[None].parents()  # The working directory parents
         json_dict['id'] = '+'.join(cset.hex() for cset in parents)[:12]
 
         if guestctx.tags():

          
M guestrepo/guestrepo.py +4 -5
@@ 330,12 330,12 @@ def summary(ui, repo, **opts):
     else:
         for guest in filterwarnguests(ui, guests):
             guestrepo = hg.repository(ui, guest.root, create=False)
-            guestctx = guestrepo[None]
+            guestctx = guestrepo['.']  # The checked-out commit
+            parents = guestrepo[None].parents()  # The working dir parents
 
             output = [guest.canonpath, "(%s)" % guestctx.branch()]
 
             if opts.get('id'):
-                parents = guestctx.parents()
                 id = '+'.join([str(p) for p in parents])
                 output.append(str(id))
 

          
@@ 343,7 343,6 @@ def summary(ui, repo, **opts):
                 if not SUPPORTS_PHASES:
                     msg = 'your version of Mercurial does not support phases'
                     raise util.Abort(msg)
-                parents = guestctx.parents()
                 phases = '+'.join(p.phasestr() for p in parents)
                 output.append(str(phases))
 

          
@@ 592,14 591,14 @@ class guestrepo(object):
         Output all of the metadata associated with a Guestrepo as a dict
         '''
         guestrepo = hg.repository(ui, self.root, create=False)
-        guestctx = guestrepo[None]
+        guestctx = guestrepo['.']  # The checked-out commit
 
         # Set up GR attributes in JSON
         json_dict = {'path' : self.canonpath}
         json_dict['branch'] = guestctx.branch()
         json_dict['remote_name'] = self.name
 
-        parents = guestctx.parents()
+        parents = guestrepo[None].parents()  # The working directory parents
         json_dict['id'] = (' '.join(['+'.join([node.hex(p.node()) for p in parents]), ]))[:12]
 
         if guestctx.tags():