Page MenuHomePhabricator

update: add --abort option in hg update command (issue4404)
Needs RevisionPublic

Authored by khanchi97 on Jan 3 2020, 10:05 AM.

Details

Reviewers
mharbison72
Group Reviewers
hg-reviewers
Summary

Here is, what --abort option is basically doing:

  1. hg resolve --unmark, then
  2. hg resolve --all --tool :local
  3. hg up <original ctx> --tool :local

Where,
step 1) is to mark all the files conflicted as unresolved (marking *all*
files to make sure that it also mark the files which might have been
resolved by user in meantime)

step 2) resolve all the conflicting files using --tool :local

step 3) update to the revision where it was checkedout before running the
hg update, using --tool :local

Use of --tool :local while updating to old revision (step3) make sure that
it will not hit merge conflict at the time of update. And since we are using
the same tool (:local) as we used at the time of resolution (step2) it makes
sure that we have exact changes in working directory as it was before IIUC.

Added tests demonstrate the behaviour of new flag.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

khanchi97 created this revision.Jan 3 2020, 10:05 AM
mharbison72 requested changes to this revision.Jan 4 2020, 1:59 AM
mharbison72 added a subscriber: mharbison72.

This looks like a respin of D6735. Can you take a look at my comments in there about subrepos, and incorporate the appropriate tests? (I also didn't side by side compare the existing tests, so I'm not sure if there are things tested in that revision that aren't tested here.)

This revision now requires changes to proceed.Jan 4 2020, 1:59 AM