Summary:
cmdutil.amend was changed recently to get rid of the redundant commit during
the amend operation. As a result, we need to update the tests which were aware
of the redundant commit. This commit achieves the same.
Note that as a result of the amend behavior change, the dirsync and copytrace
extensions were broken. They will be be fixed in subsequent commits on top of
this commit. For now, the broken tests for these extensions were removed from
the commit. Eventually, I will fold all the fixes together so that revision
history of the tests is not messed up. This is primarily done only to aid the
review.
Test Plan: Ran the test suite after updating the tests.
Previously, inhibit may use a wrong date when writing markers. This patch
fixes that. Also add a test to check the date and make sure `revive` takes
effects inside a transaction.
Differential Revision: https://phab.mercurial-scm.org/D182
Summary:
Upstream change 6ddb2645abf5dced7e8e4612c8cf9d11cbf468f6 made
the debugobsolete command print out the number of changes it obsoleted.
Test Plan: run the tests
Reviewers: #fbhgext, mitrandir
Reviewed By: #fbhgext, mitrandir
Differential Revision: https://phab.mercurial-scm.org/D133
Summary:
The main feature we want is to be able to unobsolete an already obsoleted
changeset. The old inhibit code is causing all kinds of unsolvable weird
cases and is hard to deubg or maintain.
This patch rewrites it completely. Basically, we now require people to use
obsmarkers to "unobsolete" changesets. We treat cycles in obsstore as a
normal case and break the cycle using date information.
It should be a neat and correct solution until we want marker exchange.
A "revive" API was provided for other extensions to use.
Tests and other code changes will be fixed in a follow up.
Test Plan:
`test-inhibit.t` was rewritten to test the new features.
Other tests are broken and skipped for now. The next diff will fix them.
Reviewers: #mercurial, kulshrax
Reviewed By: kulshrax
Subscribers: medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5391320
Signature: t1:5391320:1499716172:a946381421cc242411f5175ee3b7a3a0bc5a4f07
Summary: Instead of referencing `hg rebase` --restack option, just reference the `restack` subcommand.
Test Plan:
1. Make a few commits 1, 2, 3, 4 on any branch
2. `hg update 1`
3. Try to amend commit 1
4. Warning message should appear about children left behind
expected: Hint text does not mention `hg rebase --restack`
Reviewers: durham, kulshrax
Reviewed By: kulshrax
Subscribers: medson, mjpieters, kkrewink
Differential Revision: https://phabricator.intern.facebook.com/D5313108
Tasks: 19601780
Signature: t1:5313108:1498249314:98f31f4424341ef51997687293bf99b7297b6cd0
Summary:
When testing code in this repo, it's an easy mistake to import a module of a
same name installed in the system or specified by `PYTHONPATH`. This diff
adds a test module to detect that. It's included in `unit.py` so `arc unit`
will be able to find such issues
It will be more effective if all our extensions are moved to hgext3rd.
Test Plan:
Append a blank line to every `.t` files, and run `unit.py` with `hg-dev`
environment, and make sure nothing got reported.
Reviewers: durham, #mercurial, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5274454
Signature: t1:5274454:1497976474:1b25881f022e148b89829ed3f4d6a79437f2533f
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
After upstream commit bab25235cfb5daf578a598bd7ae08f7a70ef7acd strip now also
deletes obsmarkers that are related to the stripped commits and saves them in
the bundle.
Summary: Fix lint errors and make the test pass.
Test Plan: arc unit
Reviewers: #sourcecontrol, sid0
Reviewed By: sid0
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5142477
Signature: t1:5142477:1496173824:bf941d895d3259fc788c09d4fefca7dddd11a33b
Summary:
Vendored using GPL2 license from https://bitbucket.org/marmoute/mutable-history
changeset c9f1118b33d60f8faa4b89988a8155c544f5bb0d without modification.
Test Plan: N/A. The code was imported as is.
Reviewers: #sourcecontrol, sid0
Reviewed By: sid0
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5142063
Signature: t1:5142063:1496173803:d0a9fa50a8423a531432ac3cff378b50952684b1