Mercurial > hg-stable
changeset 20009:2802bedbd45f stable
strip: fix last unprotected mq reference (issue4097)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 14 Nov 2013 21:37:18 -0600 |
parents | 22154ec6fb8b |
children | cb466830826a |
files | hgext/strip.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/strip.py Sat Nov 09 10:21:20 2013 +0100 +++ b/hgext/strip.py Thu Nov 14 21:37:18 2013 -0600 @@ -51,7 +51,9 @@ if update: checklocalchanges(repo, force=force) urev, p2 = repo.changelog.parents(revs[0]) - if p2 != nullid and p2 in [x.node for x in repo.mq.applied]: + if (util.safehasattr(repo, 'mq') and + p2 != nullid + and p2 in [x.node for x in repo.mq.applied]): urev = p2 hg.clean(repo, urev) repo.dirstate.write()