Commit Graph

22 Commits

Author SHA1 Message Date
timeless@gmail.com
cd35432d91 spelling: fix numerous spelling errors 2016-04-04 12:48:01 -07:00
Mateusz Kwapich
d0fb9884af fbhistedit: pass extra parameter to gethisteditcomment
Summary: api has changed upstream

Test Plan: tests

Reviewers: #sourcecontrol, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

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

Signature: t1:3120055:1459407683:a9f6be4df89aac9978d14cc876fb99383223ee86
2016-03-31 11:29:40 -07:00
Durham Goode
9aa661c2f9 fbhistedit: update to work with upstream histedit
Upstream has changed the way histedit works to use the @action decorator and to
allow custom built edit comments. Let's update to match that.
2016-01-20 13:40:15 -08:00
Laurent Charignon
da37a505a8 cleanup: fix whitespaces in expression and trailing whitespaces
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.

Test Plan: all tests pass

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2812015
2016-01-07 18:30:24 -08:00
Laurent Charignon
a42808982c cleanup: fix the "line too long" warnings
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.

Test Plan: all tests pass

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2811926
2016-01-07 18:30:24 -08:00
Laurent Charignon
b36541de7d cleanup: replace all the calls to util.Abort to error.Abort
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.

Test Plan: all tests pass like before

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2811837
2016-01-07 18:30:24 -08:00
Mateusz Kwapich
90e7845035 fbhistedit: make changes to pass tests with recent histedit changes
Summary:
 - use decorator to add action
 - add torule, tostate and verify methods
 - use actions objects instead of pairs in rebase -i code

Test Plan: the fbhistedit tests are passing

Reviewers: #sourcecontrol, ttung, ericsumner

Reviewed By: ericsumner

Subscribers: ericsumner

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

Tasks: 9539722

Signature: t1:2800161:1451939637:c46875133eed576eb418723b44321b1b52ed3e77
2016-01-04 12:39:25 -08:00
Mateusz Kwapich
646c769bb7 Add interactive rebase
Summary: The interactive rebase which is using new histedit base keyword underneath.

Test Plan: see tests

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: durham, rmcelroy

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

Signature: t1:2705834:1449024840:c29ee246492c5e7c9e595b65ba256e5326ef631d
2015-12-02 12:10:59 -08:00
Mateusz Kwapich
3a80387646 Fix the fbhistedit after core histedit API change
Summary: .

Test Plan: tests

Reviewers: ericsumner

Reviewed By: ericsumner

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

Signature: t1:2704702:1448920622:d9bd5a5c5100dc9d8f11844a49c2f79263d6a8bc
2015-11-30 14:33:25 -08:00
Mateusz Kwapich
2dabe2ed9f fbhistedit: Fix abort after stop
Summary:
replacements for the newly-picked node were not present in the
histedit state before successfully continuing which made --abort
unaware of them.

This isn't clean solution. But the stop command (with node) will cease to
exist in near future (it will be replaced by the normal pick and just "stop"
in following line for which we will have better solution). This should suffice
until then.

Test Plan:
test attached
tested manually too

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

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

Tasks: 9111207

Signature: t1:2661831:1447790670:a26ee58cacb77e6cf675a1e99d2eadcbffb684d9
2015-11-17 15:07:32 -08:00
Mateusz Kwapich
84c1720a00 fbhistedit: use user shell in histedit exec command
Summary:
This is hacky way of executing user shell in interactive mode so they get their aliases, bash functions, output coloring and more...

I put this behind config knob so if this doesn't work for user with very obscure shell they can always turn it off.

Test Plan: Tested it in my shell - used my shell aliases with exec (can't write unit tests since it's very environment specific - suggestions welcome).

Reviewers: ericsumner, rmcelroy, #sourcecontrol

Reviewed By: rmcelroy, #sourcecontrol

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

Tasks: 5852393

