Commit Graph

2 Commits

Author SHA1 Message Date
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