2016-01-08 05:30:24 +03:00
|
|
|
$ extpath=`dirname $TESTDIR`
|
2016-07-08 15:15:42 +03:00
|
|
|
$ cp $extpath/hgext3rd/githelp.py $TESTTMP # use $TESTTMP substitution in message
|
2015-03-19 21:05:02 +03:00
|
|
|
$ cat >> $HGRCPATH << EOF
|
|
|
|
> [extensions]
|
|
|
|
> githelp=$TESTTMP/githelp.py
|
|
|
|
> EOF
|
|
|
|
|
|
|
|
$ hg init repo
|
|
|
|
$ cd repo
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
$ echo foo > test_file
|
|
|
|
$ mkdir dir
|
|
|
|
$ echo foo > dir/file
|
|
|
|
$ echo foo > removed_file
|
|
|
|
$ echo foo > deleted_file
|
|
|
|
$ hg add -q .
|
|
|
|
$ hg commit -m 'bar'
|
|
|
|
$ hg bookmark both
|
|
|
|
$ touch both
|
|
|
|
$ touch untracked_file
|
|
|
|
$ hg remove removed_file
|
|
|
|
$ rm deleted_file
|
2015-03-19 21:05:02 +03:00
|
|
|
|
|
|
|
githelp on a single command should succeed
|
|
|
|
$ hg githelp -- commit
|
|
|
|
hg commit
|
|
|
|
|
|
|
|
githelp on a command with options should succeed
|
|
|
|
$ hg githelp -- commit -pm "abc"
|
|
|
|
hg record -m 'abc'
|
|
|
|
|
|
|
|
githelp on a command with standalone unrecognized option should succeed with warning
|
|
|
|
$ hg githelp -- commit -p -v
|
|
|
|
ignoring unknown option -v
|
|
|
|
hg record
|
|
|
|
|
|
|
|
githelp on a command with unrecognized option packed with other options should fail with error
|
|
|
|
$ hg githelp -- commit -pv
|
|
|
|
abort: unknown option v packed with other options
|
|
|
|
Please try passing the option as it's own flag: -v
|
2015-07-07 05:17:17 +03:00
|
|
|
|
2016-04-28 14:14:31 +03:00
|
|
|
If this is a valid git command, please search/ask in the Source Control @ FB group (and don't forget to tell us what the git command does).
|
2015-07-07 05:17:17 +03:00
|
|
|
|
2015-03-19 21:05:02 +03:00
|
|
|
[255]
|
2015-07-07 05:17:17 +03:00
|
|
|
|
|
|
|
|
2015-03-26 22:48:36 +03:00
|
|
|
githelp for git rebase --skip
|
|
|
|
$ hg githelp -- git rebase --skip
|
|
|
|
hg revert --all -r .
|
|
|
|
hg rebase --continue
|
|
|
|
|
2015-04-13 20:47:34 +03:00
|
|
|
githelp for git commit --amend (hg commit --amend pulls up an editor)
|
|
|
|
$ hg githelp -- commit --amend
|
|
|
|
hg commit --amend
|
|
|
|
|
|
|
|
githelp for git commit --amend --no-edit (hg amend does not pull up an editor)
|
|
|
|
$ hg githelp -- commit --amend --no-edit
|
|
|
|
hg amend
|
2015-04-14 00:57:52 +03:00
|
|
|
|
|
|
|
githelp for git checkout -- . (checking out a directory)
|
|
|
|
$ hg githelp -- checkout -- .
|
|
|
|
note: use --no-backup to avoid creating .orig files
|
2015-07-07 05:17:17 +03:00
|
|
|
|
2015-04-14 00:57:52 +03:00
|
|
|
hg revert .
|
|
|
|
|
2015-07-07 05:17:17 +03:00
|
|
|
|
2016-01-08 05:30:24 +03:00
|
|
|
githelp for git checkout "HEAD^" (should still work to pass a rev)
|
|
|
|
$ hg githelp -- checkout "HEAD^"
|
2015-04-14 00:57:52 +03:00
|
|
|
hg update .^
|
|
|
|
|
|
|
|
githelp checkout: args after -- should be treated as paths no matter what
|
|
|
|
$ hg githelp -- checkout -- HEAD
|
|
|
|
note: use --no-backup to avoid creating .orig files
|
2015-07-07 05:17:17 +03:00
|
|
|
|
2015-04-14 00:57:52 +03:00
|
|
|
hg revert HEAD
|
|
|
|
|
2015-07-07 05:17:17 +03:00
|
|
|
|
2015-04-14 00:57:52 +03:00
|
|
|
githelp for git checkout with rev and path
|
2016-01-08 05:30:24 +03:00
|
|
|
$ hg githelp -- checkout "HEAD^" -- file.txt
|
2015-04-14 00:57:52 +03:00
|
|
|
note: use --no-backup to avoid creating .orig files
|
2015-07-07 05:17:17 +03:00
|
|
|
|
2015-04-14 00:57:52 +03:00
|
|
|
hg revert -r .^ file.txt
|
|
|
|
|
2015-07-07 05:17:17 +03:00
|
|
|
|
2015-04-14 00:57:52 +03:00
|
|
|
githelp for git with rev and path, without separator
|
2016-01-08 05:30:24 +03:00
|
|
|
$ hg githelp -- checkout "HEAD^" file.txt
|
2015-04-14 00:57:52 +03:00
|
|
|
note: use --no-backup to avoid creating .orig files
|
2015-07-07 05:17:17 +03:00
|
|
|
|
2015-04-14 00:57:52 +03:00
|
|
|
hg revert -r .^ file.txt
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
|
2015-07-07 05:17:17 +03:00
|
|
|
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
githelp for checkout with a file as first argument
|
|
|
|
$ hg githelp -- checkout test_file
|
|
|
|
note: use --no-backup to avoid creating .orig files
|
2015-07-07 05:17:17 +03:00
|
|
|
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
hg revert test_file
|
|
|
|
|
2015-07-07 05:17:17 +03:00
|
|
|
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
githelp for checkout with a removed file as first argument
|
|
|
|
$ hg githelp -- checkout removed_file
|
|
|
|
note: use --no-backup to avoid creating .orig files
|
2015-07-07 05:17:17 +03:00
|
|
|
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
hg revert removed_file
|
|
|
|
|
2015-07-07 05:17:17 +03:00
|
|
|
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
githelp for checkout with a deleted file as first argument
|
|
|
|
$ hg githelp -- checkout deleted_file
|
|
|
|
note: use --no-backup to avoid creating .orig files
|
2015-07-07 05:17:17 +03:00
|
|
|
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
hg revert deleted_file
|
|
|
|
|
2015-07-07 05:17:17 +03:00
|
|
|
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
githelp for checkout with a untracked file as first argument
|
|
|
|
$ hg githelp -- checkout untracked_file
|
|
|
|
note: use --no-backup to avoid creating .orig files
|
2015-07-07 05:17:17 +03:00
|
|
|
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
hg revert untracked_file
|
|
|
|
|
2015-07-07 05:17:17 +03:00
|
|
|
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
githelp for checkout with a directory as first argument
|
|
|
|
$ hg githelp -- checkout dir
|
|
|
|
note: use --no-backup to avoid creating .orig files
|
2015-07-07 05:17:17 +03:00
|
|
|
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
hg revert dir
|
|
|
|
|
2015-07-07 05:17:17 +03:00
|
|
|
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
githelp for checkout when not in repo root
|
|
|
|
$ cd dir
|
|
|
|
$ hg githelp -- checkout file
|
|
|
|
note: use --no-backup to avoid creating .orig files
|
2015-07-07 05:17:17 +03:00
|
|
|
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
hg revert file
|
2015-07-07 05:17:17 +03:00
|
|
|
|
2015-06-19 19:21:29 +03:00
|
|
|
$ cd ..
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
|
2015-06-19 04:04:42 +03:00
|
|
|
githelp for checkout with an argument that is both a file and a revision
|
Have githelp for checkout guess whether the first argument is a path or rev
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
2015-04-18 00:25:12 +03:00
|
|
|
$ hg githelp -- checkout both
|
|
|
|
hg update both
|
2015-04-21 20:21:17 +03:00
|
|
|
|
2015-07-01 21:38:40 +03:00
|
|
|
githelp for checkout with the -p option
|
|
|
|
$ hg githelp -- git checkout -p xyz
|
|
|
|
hg revert -i -r xyz
|
|
|
|
|
|
|
|
$ hg githelp -- git checkout -p xyz -- abc
|
2015-07-07 05:17:17 +03:00
|
|
|
note: use --no-backup to avoid creating .orig files
|
|
|
|
|
2015-07-01 21:38:40 +03:00
|
|
|
hg revert -i -r xyz abc
|
|
|
|
|
2015-08-22 02:32:43 +03:00
|
|
|
githelp for checkout with the -f option and a rev
|
|
|
|
$ hg githelp -- git checkout -f xyz
|
|
|
|
hg update -C xyz
|
|
|
|
$ hg githelp -- git checkout --force xyz
|
|
|
|
hg update -C xyz
|
|
|
|
|
|
|
|
githelp for checkout with the -f option without an arg
|
|
|
|
$ hg githelp -- git checkout -f
|
|
|
|
hg revert --all
|
|
|
|
$ hg githelp -- git checkout --force
|
|
|
|
hg revert --all
|
|
|
|
|
2015-04-21 20:21:17 +03:00
|
|
|
githelp for grep with pattern and path
|
|
|
|
$ hg githelp -- grep shrubbery flib/intern/
|
|
|
|
hg grep shrubbery flib/intern/
|
2015-06-18 02:11:03 +03:00
|
|
|
|
|
|
|
githelp for reset, checking ~ in git becomes ~1 in mercurial
|
|
|
|
$ hg githelp -- reset HEAD~
|
|
|
|
hg reset .~1
|
2016-01-08 05:30:24 +03:00
|
|
|
$ hg githelp -- reset "HEAD^"
|
2015-06-18 02:11:03 +03:00
|
|
|
hg reset .^
|
|
|
|
$ hg githelp -- reset HEAD~3
|
|
|
|
hg reset .~3
|
2015-06-18 21:58:59 +03:00
|
|
|
|
|
|
|
githelp for git show --name-status
|
|
|
|
$ hg githelp -- git show --name-status
|
|
|
|
hg log --style status -r tip
|
|
|
|
|
|
|
|
githelp for git show --pretty=format: --name-status
|
|
|
|
$ hg githelp -- git show --pretty=format: --name-status
|
|
|
|
hg stat --change tip
|
2015-06-19 04:04:42 +03:00
|
|
|
|
|
|
|
githelp for show with no arguments
|
|
|
|
$ hg githelp -- show
|
|
|
|
hg show
|
|
|
|
|
|
|
|
githelp for show with a path
|
2015-06-19 19:21:29 +03:00
|
|
|
$ hg githelp -- show test_file
|
2016-02-12 14:07:11 +03:00
|
|
|
hg show . test_file
|
2015-06-19 04:04:42 +03:00
|
|
|
|
|
|
|
githelp for show with not a path:
|
|
|
|
$ hg githelp -- show rev
|
|
|
|
hg show rev
|
|
|
|
|
2016-02-12 14:07:11 +03:00
|
|
|
githelp for show with many arguments
|
2015-06-19 04:04:42 +03:00
|
|
|
$ hg githelp -- show argone argtwo
|
2016-02-12 14:07:11 +03:00
|
|
|
hg show argone argtwo
|
|
|
|
$ hg githelp -- show test_file argone argtwo
|
|
|
|
hg show . test_file argone argtwo
|
2015-08-11 00:00:23 +03:00
|
|
|
|
2016-02-10 13:02:37 +03:00
|
|
|
githelp for show with --unified options
|
|
|
|
$ hg githelp -- show --unified=10
|
|
|
|
hg show --config diff.unified=10
|
|
|
|
$ hg githelp -- show -U100
|
|
|
|
hg show --config diff.unified=100
|
|
|
|
|
|
|
|
githelp for show with a path and --unified
|
|
|
|
$ hg githelp -- show -U20 test_file
|
2016-02-16 15:00:21 +03:00
|
|
|
hg show . test_file --config diff.unified=20
|
2016-02-10 13:02:37 +03:00
|
|
|
|
2015-12-16 21:19:40 +03:00
|
|
|
githelp for stash drop without name
|
|
|
|
$ hg githelp -- git stash drop
|
|
|
|
hg shelve -d <shelve name>
|
|
|
|
|
|
|
|
githelp for stash drop with name
|
|
|
|
$ hg githelp -- git stash drop xyz
|
|
|
|
hg shelve -d xyz
|
|
|
|
|
2015-08-11 00:00:23 +03:00
|
|
|
githelp for whatchanged should show deprecated message
|
|
|
|
$ hg githelp -- whatchanged -p
|
|
|
|
This command has been deprecated in the git project, thus isn't supported by this tool.
|
|
|
|
|
2015-11-21 21:02:15 +03:00
|
|
|
|
|
|
|
githelp for git branch -m renaming
|
|
|
|
$ hg githelp -- git branch -m old new
|
|
|
|
hg bookmark -m old new
|
|
|
|
|
|
|
|
When the old name is omitted, git branch -m new renames the current branch.
|
|
|
|
$ hg githelp -- git branch -m new
|
|
|
|
hg bookmark -m `hg log -T"{activebookmark}" -r .` new
|
2016-01-25 16:12:54 +03:00
|
|
|
|
2016-02-16 15:00:21 +03:00
|
|
|
Branch deletion in git strips commits
|
|
|
|
$ hg githelp -- git branch -d
|
|
|
|
hg strip -B
|
|
|
|
$ hg githelp -- git branch -d feature
|
|
|
|
hg strip -B feature -B
|
|
|
|
$ hg githelp -- git branch --delete experiment1 experiment2
|
|
|
|
hg strip -B experiment1 -B experiment2 -B
|
|
|
|
|
2016-01-25 16:12:54 +03:00
|
|
|
githelp for apply with no options
|
|
|
|
$ hg githelp -- apply
|
|
|
|
hg import
|
|
|
|
|
|
|
|
githelp for apply with directory strip custom
|
|
|
|
$ hg githelp -- apply -p 5
|
|
|
|
hg import -p 5
|
2016-10-12 21:47:42 +03:00
|
|
|
|
|
|
|
git merge-base
|
|
|
|
$ hg githelp -- git merge-base --is-ancestor
|
|
|
|
ignoring unknown option --is-ancestor
|
|
|
|
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)'
|