Summary:
Remotenames no longer emits this devel-warn (once some in-flight
patches are accepted, at least).
Test Plan: run the test
Reviewers: #fbhgext, mitrandir
Reviewed By: #fbhgext, mitrandir
Differential Revision: https://phab.mercurial-scm.org/D132
Summary: Will be tehre until remotenames are fixed
Reviewers: quark
Reviewed By: quark
Subscribers: quark
Differential Revision: https://phab.mercurial-scm.org/D45
Summary:
Improve the error message from the blocknonpushrebase hook to inform the user
that they need the pushrebase extension enabled.
Previously the message indicated that you mush push using
`hg push --to <bookmark>`, but this is not sufficient. Enabling the pushrebase
hook is the most important step here. (The `--to` flag is not part of vanilla
mercurial, and is added by pushrebase, but other extensions like remotenames
also add a `--to` flag.)
Test Plan:
Added a unit tests for `hg push --to <bookmark>` with remotenames enabled but
pushrebase disabled.
Reviewers: #mercurial, davidsp, zhihuih
Reviewed By: zhihuih
Subscribers: quark, medson, mjpieters, net-systems-diffs@fb.com
Differential Revision: https://phabricator.intern.facebook.com/D5276550
Signature: t1:5276550:1497899421:3656bcc3e7358f97fc852e14307b34d8aa4d9951
Summary:
Enhance check-ext script to be more strict:
- Only one foreign extension is allowed: `remotenames`
- Require explicit path for in-repo extensions to avoid wrong extensions
being tested
This would make the test more predicatable since system extensions
will be less likely to be imported. Explicit path is better than
setting `PYTHONPATH` since `hgext/name.py` could override
`hgext3rd/name.py` regardless of `PYTHONPATH`.
Test Plan: arc unit
Reviewers: phillco, durham, ikostia, #mercurial, stash
Reviewed By: stash
Subscribers: medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5271430
Signature: t1:5271430:1497861776:7dd35ec7c522cd9b26aa0871cb4306b4f1b8993a
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:
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
Summary:
If pushrebase was enabled on the client, it became impossible to push
to a non-pushrebase repo using --to, like remotenames allows. The fix is to
detect if remotenames is enabled and allow the default --to behavior.
Test Plan: Added a test
Reviewers: #sourcecontrol, ttung
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3057066
Tasks: 9455435
Summary: This allows us to differentiate between remote output and local output.
Test Plan: pass unit test
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D2955753
Signature: t1:2955753:1455918979:235a4d8ca317a0568e5d3a72d1cd1e2baf09a910
Summary: On the server, we explicitly disable remotenames. We should test that identical config here.
Test Plan: pass unit test
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D2955740
Signature: t1:2955740:1455918916:0b1d50d3855dddc579b451f036b46ea0275f2507
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:
If tracking was set up, 'hg push' was not invoking the pushrebase logic, like it
would if the user ran 'hg push --to master'.
This is required for us to unify all pushes through pushrebase, so we can move
the hooks out of the lock and into prepushrebase.
Test Plan: Added a test
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2635253
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:
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:
Also added an additional test to show a case that fails now (and should fail),
but would have succeeded with the previous code.
Test Plan: Additional unit test
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D2502396
Signature: t1:2502396:1443809922:18ec6697b7c135c37c10f7bdd9544901c4a54c99
Summary:
The old check moved the bookmark old node after the prepushkey hooks
had ran, bypassing the non-ff prevention logic. This moves the old node rewrite
to before the prepushkey hook and also checks that old node is moved in a
ff-only way.
Test Plan: updated unit test
Reviewers: #sourcecontrol, mitrandir
Reviewed By: mitrandir
Subscribers: durham
Differential Revision: https://phabricator.fb.com/D2499633
Signature: t1:2499633:1443733890:4c84150bd0f21adb97feb23e54727bb4e8be38cf
Summary:
In pushrebase, we expect bookmarks to be moving after discovery but
before we grab the lock. With this patch, we rewrite the incoming bookmark
changes so that they do not fail if the bookmark moves after discovery.
Test Plan:
Wrote a new test to cover this behavior and verified that the test failed before
this change but works afterwards.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: durham
Differential Revision: https://phabricator.fb.com/D2488675
Signature: t1:2488675:1443503039:660f88da9727a74f7c9a21f0767efb5d7379d16d
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:
pushrebase doesn't support pushing non-fastward heads when remotenames is on
(since --to implies both remotenames and do a rebase). Long term we want --new
and --replace to indicate bookmark movements, but for now we can use the
existing -f to imply that we don't want a rebase to happen.
Test Plan: Added a test
Reviewers: #sourcecontrol, lcharignon
Reviewed By: #sourcecontrol, lcharignon
Subscribers: lcharignon
Differential Revision: https://phabricator.fb.com/D2307585
Summary:
Previously pushrebase could not create new bookmarks, because the rebase target
did not exist. This fixes that.
Also fixes some output text to match the core Mercurial behavior, so tools can
rely on the text in certain cases.
Test Plan: Added a test
Reviewers: lcharignon, pyd, rmcelroy, ericsumner
Reviewed By: ericsumner
Differential Revision: https://phabricator.fb.com/D2240418
Signature: t1:2240418:1436895571:2f56298969e09490f6f5e6a44857eedc2bfcace4
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