This is an archive of the discontinued Mercurial Phabricator instance.

merge: add `--abort` flag which can abort the merge
ClosedPublic

Authored by pulkit on Jan 8 2018, 9:49 AM.

Details

Summary

Currently we don't have a good functionality to abort the merge and tell user to
do hg update -C . which can leads to different results if user missed the '.'
and moreover does not align with other abort functionalities like rebase, shelve
etc.

This patch adds hg merge --abort which will abort the ongoing merge and take
us back to the chagneset where we started from. Works in both cases when merge
resulted in conflicts and when there were no conflicts.

.. feature::

A `--abort` flag to merge command to abort the ongoing merge.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Jan 8 2018, 9:49 AM
durin42 accepted this revision as: durin42.Jan 10 2018, 5:39 PM
durin42 added a subscriber: durin42.

I'm fine with this.

yuja added a subscriber: yuja.Jan 18 2018, 7:50 AM
yuja added inline comments.
mercurial/commands.py
3563

Dropped . in flight.

mercurial/hg.py
864

It seems ms.localctx is the public interface. Can you send a followup?

This revision was automatically updated to reflect the committed changes.