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
Summary:
We need to fix tests due to de-facto HG_URL variable semantics change in
https://selenic.com/hg/rev/a5fd89db5549
Test Plan: run-tests.py test-pushrebase.t
Reviewers: #mercurial, ttung, simonfar
Reviewed By: simonfar
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3771208
Signature: t1:3771208:1472141889:562c84ca92b91d2dbe60decea53349f53a9676c4
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
Summary:
This change fixes up tests to track graphmod changes.
The change for the smartlog test is a temporary stop-gap measure, as smartlog
itself will be updated soon to track the changes in better ways.
Test Plan:
Run the test-suite, ignore unrelated failures in test-morestatus.t, test-mergedriver.t
and test-fastmanifest.t
Reviewers: #sourcecontrol, ttung
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3191336
Tasks: 10804976
Summary:
The pushvars extension ensures that it precedes the hooks.
Unfortunately, that means pushrebase does not have access to the hook
variables unless it obtains the transaction. If it does that, then the
prepushrebase step will have the lock, defeating the purpose of the hook.
By storing the pushvars in the operation, we can retrieve it without
starting the transaction.
Test Plan: passes the BYPASS_REVIEW test when it is moved to prepushrebase
Reviewers: #sourcecontrol, durham, lcharignon
Reviewed By: durham
Subscribers: durham, mitrandir
Differential Revision: https://phabricator.fb.com/D2890191
Tasks: 9872386
Signature: t1:2890191:1454526611:503a30015494eef467ad545b92077bf42cdd30d5
Summary: Just a bit cleaner. Also this makes it so pushrebase can source any hypothetically shared code. Mostly because I'm too lazy to type bundle2hooks=PATH_OF_FILE.
Test Plan: same unit tests pass.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: durham, mitrandir
Differential Revision: https://phabricator.fb.com/D2903928
Signature: t1:2903928:1454648999:81f6cc64f708dc4709640b2a214e1b3dbc11caa5
Summary:
This diff is part of a series to cleanup fb-hgext and make it pass check-code.
Stop using aliases, fix the case of a variable and poorly designed warning for
export (see (r'export.*=', "don't export and assign at once"),)
Test Plan: all tests pass
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2812592
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/D2811930
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
Summary:
When pushing a rewritten merge commit, we were trying to look up it's original
parent in the current repo (which no longer had that commit). We need to look in
the bundle repo instead.
Test Plan: Added a test. Also tried it manually on one of the hg servers
Reviewers: #sourcecontrol, ttung, mitrandir
Reviewed By: mitrandir
Differential Revision: https://phabricator.fb.com/D2763182
Signature: t1:2763182:1450230086:c560d4b8bbfe5d5387e23c1cc2e09109f49f255b
Summary:
The previous implementation relied on the python serialization of lists. This
resulted in some truncation due to line length in some infrastructure.
This patch makes it prettier.
Test Plan: Tests
Reviewers: #sourcecontrol, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir
Differential Revision: https://phabricator.fb.com/D2594066
Signature: t1:2594066:1446079418:cd27cea1f44a9d432984b8dc37b547450ff076ab
Summary:
Previously the output just said "searching for changes" then "updating
bookmark", which was kind of terse. It also showed the "adding XX changesets"
output without any context, which is kind of scary to see "adding 100
changesets" when I'm only pushing one commit.
Now we mention how many commits we're pushing, what the hash range is, and how
many commits are being downloaded.
Test Plan: Ran ze tests
Reviewers: #sourcecontrol, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir
Differential Revision: https://phabricator.fb.com/D2594007
Signature: t1:2594007:1446081446:99b77f4982acafc1f1940ba07b094a27dd05e354
Summary:
Since pushrebase allows running hooks outside of the lock, we want to force all
pushes to go through pushrebase. Step #1 of that is making push --force go
through the pushrebase flow.
The initial version is pretty naive. A future version might avoid the whole
graft process for performance sake.
Test Plan:
Added a test that creates a new bookmark. I also tested the same test
doing a force push.
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2588894
Signature: t1:2588894:1446076583:12b58048742b112a5d7cab839204c6219414f9ee
Summary:
It's a nice property to have commits have increasing timestamps. Since we're
already rewriting commits during pushrebase, we can rewrite the timestamp to the
push time.
Test Plan: Added a test
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2554422
Summary:
This adds a hook before we take the lock that allows us to run some expensive
hooks without blocking the entire repo. This is useful for hooks that check the
contents of the bundle for certain info (like conflict markers), that won't be
affected by rebases.
Test Plan:
Added a test. Verified it passed when hg had lazy locks enabled for
unbundle, and failed with mercurial did not have lazy locks for unbundle.
Reviewers: pyd, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2511561
Summary:
To do so, we had to change some path variables and change the output of some
tests. Removed a few dependencies that provided by hg.
Test Plan:
Ran the tests. There was some ignorable output changed (about devel-warn) caused by other code not
related to this change.
Reviewers: #sourcecontrol, pyd, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, durham
Differential Revision: https://phabricator.fb.com/D2499721
Signature: t1:2499721:1443745230:9d4e53e83356807f3343c8343e28d10f1b9dc35f
Summary:
By removing the part on the pushrebase client instead of ignoring it on the
pushrebase server, the server can still run this check for non-pushrebase
pushes so it will be safer against divergent heads.
Test Plan: Updated unit tests
Reviewers: #sourcecontrol, pyd, durham
Reviewed By: pyd, durham
Differential Revision: https://phabricator.fb.com/D2499115
Signature: t1:2499115:1443736440:001ceb79a4692abbd4c6b208124f6576f10f680c
Summary:
This check was causing pushes to fail when heads change during a push, but that
is expected in pushrebase pushes.
Test Plan: ran existing tests
Reviewers: ericsumner, #sourcecontrol, durham
Reviewed By: #sourcecontrol, durham
Differential Revision: https://phabricator.fb.com/D2482254
Signature: t1:2482254:1443468591:23dc9ad24e1c7d3b3ec04be678d346dfed6d98a7
Summary:
This tests were A) unreadable, and B) not deterministic. Let's remove all that
text and have a special test just for making sure the hook vars we care about
are present.
Also break the output into multiple lines for easier reading and diffing.
And fix a change in order for the remotenames test.
Test Plan: Ran the tests
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2479274
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