1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 08:58:55 +02:00
phorge-arcanist/src
durham 9963323b91 Make arc land for hg more robust to failures
Summary:
Adds error handling for several kinds of failure in arc land for
mercurial.  Previously it would often leave the repo in a confusing state
if something failed.

- Aborts the land if pull brings in a diverged 'onto' branch.
- Aborts the rebase if there is a conflict. This leaves the repo exactly as
it was before, so the user is not left with a half finished rebase.
- Don't delete the original non-squashed branch until the push succeeds.
- If the push fails, strip the temporary squashed commit. This leaves the
'onto' branch back on the latest commit from the server, and leaves the users
original nonsquashed branch around.
- Always leave the user back on their original branch after an error.

Test Plan:
Ran arc land:
- with pull causing a diverged 'onto' bookmark
- with the 'onto' bookmark already diverged
- with the rebase causing conflicts
- with a push that failed due to a commit hook
- with a successful land
- with a successful collapse and land

In all failure cases the repo was left exactly as it was before arc land,
except for the push-failed case, where the only change was that the branch
was correctly on top of the destination branch due to a successful rebase.

Used bookmark name "foo bar-gah" to test that crazy bookmark names still work.

Reviewers: epriestley, dschleimer, sid0

Reviewed By: epriestley

CC: nh, wez, bos, aran, Korvin

Differential Revision: https://secure.phabricator.com/D5394
2013-03-20 15:06:10 -07:00
..
configuration Respect British spelling also in arguments 2013-03-01 16:53:26 -08:00
difference Don't use absolute path in ArcanistDiffUtils 2013-03-14 09:14:50 -07:00
differential Delete license headers from files 2012-11-05 11:16:24 -08:00
docs Make the "this is technical documentation" message of "Arcanist Overview" more clear 2012-08-10 11:37:30 -07:00
events/constant Dispatch an event in arc land right before pushing a revision 2013-03-08 18:32:36 -08:00
exception Delete license headers from files 2012-11-05 11:16:24 -08:00
hgdaemon Fix dynamic string usage as safe input 2013-02-02 16:28:15 -08:00
infrastructure/testing Delete license headers from files 2012-11-05 11:16:24 -08:00
lint Improve error if python can't run pep8 2013-03-19 11:44:49 -07:00
parser Parsing rcsdiff -u 2013-03-14 06:15:42 -07:00
repository Ignore remote errors in parsing Mercurial log 2013-03-07 11:14:49 -08:00
unit Document parameters 2013-03-06 13:47:05 -08:00
workflow Make arc land for hg more robust to failures 2013-03-20 15:06:10 -07:00
workingcopyidentity Add --skip-arcconfig option 2013-01-30 16:26:41 -08:00
__phutil_library_init__.php Delete license headers from files 2012-11-05 11:16:24 -08:00
__phutil_library_map__.php Render unit results progressively 2013-02-28 15:33:21 -08:00