Summary: Changing tag disabled by default to tag enabled by default
Test Plan: tag default policy, tag when disabled with or without default message
Reviewers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2486970
Tasks: 8500389
Summary: Adding tag tweak and warning on the tags command
Test Plan:
Testing the tag command if allowed, not allowed with default message and not allowed with custom message
Testing if the default warning message or custom message prints when tags is called
Reviewers: durham, #sourcecontrol, rmcelroy
Reviewed By: #sourcecontrol, rmcelroy
Subscribers: cdelahousse, durham
Differential Revision: https://phabricator.fb.com/D2477368
Tasks: 8500389
Summary:
Status on large repos got slow due to using re: and not '' and clowny
matcher behavior.
Test Plan:
In a large repo, I ran hg status with the old tweakdefaults and it consistently
took 10 seconds. Using the new tweakdefaults, it took 10 seconds the first time,
and was much faster afterwards.
I removed .hg/watchman.state and ran `hg status re:` with the old watchman and
it remained slow after multiple invocations. I ran `hg status re:` twice with
the new tweakdefaults and it was fast on the second invocation.
Reviewers: sid0, wez, #sourcecontrol, durham
Reviewed By: #sourcecontrol, durham
Subscribers: durham
Differential Revision: https://phabricator.fb.com/D2479154
Test Plan:
updated test; made sure to include `HGPLAIN`
ran `arc diff` from repo root and from subdir; both worked
In `fbsource/fbobjc` I ran `arc lint` and there were no warnings but it did fail to find `/usr/bin/xcrun` (which is the same behavior as before).
I repeated this in `fbsource/fbobjc/Configurations` to check for path issues; same result.
In `www` I ran `arc lint` and there were no warnings. I repeated this in `www/flib` and got the same result.
Reviewers: durham, #sourcecontrol
Reviewed By: durham, #sourcecontrol
Subscribers: durham, akushner
Differential Revision: https://phabricator.fb.com/D2457648
Tasks: 8432204
Signature: t1:2457648:1442622676:611ad3072d11b91feb947c0eb7eb25b621c61eb1
Summary: I thought we had already done this
Test Plan: Used new tweakdefaults and the rebase abort issue was fixed!
Reviewers: #sourcecontrol, durham
Reviewed By: #sourcecontrol, durham
Differential Revision: https://phabricator.fb.com/D2457645
Summary:
Facebook disables naked "hg up" as found in many googled mercurial docs.
https://www.selenic.com/hg/help/updatehttps://www.selenic.com/mercurial/hg.1.htmlhttp://hginit.com/01.html
etc.
We should have our error/abort messages make suggestions to correct course when
our configs conflict with upstream.
Test Plan:
"hg up --config extensions.tweakdefaults=~/fb-hgext/tweakdefaults.py"
in a repo that both needs updating to master and one in which it doesn't.
Results:
In repo needing an update:
/home/thm/fbsource/fbcode/tupperware/config/pe-security [thm@devvm1531]
> hg up --config extensions.tweakdefaults=~/fb-hgext/tweakdefaults.py
abort: You must specify a destination to update to, for example "hg up master".
(If you're trying to move a bookmark forward, try "hg rebase -d <destination>".)
Reviewers: durham
Differential Revision: https://phabricator.fb.com/D2348818
Summary:
In the vast majority of cases, our workflows should not use branches.
Let's make sure people know what they're doing when they create a branch by
failing by default.
Test Plan: added a new test
Reviewers: durham, #sourcecontrol
Reviewed By: durham, #sourcecontrol
Subscribers: durham
Differential Revision: https://phabricator.fb.com/D2213677
Summary:
Both remotenames and directaccess work best if they wrap tweakdefaults
instead of the other way around. While directaccess already takes care of this,
remotenames does not. Since remotenames is a more "general use" extension than
tweakdefaults, it feels better to change the order in this extension.
Test Plan:
Manually tested configs where tweakdefaults came before and after
remotenames. Before this change, remotenames rebase implicit tracking target
failed if tweakdefaults was listed after remotenmaes; after this change, it
worked regardless of the order the two extensions are listed inside of config
files.
Reviewers: lcharignon, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D2212774
Signature: t1:2212774:1435854403:c651c73d806bcb9515a540c4e8f161a0f42ead69
Summary:
Bookmarks apis are changing in core, need to update these extensions to not
break across that change.
Test Plan: ran tests against current and latest hg with bookmarks patches applied.
Reviewers: #sourcecontrol, durham
Reviewed By: #sourcecontrol, durham
Differential Revision: https://phabricator.fb.com/D2059856
Summary:
A ton of tests in the 'default' branch are broken, yet they all work in 'fbonly' (because that's what we test and push).
Let's give the world all of our goodness. Bleeding edge is where it's at.
Top of hg sl now looks like:
```
@ 386a20 rmcelroy
|\ merge fbonly into default
| |
o | a284c7 rmcelroy D1880107 remote/@
| | githelp: add: mention that record and crecord make commits
| |
| o f4870a sid0 remote/fbtip fbonly
| | crecord: update to latest default
```
Test Plan: run-tests.py actually works now
Reviewers: davidsp, ericsumner, mitrandir, akushner, durham, sid0
Reviewed By: durham
Subscribers: lcharignon, mpm, ps
Differential Revision: https://phabricator.fb.com/D1883891
Signature: t1:1883891:1425613263:8c199f339596384aa7d089154ef99eb982ecff87
Summary: Allows the user to specify a date and only a date on the command line, and still get to the commit they want
Test Plan: Use hg up -d in a few of the normal ways, such as hg up -d 'Jan 1', hg up -d '<Mar 1' and they should all work.
Reviewers: rmcelroy
Subscribers: nmead
Differential Revision: https://phabricator.fb.com/D1881685
Tasks: 6015872
Summary:
https://www.facebook.com/groups/sourcecontrol/permalink/759079160808373/
Many thanks to @sid0 for guidance here.
Test Plan:
Ran this script:
hg up master
echo a >> README.txt
arc feature foo
Before it failed, now it works.
Also a new test.
Reviewers: sid0
Reviewed By: sid0
Subscribers: hannesr, sid0
Differential Revision: https://phabricator.fb.com/D1738821
Tasks: 5810509
Signature: t1:1738821:1418669776:18cd358a99254f7552dacb9b9aa1599364b2d47d
Summary:
After discussion in https://www.facebook.com/groups/sourcecontrol/permalink/755390834510539/ and playing around with the behavior,
I'm convinced this is the more user-friendly option for people. It's not git's behavior, but it's safer than git's and *way* safer
than mercurial's default.
Test Plan: Updated test
Reviewers: sid0, pyd, davidsp, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1717431
Signature: t1:1717431:1417654306:a584a85cfe76fd03d29a3391f83892af41d26cb6
Summary: For OS X I'm going to install a private copy of GNU `grep` to a directory not in the PATH. With this we'll be able to point to that copy of `grep`.
Test Plan:
I'm relying on the fact that GNU grep is a hell of a lot faster than BSD grep.
With GNU grep available at `/opt/facebook/libexec/mercurial/grep`, in fbandroid,
```
$ time hg --config grep.command=/opt/facebook/libexec/mercurial/grep grep <yubikey> java
0.81s
$ time hg grep <yubikey> java
4.65s
```
Reviewers: davidsp, akushner, pyd, daviser, rmcelroy, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1654012
Tasks: 4786323
Signature: t1:1654012:1415041229:9c5c175e650cea29e71bb3ce138edbc661771077
Summary:
Most of our internal extensions don't have any docstringa causing hg help
to show nothing. I think this is confusing, as we teach people to use hg help.
In particular for our extensions they won't find anything on the internet
but hg help won't help either. So let's add rudimentary help texts.
Also ensure that gitnode is properly documented in hg help revset.
Test Plan:
added extensions, checked hg help and hg help extension. Also
checked hg help revset for gitnode.
Reviewers: rmcelroy, durham, sid0, akushner
Differential Revision: https://phabricator.fb.com/D1645964
Summary:
Previously, `hg grep` would follow symlinks because that's what `grep` does. This is a problem in fbcode because of all the tp2 and dewey symlinks. Handroll our iteration and ignore all files recorded as symlinks in the dirstate. This isn't perfect, but it's good enough and it's a lot faster than stating all the files.
Presumably we can integrate this with hgwatchman at some point.
Now, `hg grep <random string>` in fbcode takes just 2.6 seconds. (`git grep` takes 4.)
Test Plan: Ran tests.
Reviewers: daviser, akushner, davidsp, pyd, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1587863
Summary:
Previously we wrapped commands at global initialization time, which is just
plain wrong (since other commands may not have even be initialized yet). Now we
do it inside extsetup. It's mildly important that we do it in extsetup (vs
uisetup) because other extensions, like remotefilelog, wrap commands in the
uisetup and we want to make sure that our tweaks (like passing -f to log) come
first. And by wrapping last, we get invoked first.
Test Plan: Ran the tests
Reviewers: sid0, davidsp, pyd
Differential Revision: https://phabricator.fb.com/D1578154
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: 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: 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