Commit Graph

8 Commits

Author SHA1 Message Date
Jared Bosco
3c30d27350 copytrace: remove copytrace flag from mutating global options table
Summary:
Copytrace modified the global definitions table which was making it very difficult to keep track of side-effects as the code was executed, as well as making it harder to replace the fancyopts calls with native Rust.

Since the copytrace behavior can be achieved through a configuration, it now will no longer modify the global definitions table, and will display the correct flag for a user to use in order to get this same behavior.

Reviewed By: quark-zju

Differential Revision: D15902449

fbshipit-source-id: 1c254162d56823e65085b7047bb37513f187b487
2019-07-20 01:06:33 -07:00
Jun Wu
da0b66a8ec copytrace: fix an issue where undesirable entries are reported
Summary:
This solves an issue vipannalla saw that the heuristics logic behaves incorrectly
when running `hg up -C c4a88583; hg graft 23001ead`. The file `great_persons_on_ex_civilization-inl.h`
would be marked as "unresolved" and removed from the working copy potentially
due to other mergedriver actions, while it should be merged cleanly and do not
appear in mergestate at all.

After debugging, the file was only renamed on one side, and not changed on the
other side. In the heuristics code path, the file was reported as copied and
confused the callsite.

Reviewed By: singhsrb

Differential Revision: D14195031

fbshipit-source-id: 0602fd56b75219f851c0175debfe72c4d49d652d
2019-02-25 12:43:20 -08:00
Saurabh Singh
6317ba0ca2 amend: replace with the fbamend extension
Summary:
The functionality we care about is provided by the `fbamend`
extension. Therefore, lets replace the `amend` extension with the `fbamend`
extension.

Reviewed By: farnz

Differential Revision: D10320739

fbshipit-source-id: 5700d39f488777fcc4033f60ce0a51cda15ef2ad
2018-10-11 06:59:23 -07:00
Jun Wu
c601e242af rebase: do not always use real strip on --abort
Summary:
The real strip was used on purpose [1] as a workaround of the old obsstore
design where commits cannot be revived.

Since reviving commits is now possible. Let's avoid dangerous strip here.

This makes `rebase --abort` safer, faster, undo-able, and also solves an
issue where clindex crashes with real strip reported by @[839419353:jeroenv] at
https://fburl.com/uqfglmu5.

[1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/095572.html

Reviewed By: DurhamG

Differential Revision: D9236658

fbshipit-source-id: 9ae7089a8991d8d21ddc5e107c15b8374c7d7339
2018-08-18 10:51:57 -07:00
Jun Wu
238cda6c14 amend: use hint framework for restack
Summary: This allows people to silence the hint.

Reviewed By: markbt

Differential Revision: D7392127

fbshipit-source-id: ac16f952a178d567ce13e22946127456972ebe85
2018-04-13 21:51:49 -07:00
Phil Cohen
de4ccf5688 restack: remove old pre-obsolesence fixup
Summary:
Per discussion with @[100000771202578:kulshrax] [1], the new behavior is enabled everywhere, and is also vastly preferable. Let's nuke the old code, as well as the config declaration and all places that manually enabled it.

[1]

> also, it looks like the pre-restack logic is still in that function, and the modern restack code path is still gated by a config option
> we should probably remove that

Reviewed By: kulshrax

Differential Revision: D7031365

fbshipit-source-id: dcc620c292bac03fdc0aa144546d4628bb673046
2018-04-13 21:51:13 -07:00
Kostia Balytskyi
b27a46c987 fb-hgext: fix copied fb-hgext tests
Summary:
This is a big bulk of generally almost-obvious fixes to the moved tests. Mostly
these fixes have to do with correct importing of the actual extensions.

Depends on D6675329

Test Plan:
- ./run-tests.py fails less after this commit
- see further commits for more test fixes

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675344
2018-01-09 03:06:09 -08:00
Kostia Balytskyi
e75b9fc1b1 fb-hgext: move most of hgext3rd and related tests to core
Summary:
This commit moves most of the stuff in hgext3rd and related tests to
hg-crew/hgext and hg-crew/test respectively.

The things that are not moved are the ones which require some more complex
imports.


Depends on D6675309

Test Plan: - tests are failing at this commit, fixes are in the following commits

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675329
2018-01-09 03:03:59 -08:00