Summary:
It turns out commit.files() does not return all the affected files during a
merge commit. It only returns files which differ from both p1 and p2, so in a
merge commit where we accept the changes from p2, the changes were lost during
the rebase.
This fixes it by performing a manifest diff if we're grafting a merge commit.
Test Plan:
Updated the tests to check the file contents (this test would fail
before)
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2331586
Evolve isn't a part of core Mercurial nor is it part of this repository.
Make it easier to run tests for pushrebase by removing the evolve
dependency.
This does drop a workflow test that `hg evolve` after a rebased push
does the right thing. But, evolve's behavior in the presence of
specific obsolescence markers should be pretty well tested and it
shouldn't be strictly necessary to test this behavior.
Summary:
The tail check was flagging by mistake scenarios where the push was
possible. This patch adds one of these scenario.
Test Plan: Add new test and all former tests are passing
Reviewers: ericsumner, durham
Differential Revision: https://phabricator.fb.com/D2292866
Summary:
Before this patch, pushrebase was not supporting some cases of fast
forward push. This patch fixes the issue.
Test Plan:
Added a new test. Check that the test failed before and is fixed
with the code change.
Reviewers: durham
Differential Revision: https://phabricator.fb.com/D2279800
Summary:
Before this patch we were not recording all the information for file
copy, executable bit and link. This patch fixes the issue.
Test Plan: Add a new test with a copy
Reviewers: durham
Differential Revision: https://phabricator.fb.com/D2277575
Summary:
I saw this error when using pushrebase with fbsource on a commit
that deleted a file. We were trying to access it even if it was not in the
manifest.
Test Plan:
Modified the test
Before the code fix the new test fails with:
remote: abort: b@46a2df24e272: not found in manifest!
Reviewers: durham, ericsumner, pyd
Differential Revision: https://phabricator.fb.com/D2274792
Summary:
This makes the pushrebase extension work with the remotenames extension. It does
a few things:
1) rename --onto to be --to for consistency
2) configures remotenames to allow non-fastforward pushes
3) changes the push wrapper to happen after remotenames is loaded
Test Plan: Added a test
Reviewers: pyd, rmcelroy, lcharignon, ericsumner
Reviewed By: ericsumner
Differential Revision: https://phabricator.fb.com/D2200222
Signature: t1:2200222:1435695629:a92d8b20d158aa40bad1f3963af0348b6680d52d
Summary:
This adds the ability to rebase changegroups that contain merge commits. It
works by identifying the maximum bundle root that is an ancestor of the desired
`onto` and rebases only things that are on top of that root.
Test Plan: Added a test
Reviewers: lcharignon, pyd, ericsumner
Reviewed By: ericsumner
Subscribers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2194350
Signature: t1:2194350:1435695516:3a1f62bda7de0da9536a538da0bbb6deceb192f6
Summary:
Upstream has removed all the b2x flags, so let's do the same to pushrebase. Also
fixes pushrebase's use of manifest._intersectfiles() which has been removed
upstream (in favor of a matcher).
The tests had a bunch of hardcoded hooks which were very messy and became
impossible to maintain when upstream changed what args were passed. Let's just
get rid of all that noise.
Test Plan: Ran the tests
Reviewers: sid0, rmcelroy, lcharignon, ericsumner, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D2003033
Signature: t1:2003033:1429832524:c0de8ebea7e6348ba9b55c109ca71bb3a301b625
Summary:
The rebase extension bypasses the changegroup processing hooks, so they need to
be called explicitly.
Test Plan: Added hooks to the existing test
Reviewers: pyd, durham
Reviewed By: durham
Subscribers: calvinb, mitrandir, rmcelroy, daviser, mpm, davidsp, sid0, akushner
Differential Revision: https://phabricator.fb.com/D1726408
Signature: t1:1726408:1418241039:4e51a6dcbf3134f12d55c8e902de9ca7086883d1
Summary: Use the bundle2 reply stream to send changes back to the client
Test Plan: Ran test
Reviewers: pyd, durham
Reviewed By: durham
Subscribers: rmcelroy, daviser, mpm, davidsp, sid0, akushner
Differential Revision: https://phabricator.fb.com/D1689551
Signature: t1:1689551:1416948875:987c7440298aa57d5cf46d420feab151ce9340b1
Summary:
Adds a new bundle2 parttype to accept a linear changegroup and rebase it onto
the designated position on the server.
Future work:
* Issue the new parttype from ##hg push## (under what circumstances?)
* Return new revisions to client in the bundle2 response
* Write automated tests
* Support v2 changegroup packing?
* Test compatibility with the extensions we commonly use
Test Plan:
Diff includes an hg command that issues the new parttype; have used it to test
manually on a repository with 2 files.
Reviewers: akushner, sid0, davidsp, mpm, daviser, rmcelroy, pyd, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1670811
Signature: t1:1670811:1416335316:05c5ae8a35ba28cab87c474bab28afe91e8702d2