@@ 86,7 86,10 @@ class Guestrepo(object):
if guestctx.bookmarks():
json_dict['bookmarks'] = '/'.join(guestctx.bookmarks())
- current_bookmark = bookmarks.readcurrent(guestrepo)
+ try:
+ current_bookmark = bookmarks.readcurrent(guestrepo)
+ except AttributeError:
+ current_bookmark = bookmarks.readactive(guestrepo)
if current_bookmark:
json_dict['current_bookmark'] = current_bookmark
@@ 341,7 341,11 @@ def summary(ui, repo, **opts):
if bmarks:
output.append( '/'.join(bmarks) )
- currentbookmark = bookmarks.readcurrent(guestrepo)
+ try:
+ currentbookmark = bookmarks.readcurrent(guestrepo)
+ except AttributeError:
+ currentbookmark = bookmarks.readactive(guestrepo)
+
if currentbookmark:
output.append('*' + currentbookmark)
@@ 881,8 885,11 @@ def getstate(ui, repo, guests, keep=Fals
config = conf.load_conf_as_kv_pair(repo['.'])
for guest in filterwarnguests(ui, guests):
guestrepo = hg.repository(ui, guest.root, create=False)
- guestctx = guestrepo['.']
- gueststate = guestctx.hex()
+ try:
+ gueststate = guestrepo['.'].hex()
+ except:
+ gueststate = guestrepo.csid
+
# we try to see if we can keep the previous saved state
if keep:
guestconfig = config.get(guest.configpath, None)
@@ 972,7 979,10 @@ class guestrepo(object):
if guestctx.bookmarks():
json_dict['bookmarks'] = '/'.join(guestctx.bookmarks())
- current_bookmark = bookmarks.readcurrent(guestrepo)
+ try:
+ current_bookmark = bookmarks.readcurrent(guestrepo)
+ except AttributeError:
+ currentbookmark = bookmarks.readactive(guestrepo)
if current_bookmark:
json_dict['current_bookmark'] = current_bookmark