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: 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 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: `hg sl/slog/smartlog` has a new flag `--commit-info`, which shows the files changed in currently active commit.
Test Plan:
Modified & added & removed a file to in commit.
The deleted, unknown, ignored and clean are not relevant, when we are talking about a change in a commit - right?
hg sl
hg sl --commit-info
hg sl -T "blaa" --commit-info
hg slog
hg slog --commit-info
hg slog -T "blaa" --commit-info
Commit-info flag adds info under current commit about the added, modified & removed files.
hg sl --commit-info --stat
This looks weird as it shows the current commit changes twice. Should I care about this?
#in fb-hgext/tests
./run-tests.py test-smartlog.t
test passes.
Reviewers: sid0, pyd, davidsp, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1677101
Tasks: 5418936
Signature: t1:1677101:1415833805:975ce43aaaf1ccabe6a054d09a9e5f236447340f
Summary:
When evolve is enabled, reset should use prune and touch instead of
strip and unbundle.
Test Plan: Added tests.
Reviewers: pyd, sid0
Differential Revision: https://phabricator.fb.com/D1641160
Summary: The named branches support adds a new file called git-named-branches. Support that.
Test Plan: Ran the tests.
Reviewers: durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1655756
Signature: t1:1655756:1415047400:14a3a082390af25c713ef4d9f8721efb05e20875
Summary:
This adds a 'hg reset' command that acts similar to 'git reset'. It moves your
active bookmark to the desired location, along with your working copy parent. If
no flags are specified, the working copy contents is left alone. If --clean is
specified, the working copy contents is overwritten.
By default we will attempt to recover the commit from the backup bundles if it
is not in the repository. A future commit will add support for using touch/prune
when evolve is enabled.
Test Plan: Added tests, and ran them
Reviewers: sid0, davidsp, pyd, mpm, akushner, rmcelroy
Differential Revision: https://phabricator.fb.com/D1637658
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
Summary: Make stop compatible with the new hg tip
Test Plan: run tests, worked.
Reviewers: pyd, durham, sid0
Reviewed By: sid0
Differential Revision: https://phabricator.fb.com/D1623384
Summary:
Add an execute command. This works similar to git's exec. However this
patch is a bit hacky but I want to get a first version out to our users. We have
to change some parts in histedit to make it easier to hook into
bootstrapcontinue and verifyrules. At the moment we can't get around copying
the implementation. Also need to add tests for obsolence.
Test Plan: Run tests, see it works.
Reviewers: pyd, sid0, durham
Reviewed By: durham
Subscribers: akushner, rmcelroy
Differential Revision: https://phabricator.fb.com/D1611838
Summary:
The phabdiff template mapping returns the phabricator diff id for the commit
(based on commit message).
for example:
$ hg log -r master --template '{phabdiff}\n'
D1485506
Test Plan: - unit tests addded
Reviewers: sid0, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1622192
Tasks: 5124920
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
Upstream no longer always uses bookmark.write to write. Sometimes it goes
through the transaction API and uses bookmark._write. So now we wrap that
instead.
Also adds a test that would have caught this, since the existing commit/bookmark
tests did not exercise this new write path.
Summary:
Add 'stop' verb to histedit. This is the version I submited to the ML
which got rejected because it doesn't preserve hashes. However as arc will
always modify the hash anyway that's save for us anyawy.
Test Plan: run tests, worked.
Reviewers: durham, sid0
Subscribers: akushner
Differential Revision: https://phabricator.fb.com/D1606075
Summary:
This adds an extension that tracks the locations of the working copy and
bookmarks over time. It's still a proof of concept, but I want to get it
deployed to start getting feedback.
Running `hg reflog` by default shows the previous locations of the working
copy (most recent first).
~/myrepo> hg reflog
Previous locations of '.':
35a5fcfee452 rebase -d master
32eee5e2d406 up .^
b5d6dab4f900 up foo -C
Specifying a bookmark name shows the locations of that bookmark over time.
~/myrepo> hg reflog foo
Previous locations of 'foo':
d1a696044ec0 rebase -d master
35a5fcfee452 rebase -d master
32eee5e2d406 book foo -f
--verbose will show more information about each entry.
~/myrepo> hg reflog foo -v
Previous locations of 'foo':
35a5fcfee452 -> d1a696044ec0 durham 2014-10-01 18:32:14 rebase -d master
32eee5e2d406 -> 35a5fcfee452 durham 2014-10-01 17:28:54 rebase -d master
000000000000 -> 32eee5e2d406 durham 2014-10-01 17:28:30 book foo -f
It's currently stored as a single .hg/reflog file that is append only. Each
entry can store an arbitrary number of hashes (like storing 2 hashes for a merge
state working copy), which means we could also potentially use this to track
heads in branches as well.
It also (sorta) works with '-T json' for machine readable output:
~/myrepo> hg reflog foo -T json
[
{
"command": "up .^",
"date": "2014-10-02 13:54:45",
"newhashes": "474ff61d1a36",
"oldhashes": "d1a696044ec0",
"user": "durham "
},
{
"command": "book foo",
...
]
Test Plan: Added tests. Ran them.
Reviewers: sid0, pyd, mpm, davidsp, akushner
Differential Revision: https://phabricator.fb.com/D1592875
Summary:
Add a bunch of features to make `hg grep` full-featured.
- Support for basic, extended and Perl regexps.
- Support for filter patterns, including filesets.
- Support for color in the output.
Test Plan: Ran the tests, and ran `hg grep` against the repo.
Reviewers: davidsp, akushner, pyd, daviser, durham
Reviewed By: durham
Subscribers: robarnold
Differential Revision: https://phabricator.fb.com/D1578743
Summary: I added a grep command that does the wgrep alias. I also moved the traditional functionality of grep to histgrep. One thing missing is the help strings.
Test Plan:
I used both wgrep and my new grep on a couple queries in www. They returned the same results. I did similar things with the traditional grep and my histgrep.
I wrote tests in fb-hgext/tests/test-tweakdefaults.t and they passed.
Reviewers: pyd, davidsp, akushner, durham, sid0
Reviewed By: durham, sid0
Subscribers: akushner, micha
Differential Revision: https://phabricator.fb.com/D1572855
Tasks: 5162839
Summary: Allow git hashes to work with a `g` suffix, sort of like Subversion's `r`.
Test Plan: Ran the tests, and tested it out in fbandroid-hg.
Reviewers: davidsp, akushner, pyd, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1571258
Summary: With tweakdefaults `hg rebase` broke when the destination contained a hyphen. This made me sad :(
Test Plan: Tested rebase with hyphen, and ran tests.
Reviewers: pyd, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1565265
Summary: The location of `bundle2caps` changed.
Test Plan: Ran the tests, saw that they no longer failed.
Reviewers: durham, davidsp, akushner, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D1562466
Tasks: 5170539
Summary: This makes the error easier to read.
Test Plan: Ran `hg update`, saw that the error was printed across two lines.
Reviewers: durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1542591
Summary:
The tweakdefaults extension broke 'hg update -r'. This fixes it and
adds a test.
Test Plan: Added a test.
Reviewers: sid0
Reviewed By: sid0
Differential Revision: https://phabricator.fb.com/D1506040
Summary:
This makes tweaks to the Mercurial defaults, to improve the user experience:
- hg update without arguments now aborts
- hg log now defaults to -f
- hg rebase without -d now aborts
- hg rebase will fast forward a bookmark if possible
Test Plan: Added a test, ran it.
Reviewers: mpm, sid0, davidsp, dschleimer, akushner
Differential Revision: https://phabricator.fb.com/D1501398
Summary:
When a machine is newly set up, it needs to have the git mapfile available. Generating it from scratch is prohibitively slow for large repos like `configerator`, so instead add a command that can download the entire git metadata from a server that has it.
This is a temporary hack while I work on a real fix to upstream to hg-git. A real fix would be
- part of hg-git
- not send the entire git metadata over, just the bits that are needed based on a common/heads computation
- be dependent on bundle2
- (probably) be part of the pull operation, not a separate command
- be configurable with an option
This isn't part of hg-git, even in a private branch, to emphasize its temporary nature. `gitlookup` might also not be the best fit, but I want to avoid adding yet another extension for a temporary hack.
Test Plan:
Ran the following commands. Note that the current version of `hg` deployed to devservers is broken, so we need to deploy an updated hg before enabling this. These commands were tested against 1ced7c762592
(in `fbandroid-hg`, with `gitlookup` enabled on both ends and the remotefilelog fix in D1341059)
hg gitgetmeta ../fbandroid-from-git
Saw that 3 files were written out.
hg gitgetmeta ssh://localhost//data/users/sid0/fbandroid-from-git
Saw that 3 files were written out.
Reviewers: dschleimer, davidsp, akushner, durham, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D1341166
Tasks: 3751836