Signature: t1:2433238:1441961664:e4a9cb804dfb4f714278865e3abf370277836e5b
2015-09-10 22:53:28 -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
9b0613badc fbhistedit: wrap the loaded histedit
Summary:
Instead of wrapping the system histedit, lets wrap the one that was loaded by
mercurial. This makes it easier to test fbhistedit against development versions
of histedit.

Test Plan:
Ran a histedit with --config extensions.fbhistedit=/data/... --config
extensions.histedit=/data/... and verified fbhistedit wrapped the custom
histedit. Also ran the tests.

Reviewers: davidsp, rmcelroy, sid0, lcharignon, pyd

Differential Revision: https://phabricator.fb.com/D2040653
2015-05-01 15:06:09 -07:00
Durham Goode
5956293896 fbhistedit: switch the exec action to be a histeditaction
Summary:
Upstream histedit has moved all it's actions to classes. Let's do the same for
exec.

Test Plan: Ran tests

Reviewers: sid0, rmcelroy, lcharignon, ericsumner

Differential Revision: https://phabricator.fb.com/D2001833
2015-04-17 09:58:36 -07:00
Durham Goode
af69020c32 fbhistedit: switch the stop action to be a histeditaction
Summary:
Upstream histedit has moved all it's actions to classes. Let's do the same for
stop.

The hashes change because upstream changed graft to include a little more
information in the commit metadata.

Test Plan: Ran tests

Reviewers: rmcelroy, sid0, lcharignon, pyd, ericsumner

Differential Revision: https://phabricator.fb.com/D2001830
2015-04-17 08:59:23 -07:00
Durham Goode
3d34417493 fbhistedit: fix to match upstream apis 2015-03-13 09:33:57 -07:00
Ryan McElroy
f19c04580a Merge fbonly into default
Summary:
A ton of tests in the 'default' branch are broken, yet they all work in 'fbonly' (because that's what we test and push).

Let's give the world all of our goodness. Bleeding edge is where it's at.

Top of hg sl now looks like:

```
@    386a20  rmcelroy
|\   merge fbonly into default
| |
o |  a284c7  rmcelroy  D1880107  remote/@
| |  githelp: add: mention that record and crecord make commits
| |
| o  f4870a  sid0  remote/fbtip  fbonly
| |  crecord: update to latest default
```

Test Plan: run-tests.py actually works now

Reviewers: davidsp, ericsumner, mitrandir, akushner, durham, sid0

Reviewed By: durham

Subscribers: lcharignon, mpm, ps

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

Signature: t1:1883891:1425613263:8c199f339596384aa7d089154ef99eb982ecff87
2015-03-08 12:22:25 -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
cddc80fd98 fb-hgext: add docstrings for extensions
Summary:
Most of our internal extensions don't have any docstringa causing hg help
to show nothing. I think this is confusing, as we teach people to use hg help.
In particular for our extensions they won't find anything on the internet
but hg help won't help either. So let's add rudimentary help texts.

Also ensure that gitnode is properly documented in hg help revset.

Test Plan:
added extensions, checked hg help and hg help extension. Also
checked hg help revset for gitnode.

Reviewers: rmcelroy, durham, sid0, akushner

Differential Revision: https://phabricator.fb.com/D1645964
2014-10-28 23:06:11 -07:00
David Soria Parra
9333c05d2b fbhistedit: make stop compatible with hg tip
Summary: Make stop compatible with the new hg tip

Test Plan: run tests, worked.

Reviewers: pyd, durham, sid0

Reviewed By: sid0

Differential Revision: https://phabricator.fb.com/D1623384
2014-10-16 13:58:47 -07: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
David Soria Parra
0abdf44f41 fb-histedit: Add a histedit extension that adds stop
Summary:
Add 'stop' verb to histedit. This is the version I submited to the ML
which got rejected because it doesn't preserve hashes. However as arc will
always modify the hash anyway that's save for us anyawy.

Test Plan: run tests, worked.

Reviewers: durham, sid0

Subscribers: akushner

Differential Revision: https://phabricator.fb.com/D1606075
2014-10-09 10:54:43 -07:00