Commit Graph

7 Commits

Author SHA1 Message Date
Stanislau Hlebik
87a6499b5f add getcmdanddefaultopts
Summary:
Add a function that returns command and all the default options already
initialized. It should be used by commands that call other commands. For
example, calling pull inside of update, calling log inside of show etc.
getcmdanddefaultopts has important benefits:
1) It returns "wrapped" command i.e. command with all the overrides applied. On
the other hand, commands.pull doesn't return it.
2) It correctly initializes options to their default value and correctly
changes their name - replace '-'  with '_'.

Reviewed By: ryanmce

Differential Revision: D7193296

fbshipit-source-id: e8673bd4e16aad6156498660f2a7ed788ed2cac3
2018-04-13 21:51:24 -07:00
Stanislau Hlebik
a7bb5defb2 add --noprefix and --nodates option to show
Differential Revision: D7067556

fbshipit-source-id: 38aa09a544a1422e8762a7ebd697e55210ad20c5
2018-04-13 21:51:15 -07:00
Stanislau Hlebik
5b58008d6d mercurial hack-a-day: fix hg show REV FILE hanging
Summary:
`hg show REV FILE` would hang indefinitely, while `hg log -p FILE -r REV` works
fine. The reason is that fbshow extensions calls log command from commands.py
directly. But remotefilelog extension wraps log command and adds special
options to make it faster.

Let's call the wrapped version of log command

Differential Revision: D7066869

fbshipit-source-id: 3bda4b3b1a1fe9503eb05355816b28ba924048ff
2018-04-13 21:51:15 -07:00
Jun Wu
2946a1c198 codemod: use single blank line
Summary: This makes test-check-code cleaner.

Reviewed By: ryanmce

Differential Revision: D6937934

fbshipit-source-id: 8f92bc32f75b9792ac67db77bb3a8756b37fa941
2018-04-13 21:51:08 -07:00
Dmitry Zhuk
df266f86b7 fbshow: add whitespace handling to hg show
Summary:
Added options supported by diff:
```
-w --ignore-all-space    ignore white space when comparing lines
-b --ignore-space-change ignore changes in the amount of white space
-B --ignore-blank-lines  ignore changes whose lines are all blank
-Z --ignore-space-at-eol ignore changes in whitespace at EOL
```

Differential Revision: D6738122

fbshipit-source-id: bd4236ce7cb9d5f803f932cfec267de71b0067c2
2018-04-13 21:50:53 -07:00
Kostia Balytskyi
0e4d95b67e fb-hgext: fix gendoc-related issues
Summary:
These fixes are related to documentation-related check-style tests.

Depends on D6675344

Test Plan: - more tests pass

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675351
2018-01-09 03:44:33 -08:00
Kostia Balytskyi
e75b9fc1b1 fb-hgext: move most of hgext3rd and related tests to core
Summary:
This commit moves most of the stuff in hgext3rd and related tests to
hg-crew/hgext and hg-crew/test respectively.

The things that are not moved are the ones which require some more complex
imports.


Depends on D6675309

Test Plan: - tests are failing at this commit, fixes are in the following commits

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675329
2018-01-09 03:03:59 -08:00