Page MenuHomePhabricator

patch: stop aborting when add/rename/copy files on --interactive (issue5727)
Needs RevisionPublic

Authored by navaneeth.suresh on Mar 3 2019, 2:24 PM.


Group Reviewers

issue5727 was reported specifically for mq on using qrefresh. On investigating further,
I realized that it was a check in that resulting in the abort. I may be wrong.
On interactive mode, gp.mode was not None. I added a check in _applydiff() not to
abort when gp.mode is None or ui.interactive is True.

Diff Detail

rHG Mercurial
Lint Skipped
Unit Tests Skipped

Event Timeline

navaneeth.suresh retitled this revision from patch: stop aborting when ADD/RENAME/COPY files on --interactive (issue5727) to patch: stop aborting when add/rename/copy files on --interactive (issue5727).Mar 14 2019, 2:21 AM
navaneeth.suresh updated this revision to Diff 14492.
pulkit added a subscriber: pulkit.Mar 15 2019, 9:39 AM
pulkit added inline comments.

does this prompt ended here? it didn't show changes in 'foo.h'?


i think that's usual here as the file foo.h is empty. i have the following case running successfully with this patch:

$ echo foo > foo.h
$ hg add foo.h
$ hg qrefresh -i --config ui.interactive=true <<EOF
> y
> y
> n
diff --git a/foo.h b/foo.h
new file mode 100644
examine changes to 'foo.h'? [Ynesfdaq?] y

@@ -0,0 +1,1 @@
record this change to 'foo.h'? [Ynesfdaq?] y
pulkit added inline comments.Mar 16 2019, 7:01 PM

I don't see the output which asks for record this change to foo.h here in the test.


IIUC, the current scenario is running into abort: cannot create foo.h: destination already exists if an empty file has been added. This means that the test case in my previous comment works fine without running into an error. I tested with hg (version 4.9+3-b70b7c585ee9) by adding a file with contents by running one command after another in my command line and got the same output. The interactive UI prompted me with only two queries. For an empty file, it should be only one as there are no changes to record. This might be the case for qrefresh. I'm not sure about this though.

Gentle ping for review.

This patch breaks test-split.t - could you take a look?

baymax requested changes to this revision.Jan 24 2020, 12:32 PM

There seems to have been no activities on this Diff for the past 3 Months.

By policy, we are automatically moving it out of the need-review state.

Please, move it back to need-review without hesitation if this diff should still be discussed.


This revision now requires changes to proceed.Jan 24 2020, 12:32 PM