Commit Graph

20 Commits

Author SHA1 Message Date
Jun Wu
be7ac42b50 codemod: replace evolve by fbamend
Summary:
Now that fbamend has most of the features we want. Replace evolve
used by tests.

Minor changes are made to some extensions to make test pass:
- reset: drop commit reviving support (was provided by "hg touch")
- smartlog: do not assume who provides "allsuccessors" revset
- fbamend: return 1 on "nothing changed"
- fbamend: write operation data for split and fold
- fbamend: do not print incompatibility notice
- fbamend: do not disable itself when rebase is not enabled
- inhibit: remove `bookmark -D` option - use `prune -B` instead

Test Plan: arc unit

Reviewers: #mercurial, stash

Reviewed By: stash

Subscribers: stash, mjpieters, medson

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

Signature: t1:5258813:1497604051:0c7334f9a6554cf31aaaaa2a4995b17d4e445847
2017-06-16 15:50:01 -07:00
Jun Wu
01a471b159 codemod: use vendored directaccess and inhibit extension in tests
Summary:
This diff makes the tests use the vendored directaccess and inhibit instead the
foreign ones.

Test Plan: arc unit

Reviewers: #mercurial, sid0

Reviewed By: sid0

Subscribers: mjpieters

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

Signature: t1:5142981:1496173851:3a8f3a1c689711dbef517c893bf72c90ab144761
2017-05-30 12:56:40 -07:00
Durham Goode
d602cf1e82 fixtests: update tests to match upstream
Upstream mutable-history has changed the output a bit.
2017-05-01 09:22:37 -07: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
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
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
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
Pierre-Yves David
584ef5f66e remove devel-warning from expected test-output
Summary:
Devel warnings are pointing at issues in the code that need to be fixed. The
right way to get the tests to pass is to fix the warning cause, not to the
warning to the tests.

This practically backout an handful of test that added such warning output in
the test.

Test Plan:
  Well, test are now broken to match the state of the borken code.

Reviewers: lcharignon

Differential Revision: https://phabricator.fb.com/D2760523
2015-12-15 11:08:20 -08:00
Durham Goode
4cecb62eb2 Update tests 2015-10-26 15:10:59 -07:00
qdou
befd0d1a9c typo-fix
changed reseting to resetting in reset.py and test-reset.t

Summary: changed reseting to resetting in reset.py and test-reset.t

Test Plan: checked output and run test to ensure "reseting" is changed to "resetting"

Reviewers: cdelahousse, #sourcecontrol

Subscribers: siqi

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

Tasks: 8581478
2015-10-12 19:53:04 -07:00
Laurent Charignon
66eee49d7c reset: use scmutil.revsingle instead of reading rev number as is
Summary:
Reset didn't use scmutil to parse revision number given on the command line.
Inhibits plugs in the scmutil logic to enable direct access and therefore reset
was not benefiting from it. This caused the revive logic in reset to create
a new commit instead of reusing the old one.

Test Plan: Added test

Reviewers: durham, pyd

Reviewed By: pyd

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

Tasks: 6696106

Signature: t1:2032910:1430339529:47e2c7d7c2ea76e4ab1114e7215e8517ee9f4356
2015-06-17 14:38:03 -07:00
Durham Goode
86f7770eb5 reset: fix test globbing 2015-06-17 13:10:22 -07:00
Durham Goode
483fff949e Fix reset invalidating the entire dirstate
Summary:
Previously, if you did 'hg reset .' it would invalidate the entire dirstate,
making every entry 'lookup' so it had to read the entire working copy on the
next run. This fixes that.

Technically this is a bug in core mercurial since rebuilddirstate() should
invalidate anything if an empty list is passed.

Test Plan: Added a test

Reviewers: pyd, lcharignon, sid0, rmcelroy

Reviewed By: rmcelroy

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

Signature: t1:2129095:1433520638:e05ee86dedcc9f87d5c3fd65e3e2374ecbac5dfb
2015-06-04 15:27:46 -07:00
Durham Goode
3bc673a16b reset: fix resetting to bookmarks with odd names
Summary:
Previously, reseting to bookmarks with '-' in the name did not work. We need to
use scmutil.revrange instead of repo.revs to make this happen correctly.

Test Plan: Added a test

Reviewers: ericsumner, rmcelroy, pyd, lcharignon, sid0

Reviewed By: sid0

Subscribers: dreiss

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

Signature: t1:2021737:1429906581:c8deaf61920fad5fd9c9faea16b867685d3be7ad
2015-04-24 13:10:58 -07:00
Eric Sumner
34002e0224 hgext: fix many tests, run-tests, writecg2 for hg3.3
Summary: Still need to fix pushrebase

Test Plan: ##run-tests.py##

Reviewers: sid0, daviser, davidsp, mitrandir, akushner, rmcelroy, pyd, mpm, durham

Reviewed By: durham

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

Signature: t1:1813630:1422573745:c5ea2a8acdfda0e555d1ae56a16f4fb5e5618174
2015-01-29 15:06:06 -08:00
Durham Goode
7f2f4a68d6 Fix phase after reset
Unbundling during a reset left the commit as public. This fixes the unbundled
commits to be draft.
2014-11-20 13:54:13 -08:00
Durham Goode
b9e4876c60 Add evolve support to reset command
Summary:
When evolve is enabled, reset should use prune and touch instead of
strip and unbundle.

Test Plan: Added tests.

Reviewers: pyd, sid0

Differential Revision: https://phabricator.fb.com/D1641160
2014-10-27 10:11:48 -07:00
Ryan McElroy
f081a79415 Make empty reset command unadd files
Test Plan: updated test

Reviewers: durham

Reviewed By: durham

Differential Revision: https://phabricator.fb.com/D1645931
2014-10-28 22:44:17 -07:00
Durham Goode
47b86129f0 Add reset command
Summary:
This adds a 'hg reset' command that acts similar to 'git reset'. It moves your
active bookmark to the desired location, along with your working copy parent. If
no flags are specified, the working copy contents is left alone. If --clean is
specified, the working copy contents is overwritten.

By default we will attempt to recover the commit from the backup bundles if it
is not in the repository. A future commit will add support for using touch/prune
when evolve is enabled.

Test Plan: Added tests, and ran them

Reviewers: sid0, davidsp, pyd, mpm, akushner, rmcelroy

Differential Revision: https://phabricator.fb.com/D1637658
2014-10-23 18:56:24 -07:00