Page MenuHomePhabricator

Print out a confirmation message after creating or amending commits
Open, LowPublic

Description

  • Mercurial 3.3
  • .arcconfig: "history.immutable" : false
  • Editor: nano
  1. Make local changes to working directory
  2. Create differential revision with arc diff
  3. Update to master bookmark, leaving diff changes in separate bookmark.
  4. Make more local changes to working directory.
  5. Start arc diff --update Dxxx
  6. When prompted to supply description of change in nano, exit nano without writing out changes
  7. Arc completes with: Usage Exception: User aborted the workflow.
  8. Examine state of working directory: hg stat
  9. The changes in the local working directory were amended to the bookmark for Dxxx.

Event Timeline

cspeckmim raised the priority of this task from to Needs Triage.
cspeckmim updated the task description. (Show Details)
cspeckmim added a subscriber: cspeckmim.

I'm having trouble following your reproduction instructions. I hit various errors around step (2) and I'm not sure exactly what you're doing. Can you give me a sequence of commands, or a transcript which reproduces the issue where you add --trace to each command you run?

I attached the output:

One other thing I noticed when trying to reproduce my original workflow, I did a normal, new arc diff and when I listed myself as the reviewer arc failed with an exception, saying that the author of a revision couldn't be the reviewer. But when that exception occurred, a commit had still been made.

As a user, I would not expect a commit to have been created if an arc command fails. Trying to reason about what sorcery is done inside arc diff I could understand needing a commit with changeset id to use.

When you answer affirmatively to this prompt:

Do you want to create a new commit with this change? [y/N] y

...we immediately make the commit, regardless of what else happens. Is that unexpected?

We can not continue without making the commit: for example, we can't know what the hash of the commit will be unless we make it, so we can't build a diff, because we want to include the commit hash in the diff metadata. In general, any time we ask you to amend or create a commit, we will take the action immediately after you confirm it (e.g., often because later steps expect to operate on a range of commits, not a range of commits plus loose changes in the working directory).

Yea I think I realized that while running through the process again. Training issue? Thanks for looking at this.

One thing we could do is confirm the commit after we create or amend it, so you'd get this:

$ arc diff
...
Do you want to create a new commit with this change? [y/N] y
...
Created commit abcdef1234 from changes in working copy.
...
(eventually)
Usage Exception: User aborted the workflow.

That seems a little more clear to me.

epriestley renamed this task from Changes in working directory are applied to existing local changeset when canceling the "arc diff --update" process. to Print out a confirmation message after creating or amending commits.Mar 5 2015, 11:16 PM
epriestley triaged this task as Low priority.
epriestley added a project: Git.
eadler added a project: Restricted Project.Aug 5 2016, 5:24 PM