Commit Graph

40 Commits

Author SHA1 Message Date
Arun Kulshreshtha
041eae0180 fbamend: edit hint to mention hg restack instead of hg amend --fixup
Summary: To encourage people to learn about and use `hg restack` (which is a more general fixup tool), tell users about it instead of `hg amend --fixup`. I wasn't sure whether to advertise it as `hg rebase --restack` or just `hg restack`, so I've included both.

Test Plan: Do an amend in the middle of a stack and observe the new wording. Unit tests reflect changed wording.

Reviewers: durham, #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4390111

Signature: t1:4390111:1483962208:46951c8f5e4c499840b0b4b0ee8ac1e1b6c14ca9
2017-01-09 11:09:02 -08:00
Simon Farnsworth
be87628803 Catch up with upstream changes so that our tests pass
Summary: Upstream's done a few changes that we need to catch up with.

Test Plan: Run tests locally on my devserver

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4058640

Signature: t1:4058640:1477065516:e2ab2483d054e47b4fe75c6eba185dfd5179f57a
2016-10-21 08:58:52 -07:00
Kostia Balytskyi
8bf34fd038 tests_: fix tests in accordance with the core changes
Differential Revision: https://phabricator.intern.facebook.com/D3967244
2016-10-04 05:25:28 -07:00
Jun Wu
9fea0c3f0c doc: replace "commit" where it is used as a noun with "changeset"
Summary:
"changeset" is a more official term and let's use it. Note that this patch
only changes documentation / i18n messages visible to the users and header
comment blocks to developers. Other places like comments in the code are
untouched.

With the "dialect" extension enabled, users will still see the more friendly
term - "commit".

Test Plan:
`arc unit`. Note the remotefilelog failure is probably unrelated - seems
related to ongoing / upcoming manifest refactoring upstream.

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3900394

Signature: t1:3900394:1474470348:6a1b5691e2599cc47df18b227d56d1f9d3c7c906
2016-09-21 15:45:25 +01:00
Jun Wu
3884602d28 check-code: enfore checking before using common foreign extensions
Summary:
It's a common mistake that our tests require foreign extensions (namely evolve
and remotenames) without checking them first.

This diff adds checks to catch these mistakes, adds missing checks, and unifies
our checking logic using `require-ext.sh`, which is aware of `hgext3rd` and
prints skip message.

This affects `arc lint` so hopefully our new testing code would be free of this
kind of mistakes.

Test Plan: `arc lint` would catch errors

Reviewers: #mercurial, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3550977

Signature: t1:3550977:1468455857:e849dfd9e3cbc446cc6e6c662050ee88a3366e6c
2016-07-12 20:39:34 +01:00
Jun Wu
8a3a99ba21 hgext: move single file extensions to hgext3rd
Summary:
Be a better citizen under system python path.

Fix all tests issues and change setup.py to use glob pattern to include
all extensions.

Test Plan:
Run tests and `make local`.
Also build and install the package and run `hg sl` in major repos.

Reviewers: #mercurial, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, durham, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3534311

Signature: t1:3534311:1468275426:fe122646c8bd6c541e1889e73e9df28f86747ff2
2016-07-08 13:15:42 +01:00
Kostia Balytskyi
1d18a2690a fbamend: abort if preamend bookmark points to the current commit
Differential Revision: https://phabricator.intern.facebook.com/D3436696
2016-06-17 05:25:32 -07:00
Kostia Balytskyi
fe1d9ce31e fbamend: fix some bugs & style issues in unamend implementation
Differential Revision: https://phabricator.fb.com/D3218920
2016-04-26 04:58:59 -07:00
ikostia@fb.com
2d8c5ce689 fbamend: add the unamend command
Differential Revision: https://phabricator.fb.com/D3202478
2016-04-21 17:17:07 +01:00
timeless@gmail.com
cd35432d91 spelling: fix numerous spelling errors 2016-04-04 12:48:01 -07:00
Mateusz Kwapich
c9cdbc1a15 fbamend: pass the "interface = curses" in tests
Test Plan: tests

Reviewers: lcharignon, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters, #sourcecontrol

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

Signature: t1:3119950:1459407710:7ac150111e0f955f6b17cdec9a13950a59eb4bc4
2016-03-31 11:29:05 -07:00
Durham Goode
6112a4e50c fbamend: fix fbamend not passing a rebase destination
Summary:
fbamend was not passing a rebase destination if you did not have an active
bookmark (it would just rebase onto the named branch tip). This broke when
upstream Mercurial started requiring you specify a rebase destination when it
was ambiguous.

The fix is to rebase onto the current commit (which is always the correct
behavior, since amend --rebase will have left you on that commit after the
amend, and amend --fixup discovers what needs rebasing by looking at your
current commit).

Test Plan: Added a test

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

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

