[PATCH phases] phases: prevent mq to qimport immutable change
Augie Fackler
durin42 at gmail.com
Wed Dec 21 17:31:30 CST 2011
On Dec 21, 2011, at 4:49 PM, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1324507638 -3600
> # Node ID 70dd963d0d333148157e6ddb5540ce8036d019a3
> # Parent 53c82dfce4718c3441f249ca96985ba0ac962faf
> phases: prevent mq to qimport immutable change.
What about with -f?
>
> diff --git a/hgext/mq.py b/hgext/mq.py
> --- a/hgext/mq.py
> +++ b/hgext/mq.py
> @@ -1765,6 +1765,9 @@
>
> diffopts = self.diffopts({'git': git})
> for r in rev:
> + if not repo[r].mutable():
> + raise util.Abort(_('revision %d is not mutable') % r,
> + hint=_('see "hg help phases" for details'))
> p1, p2 = repo.changelog.parentrevs(r)
> n = repo.changelog.node(r)
> if p2 != nullrev:
> diff --git a/tests/test-mq-qimport-fail-cleanup.t b/tests/test-mq-qimport-fail-cleanup.t
> --- a/tests/test-mq-qimport-fail-cleanup.t
> +++ b/tests/test-mq-qimport-fail-cleanup.t
> @@ -32,3 +32,9 @@
>
> $ hg qseries
> b.patch
> +
> + $ hg pull -q -r 0 . # update phase
> + $ hg qimport -r 0
> + abort: revision 0 is not mutable
> + (see "hg help phases" for details)
> + [255]
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list