Summary:
I want to turn on fbamend by default, but in order to do that, we need to point
people in a super-obvious way at the documentation when they first run fbamend.
This provides a stub for user education.
Test Plan:
* ./run-tests.py
* Added a message and played around with it in my www-hg
Reviewers: durham, sid0, ericsumner, mitrandir, daviser
Differential Revision: https://phabricator.fb.com/D1844274
Summary:
While working with fbandroid folks working in OSX, it looked like there were
some issues with escaping parentheses in the console. Also, parens are annoying
to type even in Linux. Let's have a lighter-weight suffix to the preamend
bookmarks.
Test Plan: ./run-tests.py
Reviewers: durham, sid0, mitrandir, daviser, ericsumner
Differential Revision: https://phabricator.fb.com/D1844272
Summary:
This allows each repo to specify a master revision other than ##master##,
##trunk##, or ##@##. This is especially useful when using the ##remotenames##
extension, since the remote bookmark might be of the form ##remote/master##.
Test Plan:
Set this cofig option in my repo's .hg/hgrc:
[smartlog]
master = smf/@
Then ran smartlog and it worked as if I had passed ##--master smf/@##
Reviewers: sid0, daviser, davidsp, ericsumner, mitrandir, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1840345
Signature: t1:1840345:1423625389:aec4d651a23747bc5fdce3f14b26158ad0ddf313
Summary:
I have some bookmarks for interesting code that I've stopped
development of indefinitely, and I don't want them cluttering
my smartlog output. This lets me add a config option like
[smartlog]
ignorebookmarks = abandoned/
so that smartlog won't force them to be included
Test Plan: ##run-test.py##
Reviewers: sid0, daviser, davidsp, mitrandir, rmcelroy, durham
Reviewed By: durham
Subscribers: calvinb, mpm, pyd, akushner
Differential Revision: https://phabricator.fb.com/D1812758
Signature: t1:1812758:1422567344:d44896000ea3f92dbd0b981fc26693066ab23ee1
Summary:
hg backups would fail if it encountered a bundle whose parent wasn't present in
the repo anymore. This handles that case and prints out a message.
Test Plan:
Tried it in a large repo with lots of backup bundles, verified the
message was printed and the backups process continued on to the next one.
Reviewers: davidsp, pyd, rmcelroy, mitrandir, ericsumner, sid0
Reviewed By: sid0
Differential Revision: https://phabricator.fb.com/D1809904
Signature: t1:1809904:1422478920:90cff2103c4417e21da37e230e6058348f1c218a
Summary:
I wanted a way to see a commit in relation to the other smartlog entries, so
I refactored smartlog to provide a revset function for its default selections.
Test Plan: ##run-tests##
Reviewers: durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1794762
Tasks: 6057467
Signature: t1:1794762:1421888058:9b96d26f68b9b3bac24ef43db58fe8aa0299de37
The sparse checkout extension had a pretty bad flaw where rebasing across
certain no-op file changes would fail the rebase. This was due to Mercurial
adding a 'keep' action on those files and that action getting translated to a
'remove' by the sparse extension, then failing to edit the dirstate during the rebase
branchmerge.
The fix is to only issue 'remove' actions if we're not in a branchmerge
and the file in question is in the workingcopy but shouldn't be.
I also added more validation for the branchmerge scenario to make sure we aren't
losing any dirstate data. It will basically abort if any action besides 'keep'
is performed on a file outside the sparse checkout.
Upstream Mercurial has changed the return value of merge.calculateupdates in two
ways: 1) actions is now a file->action mapping instead of a
actiontype->list-of-files mapping, 2) it now returns actions, diverge,
renamedelete where the last two are just used for displaying to the user and can
be pretty much ignored by the sparse extension.
Summary:
It turns out that bundlerepo uses the underlying phase boundaries, so the
added changesets show up with the same phase as their nearest ancestor that's
already in the repository. This behavior is confusing and inconsistent with
what happens when the bundle is actually applied: retracting the draft boundary
over the new commits.
This makes a copy of the phase cache so that changes in the bundlerepo don't
affect the real one and then retracts the draft boundary like would happen
when the bundle is applied normally.
If this general solution looks OK, I'll submit an upstream patch that makes
bundlerepo behave this way always, which will make it match the behavior that
would be seen when using ##hg unbundle##.
Test Plan: ##run-tests.py##
Reviewers: pyd, durham
Reviewed By: durham
Subscribers: calvinb, rmcelroy, daviser, mpm, davidsp, sid0, akushner, pyd, durham
Differential Revision: https://phabricator.fb.com/D1733166
Signature: t1:1733166:1420502423:f57e2fff8fe47293ecab1ac4f6efdd0507c9c7b5
Summary: This is nicer because it only does the upgrade when an operation that'll probably take a while anyway is run.
Test Plan: Enabled the extension on a non-generaldelta repo, then ran `hg status`. Saw that it wasn't upgraded. Next, ran `hg pull`, and saw that it was.
Reviewers: davidsp, rmcelroy, akushner, pyd, daviser, mitrandir, ericsumner, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1749026
Signature: t1:1749026:1418940170:6fdecc074294b26b7c3e9bd8c1463eefd13a8fc1
Summary: Been working with js too long; python vars aren't None by default
Test Plan: ##run-tests.py##, and doing a traditional push w/ the extension enabled
Reviewers: durham, sid0, pyd
Subscribers: calvinb, mitrandir, rmcelroy, daviser, mpm, davidsp, sid0, akushner, pyd, durham
Differential Revision: https://phabricator.fb.com/D1743710
Summary:
@durin42 suggested that the extension might want to prevent processing of
obsolete commits. Given the current state of dealing with conflicting
obsolescence markers, this seems like a good idea.
Test Plan: ##run-tests.py##
Reviewers: pyd, durham
Reviewed By: durham
Subscribers: calvinb, mitrandir, rmcelroy, daviser, mpm, davidsp, sid0, akushner, pyd, durham
Differential Revision: https://phabricator.fb.com/D1740886
Signature: t1:1740886:1418686275:d505ff1de8fbce39eb4fbe3a2e6d368b4b14edb8
Summary:
strip -r . -k rebuilds the dirstate and was inserting filtered entries
into the dirstate. This fixes rebuild to exclude sparse files.
Test Plan: Added a test
Reviewers: sid0, pyd, davidsp, mitrandir, rmcelroy
Differential Revision: https://phabricator.fb.com/D1743331
Summary:
We actually realized that converting a manifest to generaldelta is not as easy as just flipping a bit -- the meaning of 'base' is different for normal vs generaldelta revlogs.
Instead, open a new generaldelta revlog, write out every node from the manifest, and then close the revlog. Finally, move over the revlog index and data files.
Test Plan: Ran it on local non-generaldelta fbandroid and fbcode repos. It's pretty fast: under two minutes each for both.
Reviewers: davidsp, rmcelroy, akushner, daviser, mpm, pyd, durham
Reviewed By: pyd
Subscribers: hannesr
Differential Revision: https://phabricator.fb.com/D1738808
Signature: t1:1738808:1418522355:31e424dc523d40f8194490d75160e993f48a0f27
Summary:
Transferring the part data into a bundle file on disk for bundlerepo to read
is a self-contained operation
Test Plan: ##run_tests.py##
Reviewers: pyd, durham
Reviewed By: durham
Subscribers: calvinb, mitrandir, rmcelroy, daviser, mpm, davidsp, sid0, akushner, pyd, durham
Differential Revision: https://phabricator.fb.com/D1726767
Signature: t1:1726767:1418241560:8afac123afc847e61e6f46b6216d15b003024504
Summary: Update indentation to be more in-line with how hg does things
Test Plan: ##run-tests.py##
Reviewers: pyd, durham
Reviewed By: durham
Subscribers: akushner, sid0, davidsp, mpm, daviser, rmcelroy, mitrandir, calvinb
Differential Revision: https://phabricator.fb.com/D1726641
Signature: t1:1726641:1418086497:91cde84647f094e077966aea53668fead9c47a7a
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:
Instead of always sending back a v1 changegroup, do the proper version
negotiation so we use the latest version supported by both client and server
Test Plan: ##run-tests.py##
Reviewers: durham, pyd
Reviewed By: pyd
Subscribers: akushner, sid0, davidsp, mpm, daviser, rmcelroy
Differential Revision: https://phabricator.fb.com/D1722669
Signature: t1:1722669:1417819262:6ab35f612fbb0dc5884caefc12e550d1d3eb0adf
Summary:
This information will be useful to any pushback extension; this is a first step
towards making it a separate extension
Test Plan: ##run-tests.py##
Reviewers: pyd, durham
Reviewed By: durham
Subscribers: akushner, sid0, davidsp, mpm, daviser, rmcelroy
Differential Revision: https://phabricator.fb.com/D1722350
Signature: t1:1722350:1417813202:a021aa449765bf49c0c2e1fe86cb90534c50fdad
Summary:
In practice, this doesn't seem to be necessary -- testing with ##hg push##
appears to be sufficient.
Test Plan: run-tests
Reviewers: pyd, durham, sid0
Reviewed By: sid0
Subscribers: rmcelroy, daviser, mpm, davidsp, sid0, akushner
Differential Revision: https://phabricator.fb.com/D1700839
Signature: t1:1700839:1416859911:321862b34c7067a11475a2e77112e77b20147dc6
Summary:
The function already raises ValueError if it can't generate a suitable part
for the remote; catch it and continue otherwise
Test Plan: Run test
Reviewers: pyd, durham
Reviewed By: durham
Subscribers: akushner, sid0, davidsp, mpm, daviser, rmcelroy
Differential Revision: https://phabricator.fb.com/D1700817
Signature: t1:1700817:1416868855:cad7838c2c9be0d0657adda28d0d1796c119a4ef
Summary: Removes the mechanism I monkey-patched in
Test Plan: Ran test
Reviewers: pyd, durham
Reviewed By: durham
Subscribers: akushner, sid0, davidsp, mpm, daviser, rmcelroy
Differential Revision: https://phabricator.fb.com/D1697566
Signature: t1:1697566:1416603991:38d1cb3756b428e5ffe8b8af2b97ce62afde2a57
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
Summary:
Adds a sparse checkout extension that allows you to checkout just part of the
working copy. This only affects the working copy, it does not affect history,
or what is pushed and pulled from the server.
The basic api is:
hg sparse --include PATTERN... # add a pattern to the sparse checkout
hg sparse --exclude PATTERN... # excludes files from the sparse checkout
hg sparse --delete PATTERN... # deletes an include/exclude rule
hg sparse --enable-profile # enables a predefined sparse profile
hg sparse --disable-profile # disables a predefined sparse profile
hg sparse --reset # makes the repository full again
hg sparse --refresh # refreshes the working copy if .hg/sparse was
modified manually
hg sparse # show the current sparse rules
Test Plan:
Added tests. Ran them. Also deploy it to a couple users for a bit
without major issues.
Reviewers: pyd, sid0, rmcelroy, davidsp, mpm
Subscribers: mitrandir, akushner
Differential Revision: https://phabricator.fb.com/D1698824
Summary: add the chistedit extension that adds an interactive ncurses based
interface for histedit. It requires python-curses to be installed and the
Mercurial histedit extension to be enabled.
Test Plan: enabled and used it
Reviewers: durham, sid0, pyd
Differential Revision: https://phabricator.fb.com/D1662465
Summary:
Use `first()` instead of `[0]`.
Also fix coloring under non-ANSI terminals (required to get the test working).
Test Plan: Ran the tests. Also ran `hg sl` with this in a few of my repos.
Reviewers: durham, davidsp, akushner, daviser, rmcelroy, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D1623808
Tasks: 5375006