Summary:
"git branch -m new" renames the *current* branch. Add a shell command to read
the current bookmark when omitted from the git branch -m command line.
Test Plan:
Run tests with:
cd tests && python run-tests.py test-githelp.t
Reviewers: mitrandir, rmcelroy, durham
Reviewed By: rmcelroy, durham
Subscribers: mitrandir
Differential Revision: https://phabricator.fb.com/D2679470
Tasks: 8905356
Signature: t1:2679470:1448062781:d877b60bc2d675efac8d4814f9f89713e1c2630d
Summary: Added translation for 'git difftool' command. There is no direct command enabled by default, but the user could use extdiff extension, so I added basic info about enabling it.
Test Plan: run 'hg githelp -- git difftool'. For testing on local machine follow the instructions here https://our.intern.facebook.com/intern/wiki/Mercurial/ContributingToInternalHg/
Reviewers: #sourcecontrol, rmcelroy, cdelahousse
Reviewed By: rmcelroy
Subscribers: donhusa
Differential Revision: https://phabricator.fb.com/D2542230
Tasks: 7942323
Signature: t1:2542230:1444863661:edea8d760c4a8e828966bf79a9addacc932b38d0
Summary:
`githelp` supported `git checkout -f xyz` but not the same command with out a
path or a rev. Added support for it and wrote a test.
Test Plan:
Added tests and ran them.
Task: #7499727
Reviewers: ericsumner, durham
Reviewed By: durham
Subscribers: joesavona
Differential Revision: https://phabricator.fb.com/D2372309
Signature: t1:2372309:1440530832:cb32553b2ef7f7ff0e09cb80ff6449a8c26c2caf
Summary: Just in case someone trys to use 'git whatchanged', at least tell them why it's not supported
Test Plan: added a test
Reviewers: rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2329289
Tasks: 7966012
Signature: t1:2329289:1439242809:56fb56704e1110dc95a6366ee9c3eb948e1bf415
Summary:
'git show' now corresponds to 'git diff -r .^' for paths.
For everything else it still resolves to 'git export'.
Test Plan: take a look at the unit tests.
Reviewers: marcelo, durham, rmcelroy
Reviewed By: rmcelroy
Subscribers: nmote, durham, rmcelroy, owenc
Differential Revision: https://phabricator.fb.com/D2171752
Tasks: 6860395
Signature: t1:2171752:1434682344:cf1af959e0da788efa0a526459ee64590b09a00e
Summary:
Before this patch: hg githelp -- reset HEAD~ returned hg reset .~ which was
wrong. With this patch it retuns hg reset .~1.
Test Plan: added a test
Reviewers: mitrandir, durham
Subscribers: scottf
Differential Revision: https://phabricator.fb.com/D2166551
Summary:
Since hg grep and git grep are similar for basic usage (pattern first and then
paths), just copy all the git arguments to the suggested hg command.
Test Plan: Test added to test-githelp.t
Reviewers: rmcelroy, durham
Reviewed By: durham
Subscribers: elenapr
Differential Revision: https://phabricator.fb.com/D2009460
Tasks: 6524222
Signature: t1:2009460:1429647852:2bfaf32b8c7849e948e5da03989fad32c1b06780
Summary:
The command `git checkout foo` uses a heuristic to determine whether to treat
'foo' as a revision or a path. We try to mimic that behavior as best we can, but
there will still be corner cases where it does not work.
In particular, if there is a file that is present in a previous revision but not
the current one, this will incorrectly assume that it's a revision.
Test Plan:
Added tests to make sure that it behaves properly for untracked files, tracked
files, deleted files, removed files, and names which are both revisions and
files.
Reviewers: durham, sid0, mitrandir, rmcelroy
Reviewed By: rmcelroy
Subscribers: elenapr
Differential Revision: https://phabricator.fb.com/D1996393
Tasks: 6751516
Signature: t1:1996393:1429306520:2f13c194a8fe2a721bac501c5479250b2afe3f9e
Summary: Treat all arguments after -- as path arguments.
Test Plan: Several test cases added to tests/test-githelp.t
Reviewers: rmcelroy
Reviewed By: rmcelroy
Subscribers: elenapr
Differential Revision: https://phabricator.fb.com/D1988585
Tasks: 6199146
Signature: t1:1988585:1428960924:02ad487b9e17fecd7e98c045eeb01d8420247d33
Summary:
Suggest 'hg amend' because it does not pull up an editor, whereas 'hg commit
--amend' does.
Test Plan: Added test cases to tests/test-githelp.t to test for desired behavior.
Reviewers: rmcelroy
Reviewed By: rmcelroy
Subscribers: elenapr
Differential Revision: https://phabricator.fb.com/D1987860
Tasks: 6199146
Signature: t1:1987860:1428949599:cdc1d66426ea343a7b0ed1bfcc2d28cbb685810d
Summary: githelp: add git rebase --skip
Test Plan: Wrote and ran test
Reviewers: mathieubaudet, rmcelroy, sid0
Differential Revision: https://phabricator.fb.com/D1946751
Summary: Bug fixed by enclosing raw array remove with try-except block.
Test Plan: Run /tests/run-tests.py . It should finish without errors.
Reviewers: rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, sigmix
Differential Revision: https://phabricator.fb.com/D1927784
Tasks: 6463098
Signature: t1:1927784:1426810833:b9a549d41eaaa55c420b480018298b725cc69aaf
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
Test Plan:
$ hg githelp -- add -p
note: hg crecord provides a more powerful UI for recording changes
hg record
$ hg githelp -- add --patch
note: hg crecord provides a more powerful UI for recording changes
hg record
$ hg githelp -- add --all
note: use hg addremove to remove files that have been deleted.
hg add
$ hg githelp -- add
hg add
$ hg githelp -- add -A
note: use hg addremove to remove files that have been deleted.
hg add
Reviewers: daviser, sid0, davidsp, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1782964
Signature: t1:1782964:1421281556:89fb60618b5a7078273a36e9cf58641fc0ddef4c
Test Plan:
$ hg githelp -- merge-base
NOTE: ancestors() is part of the revset language.
Learn more about revsets with 'hg help revsets'
hg log -T '{node}\n' -r 'ancestor(A,B)'
$ hg githelp -- merge-base HEAD HEAD~100
NOTE: ancestors() is part of the revset language.
Learn more about revsets with 'hg help revsets'
hg log -T '{node}\n' -r 'ancestor(.,.~100)'
Reviewers: daviser, sid0, davidsp, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1782895
Tasks: 5781871
Signature: t1:1782895:1421281621:0ef1da186ce353aa0a0516e8ce70b906e816f46c
Summary: This became `first()` and `last()` a few weeks ago, I think.
Test Plan: Ran `hg githelp -- git reset HEAD^` and `hg githelp -- git reset HEAD`
Reviewers: durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1726213
Signature: t1:1726213:1418080693:d2000153091f9bdafa28d2600253d545f6922bfe
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: The hg equivalent of git grep is hg grep now.
Test Plan: I used the extension and called hg githelp -- git grep and it said hg grep
Reviewers: sid0, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1576499
Tasks: 5162839
Summary: hg githelp blame didn't work
Test Plan: not sure how to test this
Reviewers: pyd, davidsp, durham
Reviewed By: durham
Subscribers: sameen
Differential Revision: https://phabricator.fb.com/D1411080
Summary: We previously aborted with a KeyError traceback.
Test Plan: Run that thing with an unknown command, got a clear abort
Reviewers: durham
Differential Revision: https://phabricator.fb.com/D1299542