Tasks: 10366715
2016-03-09 17:53:11 -08:00
Tony Tung
92d41175d0 [fbamend] back out D2804307
Summary: Because @sid0 backed out 5293d4f88aefeab1e9e18e8d4ce9a1298f9480cb in hg-crew, we need to back out D2804307 to match the old hash computation.

Test Plan: pass fbamend

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mitrandir, sid0

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

Signature: t1:2907105:1454718476:547de056470d42f3e8be3f9fc4fb1582164f2c6c
2016-02-08 10:54:41 -08:00
Laurent Charignon
0ca941a08a cleanup: use backtick instead of parent to capture output of shell cmd
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, mitrandir, akushner

Reviewed By: akushner

Subscribers: mpm, akushner, mitrandir

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

Signature: t1:2811997:1452200059:9e4fca501a22f95d2d9a22d234758f55e292ea9a
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
5ebc03718c cleanup: fix quoting patterns in tests
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/D2811856
2016-01-07 18:30:24 -08:00
Laurent Charignon
255bb09a46 fbamend: fix test with new hashes computation from core
Summary:
Something in core changed the way we compute the hashes and it was
changing the output of this test. We change one hash to another and the test
seems to run well like before

Test Plan: Test pass

Reviewers: ericsumner

Differential Revision: https://phabricator.fb.com/D2804307
2016-01-05 12:49:15 -08:00
Laurent Charignon
3c3a557d92 fbamend: use fbhistedit from the same repo
Summary:
Before this patch we were testing against the fbhistedit installed on the
system. This patch makes us use the module under test from the fb-hgext repo.

Test Plan: test is using the right implementation

Reviewers: ericsumner

Differential Revision: https://phabricator.fb.com/D2795908
2015-12-30 11:40:27 -08:00
Laurent Charignon
0ad0da0c93 fbamend: add test with inhibit 2015-12-18 14:22:10 -08:00
Christian Delahousse
6c94249d6f fbamend: fix --logfile for hg amend
Summary:
Fbamend broke logfile. fbamend tends to write state to opts['message'] even
if -m or --message was not used at the cmdline. If you inputted a logfile
cmd arg, cmdutil.logmessage would see both opts['message'] and opts['logfile']
as populated and throw an abort exception. This is a workaround.

Test Plan: See test.

Reviewers: rmcelroy

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

Tasks: 7434543
2015-10-27 14:37:20 -07:00
Christian Delahousse
9f711482fb fbamend: prevent hg commit --rebase/--fixup without --amend
Summary: Nuff said

Test Plan: Test.

Reviewers: durham, #sourcecontrol

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

Tasks: 8854516
2015-10-26 16:19:40 -07:00
Christian Delahousse
60dabbf5ef fbamend: enable interactive mode
Summary: fbamend did not enable interactive mode for hg commit --amend -i and hg amend -i.

Test Plan: See the tests.

Reviewers: #sourcecontrol, rmcelroy, durham

Reviewed By: durham

Subscribers: durham, rmcelroy

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

Tasks: 7695310

Signature: t1:2578231:1445894542:4b633377b0b2157cc4e5244dc07c0785ccca73c1
2015-10-23 17:00:56 -07:00
Durham Goode
64ed8a8d62 fbamend: fix to use loaded rebase, instead of system rebase
fbamend was using the python system rebase instead of the one loaded by
Mercurial. This broke the tests when the installed rebase differed from the
version of Mercurial we were running the tests with.
2015-09-24 19:46:12 -07:00
Mat Wood
e209fa0e70 Fixing fb-hgext fbamend test
Summary: The test-fbamend.t test is failing because of some error codes that no longer happen with an unsuccessful 'hg amend' command. The command prints out 'nothing changed' and no longer throws an error.

Test Plan: After the change, I ran the tests and confirmed the test-fbamend.t test is now passing.

Reviewers: cdelahousse, jetzhao, ttung, romanchadnov, matwood, durham, #sourcecontrol

Reviewed By: durham, #sourcecontrol

Subscribers: rmcelroy, pyd, mitrandir

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

Signature: t1:2446352:1442536997:e0d7ec996062f8bba5ee125c51091168750f1472
2015-09-17 17:40:18 -07:00
Laurent Charignon
8eb2003bbd fbamend: use strip.strip instead of repair.strip
Summary:
fbamend: use strip.strip instead of repair.strip
This allows fbamend to work better with evolve as evolve overrides the command
strip.strip to prune.

Test Plan: Changed test and ran it.

Reviewers: durham, pyd

Differential Revision: https://phabricator.fb.com/D2082137
2015-05-18 16:28:40 -07:00
Durham Goode
6b99e31175 fbamend: move evolve warning to be inside the amend command
Summary:
With the new evolve+inhibit ecosystem, we want to allow amend and amend --rebase
to continue working even when evolve is on. Let's move the evolve check to be
inside the amend command, and only complain when we see the evolve commands
enabled.

Test Plan: Added a test

Reviewers: lcharignon, pyd

Reviewed By: pyd

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

