From patchwork Mon Feb 25 03:52:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D5997: mq: disable qrecord during histedit (issue5981) From: phabricator X-Patchwork-Id: 38924 Message-Id: <168349caf313c202e1ee3ef4a519ea4b@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Mon, 25 Feb 2019 03:52:59 +0000 navaneeth.suresh updated this revision to Diff 14233. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5997?vs=14176&id=14233 REVISION DETAIL https://phab.mercurial-scm.org/D5997 AFFECTED FILES hgext/record.py tests/test-qrecord.t CHANGE DETAILS To: navaneeth.suresh, #hg-reviewers Cc: yuja, mercurial-devel diff --git a/tests/test-qrecord.t b/tests/test-qrecord.t --- a/tests/test-qrecord.t +++ b/tests/test-qrecord.t @@ -422,3 +422,43 @@ $ hg diff --nodates $ cd .. + +qrecord should throw an error when histedit in process + + $ hg init issue5981 + $ cd issue5981 + $ cat >> $HGRCPATH < [extensions] + > histedit= + > mq= + > EOF + $ echo > a + $ hg ci -Am 'foo bar' + adding a + $ hg log + changeset: 0:ea55e2ae468f + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: foo bar + + $ hg histedit tip --commands - 2>&1 < edit ea55e2ae468f foo bar + > EOF + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + adding a + Editing (ea55e2ae468f), you may commit or record as needed now. + (hg histedit --continue to resume) + [1] + $ echo 'foo bar' > a + $ hg qrecord -d '0 0' -m aaa a.patch < y + > y + > n + > y + > y + > n + > EOF + abort: histedit in progress + (use 'hg histedit --continue' or 'hg histedit --abort') + [255] diff --git a/hgext/record.py b/hgext/record.py --- a/hgext/record.py +++ b/hgext/record.py @@ -119,6 +119,7 @@ overrides = {('experimental', 'crecord'): False} with ui.configoverride(overrides, 'record'): + cmdutil.checkunfinished(repo) cmdutil.dorecord(ui, repo, committomq, cmdsuggest, False, cmdutil.recordfilter, *pats, **opts)