--- a/hgext/shelve.py Mon Oct 07 11:45:01 2013 -0700
+++ b/hgext/shelve.py Wed Oct 09 14:15:20 2013 -0700
@@ -156,11 +156,14 @@
# check modified, added, removed, deleted only
for flist in repo.status(match=match)[:4]:
shelvedfiles.extend(flist)
- saved, repo.mq.checkapplied = repo.mq.checkapplied, False
+ hasmq = util.safehasattr(repo, 'mq')
+ if hasmq:
+ saved, repo.mq.checkapplied = repo.mq.checkapplied, False
try:
return repo.commit(message, user, opts.get('date'), match)
finally:
- repo.mq.checkapplied = saved
+ if hasmq:
+ repo.mq.checkapplied = saved
if parent.node() != nullid:
desc = parent.description().split('\n', 1)[0]