Bug 3955 - Add "operation in progress" check to block inappropriate commands
Summary: Add "operation in progress" check to block inappropriate commands
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 2.6
Hardware: All All
: normal feature
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-05 17:48 UTC by Bryan O'Sullivan
Modified: 2013-08-02 00:45 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bryan O'Sullivan 2013-06-05 17:48 UTC
We have a number of situations in which a single logical operation spans multiple commands, or a single command can block for a long time (perhaps waiting for user input), and where it would be helpful for "incompatible" operations to bail if run at the wrong time.

For example, partway through a rebase, we can run across a conflict that causes the rebase to stop. Right now, we do nothing to prevent someone from issuing a commit or bisect, even though they'll both do weird things and leave the rebase unable to continue.
Comment 1 HG Bot 2013-07-25 01:45 UTC
Fixed by http://selenic.com/repo/hg/rev/894fd1a7c533
Matt Mackall <mpm@selenic.com>
cmdutil: core functionality to block during multistep commands (issue3955)

This adds a registration point and check functions that will allow
commands to check if multistep operations like an interrupted graft or
rebase are in progress before proceeding.

(please test the fix)
Comment 2 HG Bot 2013-07-25 01:45 UTC
Fixed by http://selenic.com/repo/hg/rev/e24531a23ae4
Matt Mackall <mpm@selenic.com>
update: clear any clearable unfinished operations (issue3955)

Unclearable operations will cause an abort.

(please test the fix)
Comment 3 HG Bot 2013-07-25 01:45 UTC
Fixed by http://selenic.com/repo/hg/rev/4fed15d4c5aa
Matt Mackall <mpm@selenic.com>
commands: add checks for unfinished operations (issue3955)

commands checked:
  backout
  bisect
  commit
  graft
  import

(please test the fix)
Comment 4 HG Bot 2013-07-25 01:45 UTC
Fixed by http://selenic.com/repo/hg/rev/e5a5790a3185
Matt Mackall <mpm@selenic.com>
rebase: add checkunfinished support (issue3955)

(please test the fix)
Comment 5 HG Bot 2013-07-25 01:45 UTC
Fixed by http://selenic.com/repo/hg/rev/11664641fbad
Matt Mackall <mpm@selenic.com>
histedit: add checkunfinished support (issue3955)

The tests contain a couple corner cases where workarounds are now
required. Strictly speaking, these are behavior regressions, but of an
extremely obscure and marginal sort. Commits or updates in the middle
of a histedit would have almost always been fairly serious user error.

(please test the fix)
Comment 6 HG Bot 2013-07-25 01:45 UTC
Fixed by http://selenic.com/repo/hg/rev/7c0bb2b75aa8
Matt Mackall <mpm@selenic.com>
transplant: add checkunfinished (issue3955)

Nobody loves transplant anymore, but it was the first command to have
a --continue flag.

(please test the fix)
Comment 7 HG Bot 2013-07-25 01:45 UTC
Fixed by http://selenic.com/repo/hg/rev/ee1af0f33d0e
Matt Mackall <mpm@selenic.com>
mq: add checkunfinished support (issue3955)

(please test the fix)
Comment 8 HG Bot 2013-07-25 03:45 UTC
Fixed by http://selenic.com/repo/hg/rev/e012a20061ed
Matt Mackall <mpm@selenic.com>
record: add checkunfinished support (issue3955)

(please test the fix)