Commit Graph

7 Commits

Author SHA1 Message Date
Durham Goode
4cecb62eb2 Update tests 2015-10-26 15:10:59 -07:00
Durham Goode
6347babe11 fbhistedit: add execr action
Summary:
Adds an xr/execr action that executes the command relative to the
current working directory. This allows our users to run 'arc diff' and pick up
whatever the current arc project is (instead of whatever arc project is at the
root of the repository).

Test Plan: Added a test

Reviewers: davidsp, #sourcecontrol, lcharignon

Reviewed By: #sourcecontrol, lcharignon

Subscribers: rmcelroy, lcharignon

Differential Revision: https://phabricator.fb.com/D2311298

Tasks: 7795286
2015-08-04 10:55:33 -07:00
Durham Goode
32627292e9 fbhistedit: reapply the backed out change
Now that we've rolled out new rpms everywhere, we can redo this change.
2015-08-04 23:10:59 -07:00
Durham Goode
dc196e2b2d fbhistedit: backout 192e9fd62d3c since the tests aren't passing 2015-08-04 10:08:04 -07:00
Durham Goode
17b48c71b2 fbhistedit: add more test cases for histedit
Summary:
This is testing more failing case involving command creating obsmarkers during interruption.

More corner case testing could be added, but this is a good start.

Test Plan: test crash before update of core. Properly pass with the series current in review on mercurial-devel

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.fb.com/D2307305
2015-07-31 15:53:16 -07:00
Durham Goode
634cdaf0a5 histedit: fix --continue with exec
Summary:
--continue was pretty broken before, in several ways:

1) It popped the rule after the 'exec'. I'm pretty certain this meant that rule
wasn't even running (two exec's in a row definitely weren't running).

2) 'exec' as the last step of the histedit would make it unrecoverable since
bootstrapcontinue tried to pop an empty list (because it popped the entry
ahead, see #1).

3) The replacements list it built associated any new commits from the exec with
the following commit instead of the previous. I just fixed this by not creating
any replacements in the exec --continue case, since it's currently not possible
to look backwards at what the original hash was.

4) That repo lock wasn't actually being released when doing further exec's in a
continue/abort.  Upstream histedit creates a new histedit state object that
doesn't contain the actual locks, so we weren't actually unlocking it.


The fix is to most of this is to just delete all the copy/paste and make
--continue/--abort literally do nothing special when recovering from an exec.
If there are still pending changes, we just abort and tell people to fix it.

I sent a fix upstream to fix the locking issue.

Test Plan: Added tests

Reviewers: mitrandir, davidsp, sid0, rmcelroy, ericsumner

Differential Revision: https://phabricator.fb.com/D1853944
2015-02-17 20:04:40 -08:00
David Soria Parra
260cef360d fbhistedit: add x/exec command
Summary:
Add an execute command. This works similar to git's exec. However this
patch is a bit hacky but I want to get a first version out to our users. We have
to change some parts in histedit to make it easier to hook into
bootstrapcontinue and verifyrules. At the moment we can't get around copying
the implementation. Also need to add tests for obsolence.

Test Plan: Run tests, see it works.

Reviewers: pyd, sid0, durham

Reviewed By: durham

Subscribers: akushner, rmcelroy

Differential Revision: https://phabricator.fb.com/D1611838
2014-10-11 20:47:31 -07:00