Signature: t1:2033649:1430346833:3116b704e49f634709a6fea32e217b94e731b96f
2015-04-07 13:52:59 -07:00
Ryan McElroy
9d0379fb36 fbamend: configurable user education
Test Plan: ran it locally with chef_tested devbox and D2002135

Reviewers: durham, ericsumner, mitrandir, sid0

Reviewed By: sid0

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

Signature: t1:2002175:1429295959:535d264ebd9a2d23c8e1eebefb313b1654f28196
2015-04-17 10:17:23 -07:00
Ryan McElroy
efe74ca9a4 fbamend: add addremove (-A) option
Summary: Soemone noticed that this was missing

Test Plan: updated test

Reviewers: sid0, mitrandir, durham

Reviewed By: durham

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

Tasks: 6773162

Signature: t1:1994587:1429116229:64c8d9bcca1f7de7566d5a53e5f822e1658c1758
2015-04-15 09:29:09 -07:00
Ryan McElroy
5f9e3bb604 fbamend: keep explicitly passed message
Summary: Previously, we would discard a message with passed to hg amend.

Test Plan: added a test

Reviewers: sid0, ericsumner, durham, #sourcecontrol

Reviewed By: durham, #sourcecontrol

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

Tasks: 6705470

Signature: t1:1973794:1428457860:68075660f34eff2c757757aad9ca11fb5ae040c0
2015-04-07 13:31:44 -07:00
Durham Goode
3d34417493 fbhistedit: fix to match upstream apis 2015-03-13 09:33:57 -07:00
Ryan McElroy
adaac17406 fbamend: add text box user education message
Test Plan: udpated test

Reviewers: sid0, durham

Reviewed By: durham

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

Signature: t1:1847192:1423853563:81c064ffc591b64beb4f5b5c5b751f18f9e8d8c2
2015-02-12 21:16:58 -08:00
Ryan McElroy
5cdf597fd6 fbamend: histedit awareness
Summary:
Previously, fbamend allowed all sorts of atrocities during histedits, literally
destroying the world. Literally. Make fbamend histedit-aware -- it will now
give correct advice and refuse to delete old commits during a histedit.

Test Plan: Updated tests

Reviewers: sid0, daviser, davidsp, ericsumner, pyd, mitrandir, durham

Reviewed By: mitrandir, durham

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

Signature: t1:1844984:1423768068:edc85af8b203aefdcdac9d7fee0425fc1f1c5281
2015-02-12 11:02:34 -08:00
Ryan McElroy
76aaf399ba fbamend: intelligently keep non-bookmarked rev preamends up to date
Summary:
Previously, without a bookmark, the preamend bookmark would get out of date
with a second hg amend. Be more intelligent here and fix up the preamend
bookmark when re-amending.

Test Plan: updated unit test

Reviewers: sid0, mitrandir, ericsumner, daviser, durham

Reviewed By: durham

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

Signature: t1:1844331:1423864952:fdc9f0c232407d5e6aa98a3030c7f4d28e6ad169
2015-02-12 20:43:29 -08:00
Ryan McElroy
6596b361b3 fbamend: factor out preamend bookmark naming
Summary: Less copypasta, more win.

Test Plan: ./run-tests.py

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

Reviewed By: durham

Subscribers: pyd

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

Signature: t1:1844329:1423764680:adce79e4d06727a0910f21afdfb80439c6bbbe8c
2015-02-12 02:16:28 -08:00
Ryan McElroy
6f8358819a fbamend: change suffix to remove parentheses
Summary:
While working with fbandroid folks working in OSX, it looked like there were
some issues with escaping parentheses in the console. Also, parens are annoying
to type even in Linux. Let's have a lighter-weight suffix to the preamend
bookmarks.

Test Plan: ./run-tests.py

Reviewers: durham, sid0, mitrandir, daviser, ericsumner

Differential Revision: https://phabricator.fb.com/D1844272
2015-02-11 20:01:03 -08:00
Ryan McElroy
b1a851bb16 fbamend: add real testing
Summary: Previously the tests didn't actually check fbamend's functionality.

Test Plan: ./run-tests.py

Reviewers: durham, sid0, mitrandir, ericsumner, daviser

Differential Revision: https://phabricator.fb.com/D1844282
2015-02-12 02:32:51 -08:00
Siddharth Agarwal
18687164fa fix test-fbamend.t for Mercurial 3.2 2014-09-17 16:37:11 -07:00
Pierre-Yves David
805376a3bc test: glob an explicit mercurial version in fbamend test
Silly me.
2014-06-16 14:27:45 -07:00
Pierre-Yves David
b49da34abc fbamend: auto-disable when evolution is enabled
fbamend is not compatible with evolution. We now detect such situation and
noisily disable fbamend in that case.
2014-06-11 22:34:21 -07:00
Pierre-Yves David
84158ce683 test: add a very basic test for fb-amend
The next changeset will make some change to fbamend. I'm introducting a
minimalist test to be able to test the change.
2014-06-12 17:53:50 -07:00