Commit Graph

44 Commits

Author SHA1 Message Date
Greg Prosser
094b505444 scm-prompt: fix _dotfiles_scm_info
Summary: I was using """_dotfiles_scm_info '[%s] '""" in my prompt, which broke after the refactoring.  Add a unit test and fix the code.

Test Plan: wrote a test for the breakage, edited code until they all passed

Reviewers: rmcelroy, tja

Reviewed By: rmcelroy

Subscribers: mjpieters, #pe_security

Differential Revision: https://phabricator.intern.facebook.com/D4945132

Signature: t1:4945132:1493136425:4516151982d173584cf874985de9de1fed0962d5
2017-04-25 10:56:35 -07:00
Ryan McElroy
8267123b73 scm-prompt: add eden snapshots support
Summary:
Based on the recent commit wez made, but centralized to the scm-prompt
source-of-truth.

Test Plan: updated test

Reviewers: #sourcecontrol, wez, simpkins, simonfar

Reviewed By: simonfar

Subscribers: net-systems-diffs@fb.com, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4867662

Tasks: 17110799

Signature: t1:4867662:1491916786:647edb819a059a3a6baa09c8d189ea706933687b
2017-04-11 08:47:12 -07:00
Adam Simpkins
6d24f86d76 arcanist: support arc unit --all
Summary: Update the MercurialTestEngine and unit.py script to support running all tests.

Test Plan: Ran `arc unit --all`

Reviewers: #sourcecontrol, quark

Reviewed By: quark

Subscribers: net-systems-diffs@fb.com, yogeshwer, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4856665

Signature: t1:4856665:1491623577:da0b639121d9df6b933d160d4776ec3515a91187
2017-04-10 11:44:32 -07:00
Jun Wu
31a03cf10c arc: source hg-dev automatically
Summary:
This is a follow-up of D4788756 and makes it easier to run `arc unit` or
`arc lint`.

Test Plan:
Run `arc lint` and `arc unit` without sourcing `hg-dev` first. And also rename
`facebook-hg-rpms` to make sure it aborts if `hg-dev` cannot be found.

Reviewers: simpkins, #sourcecontrol, simonfar

Reviewed By: simonfar

Subscribers: net-systems-diffs@fb.com, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4831818

Signature: t1:4831818:1491382785:35f6537722502d3c63cb65cf7129564b26903201
2017-04-05 13:17:03 -07:00
Adam Simpkins
3d41e7b8c8 unittests: drop special casing of lz4revlog extension
Summary:
After my fix in D4427670 the test-check* tests now use the correct config when
running hg commands in the main repository.  The scripts/utils.py code no
longer needs to explicitly enable the lz4revlog extension when running the unit
tests in a repository using lz4revlog.

Test Plan: Confirmed that "arc unit" still passes in a repository with lz4revlog enabled.

Reviewers: #sourcecontrol, quark, stash, rmcelroy

Reviewed By: rmcelroy

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4431170

Signature: t1:4431170:1484831433:a69be31042572ba6d0f5f3efd4775a260fda1414
2017-01-19 12:58:38 -08:00
Adam Simpkins
dd746f1765 unittests: add option to skip the test-check* tests
Summary:
Update scripts/unit.py with an option to skip running all of the test-check*
tests.  This makes it easier to run just a single specific test when developing
a unit test itself.

Test Plan:
Used "./scripts/unit.py --skip-checks tests/test-smartlog.t" when adding new
tests to test-smartlog.g

Reviewers: #sourcecontrol, stash, mjpieters, rmcelroy

Reviewed By: rmcelroy

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4430919

Signature: t1:4430919:1484820777:08da5f8fd4144bf05c7596db846d827b3680bc3e
2017-01-19 12:52:54 -08:00
Stanislau Hlebik
6f3cfe5684 scmprompt: output only one remote bookmark
Summary:
Recently I had this scm prompt:
{F64910275}

This is not user friendly. I suggest to output at most one remote bookmark

Also this diff copies `seq.py` from upstream hg repo

Test Plan: Run scm prompt tests on devserver and mac and with '--shell=zsh'

Reviewers: rmcelroy

Reviewed By: rmcelroy

Subscribers: simonfar, wez, mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4197242

Signature: t1:4197242:1483466446:cd1fe943dc99fde0600a4e20994fa4b0f971f72a
2017-01-04 00:23:16 -08:00
Jun Wu
2698cf1d22 scripts: unify spwaning run-test logic
Summary:
Previously, lint.py and unit.py have different logic spawning
run-tests.py.

The logic in `unit.py` is more robust: it sets `PYTHONPATH` and
`cwd`. It sets `-j` according to CPU cores. It can find `run-tests.py`
even if `MERCURIALRUNTESTS` is not set. You can run the script
from any directory (not only reporoot).

Test Plan: Run `lint.py` and `unit.py`, from the `scripts` directory and reporoot.

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4095437

Signature: t1:4095437:1477663516:13a7ac4270435c272077132915f9d02cc98a5afb
2016-10-28 13:58:48 +01:00
Jun Wu
781aea8725 arc: do not run lint on unrelated files
Summary:
"arc lint" runs the lint script for each file in parallel:

  >>> [5, pid=27257] <exec> $ scripts/lint.py 'scripts/lint.py'
  >>> [6, pid=27257] <exec> $ scripts/lint.py 'scripts/unit.py'
  >>> [7, pid=27257] <exec> $ scripts/lint.py 'tests/test-check-code-hg.t'
  >>> [8, pid=27257] <exec> $ scripts/lint.py 'tests/test-check-pyflakes-hg.t'

That looks fine but `lint.py` runs `test-check*.t` which will check all
files. This is a typical `N^2` behavior and needs to be fixed.

This diff changes the linter and test code so the test only checks the
single selected file.

Test Plan:
Run `arc lint --trace` and check `lint.py` time usage. It went down from
10 seconds to 2 seconds for this diff.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4051080

Signature: t1:4051080:1476985355:45845c6eb0e66cbfa000e61b7b496f2d00aeb042
2016-10-20 15:44:29 +01:00
Jun Wu
dc57735d63 arc: include test-check-code-hg in unit tests
Summary:
Previously, `arc unit` does not run `test-check-code-hg.t` and if people
have ignored lint errors, they may be ignored forever.

Since test-check-code-hg.t is relatively fast (3 seconds), let's also
run it during `arc unit`.

Test Plan: `arc unit` and confirm test-check-code-hg shows up.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4051073

Signature: t1:4051073:1476985307:5448827437ecee9add534855a0f87ac3c3bd1f84
2016-10-20 15:44:26 +01:00
Jun Wu
6e17356b2e arc: show pyflakes errors in lint
Summary: Pyflakes errors are worth looking.

Test Plan: `arc lint`

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4051066

Signature: t1:4051066:1476985284:378587efc0644fd395feb90f2580806364863012
2016-10-20 15:20:43 +01:00
Jun Wu
c11cddecf5 test-check: backport test-check-execute from core hg
Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4037205

Signature: t1:4037205:1476876512:e7659ce8add7fabacb50bb5fb3fe1f1d1744c304
2016-10-18 17:58:45 +01:00
Adam Simpkins
27acd63250 [arc] honor paths specified by "arc unit"
Summary:
Update MercurialTestEngine.php and the unit.py script to honor the list of
changed files computed by arcanist.

Previously the unit.py script always used the files that were changed since the
".^" commit.  At best this was doing redundant work since arc had already
computed the list of files to test.  At worst this was testing the wrong files
if arc had been invoked with a list of explicit files to check.

Test Plan:
Ran "arc unit tests/test-mergedriver.t" and confirmed it ran the
test-mergedriver.t test, regardless of the changes in my current commit and
working directory.  Confirmed that "arc unit" with no path arguments still
ran the tests relevant to my local changes.

Reviewers: quark, rmcelroy, mjpieters

Reviewed By: mjpieters

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4004727

Signature: t1:4004727:1476258607:d6adb5ec3d677f6d93016a994cadaa7a48df353a
2016-10-13 11:48:02 -07:00
Wez Furlong
cf7b371cf2 hg-new-workdir: suppress watchman warning during initial update
Summary: Updating another copy of the script from D3973940

Test Plan: Same as D3973940

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3973951

Signature: t1:3973951:1475659840:3bcf1c48a2332a1572bc6d450627b4fa9e8b338f
2016-10-05 03:25:53 -07:00
Adam Simpkins
8d1252d8d3 [unit] minor refactoring of interestingtests()
Summary:
This is just a minor performance clean-up of interestingtests(), even though
performance probably isn't a big deal here (unless we eventually get a very
large number of tests).

The old code was calling words(path) once per test file (for each path), rather
than just once.  I cleaned up the code so that we only call it once per path.

I also updated the code to build testwords as a dictionary so we can do an easy
lookup to find relevant tests for a given word, rather than having to do a
linear scan of all tests.  We now also don't bother computing the words for
test-check* tests.

Test Plan:
Manually confirmed that interestingtests() returns the expected test lists for
a variety of input paths.

Reviewers: simonfar, quark

Reviewed By: quark

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3935730

Signature: t1:3935730:1475052012:08b9a495c7c3e7fc2d0b9eaa097d5286874edf46
2016-09-28 12:08:10 -07:00
Adam Simpkins
68222e17e9 [unit] fix computation of changed files
Summary:
Make sure a nul byte is printed between the list of files changed in the
working directory and the files changed in the parent commit.

Previously these two lists were printed back-to-back, causing the last path
from the working directory to be joined with the first path from the parent
commit.

Also return the results as a set so we exclude duplicates if a file was changed
both in the working directory and in the current commit.

Test Plan:
Manually printed the changedfiles computed, and confirmed that the lists were
correct.

Reviewers: simonfar, durham, quark

Reviewed By: quark

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3935654

Signature: t1:3935654:1475053555:66da9102e312d8d345d00c4d41f76d41ce673069
2016-09-28 11:59:55 -07:00
Adam Simpkins
4f37b53188 Various improvements to scripts/unit.py
Summary:
- Set PYTHONPATH so we actually test the extensions from the local repository
  rather than the versions installed in the system's normal python library
  directories.
- Invoke the test runner directly with subprocess, rather than via a subshell,
  and always wait for it to exit, even if we receive an interrupt during the
  test run.
- Various other minor refactoring of argument parsing and handling of the json
  results file.

Test Plan:
Ran scripts/unit.py and confirmed it tested the local version of remotefilelog,
rather than the system version.

Reviewers: durham, simonfar, quark

Reviewed By: quark

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3935628

Tasks: 13595089

Signature: t1:3935628:1475052856:61480fddbf97c830496257b89be3999364ab7c31
2016-09-28 12:10:17 -07:00
Jun Wu
230550558a arc: do not pollute tty when running arc unit
Summary: It breaks CLI vim users.

Test Plan: Code Review

Reviewers: durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3915796

Signature: t1:3915796:1474662158:dfca849d9aa2914e799c267205178db67860d2d1
2016-09-23 21:20:46 +01:00
Adam Simpkins
1a72bd37c9 Make sure "arc unit" doesn't crash if there are no tests to run
Summary:
Make sure we write an empty results lists even if there are no interesting
tests to run.

(Alternatively, I could have made MercurialTestEngine.php handle a null result
from json_decode(), but this could also mean that the json results were
invalid, or that they had encoded data deeper than json_decode()'s recursion
limit.  Making sure unit.py always writes a result means we will still bail out
as desired if the result file was bogus for some reason.)

Test Plan: Ran "arc unit" on this diff.

Reviewers: simonfar, quark

Reviewed By: simonfar, quark

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3911461

Signature: t1:3911461:1474623139:f04f78dd5d5fa59f83e1171d21608eb38647142f
2016-09-23 12:35:31 -07:00
Jun Wu
71c96fe8ea arc: implement an arcanist unittest engine for mercurial
Summary:
This makes `arc unit` work for the repo.
Hopefully it helps improve the code quality.

Test Plan:
Run `arc unit`. Make some changes locally to confirm
it can handle skipped and failed tests.

Reviewers: #sourcecontrol, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3889495

Signature: t1:3889495:1474454314:b3fb7e538979c775f8301d9abdad0d6eda71e411
2016-09-19 22:41:58 +01:00
Ryan McElroy
d2a6af505b scm-prompt: use double square brackets everywhere
Summary: This is more robust and keeps the style consistent throughout

Test Plan: ran tests against zsh and bash

Reviewers: #sourcecontrol, ttung, zamsden

Reviewed By: zamsden

Subscribers: zamsden, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3597346

Signature: t1:3597346:1469073711:de76132bd9c161242d8d8171da765ddb54a806a2
2016-07-22 16:31:51 -07:00
Ryan McElroy
5b650eac6c scm-prompt: documentation update
Test Plan: eyeballs

Reviewers: #sourcecontrol, ttung, zamsden

Reviewed By: zamsden

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3597338

Signature: t1:3597338:1469073473:ead7a60fc01e099e8d631b19e3110fa91c6001af
2016-07-22 16:31:51 -07:00
Ryan McElroy
bc6e0f3097 scm-prompt: use proper name for active bookmark
Test Plan: ran tests against bash and zsh

Reviewers: #sourcecontrol, ttung, quark

Reviewed By: quark

Subscribers: zamsden, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3597333

Signature: t1:3597333:1469095299:af22e4e5a852d4d9641716c96abae09af1dd99c9
2016-07-22 16:31:51 -07:00
Ryan McElroy
b66be8cc47 scm-prompt: rename d to dir
Test Plan: run tests against bash and zsh

Reviewers: #sourcecontrol, ttung, zamsden

Reviewed By: zamsden

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3597324

Signature: t1:3597324:1469061271:509602a2a05e2ef4a1a55bea4859b18435bcd803
2016-07-22 16:31:51 -07:00
Ryan McElroy
77719aac66 scm-prompt: add compatiblity layer
Summary:
The old scm-prompt uses this longer, less awesome name.
Let's be backwards compatible with this and all that jazz.

Test Plan: tests pass under bash and zsh

Reviewers: #sourcecontrol, ttung, quark

Reviewed By: quark

Subscribers: quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3597315

Signature: t1:3597315:1469153052:98600400bb3cabf561294fd62f7cc601c280a1bd
2016-07-22 16:31:51 -07:00
Ryan McElroy
087100c291 scm-prompt: become robust against aliases
Summary:
Previously, aliases could screw up scm-prompt. We had seen earlier
issues with this (thus the --color=never), but this is a more generic and
robust solution, applied everywhere.

We can't use full paths because they differ on different hosts, so we still
rely on a reasonable $PATH, as we always have.

Test Plan: ran scm-prompt tests under bash and zsh

Reviewers: #sourcecontrol, ttung, zamsden

Reviewed By: zamsden

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3597300

Tasks: 12298139

Signature: t1:3597300:1469060969:e88be6bd79234167f039f2964117a738ffbb95f5
2016-07-22 16:31:51 -07:00
Wez Furlong
3fdff8880a fb-hgext: fix arc lint to catch the issue in D3236640
Summary:
we weren't matching this pattern:

```
$ ./scripts/lint.py

+++ /data/users/wez/facebook-hg-rpms/fb-hgext/tests/test-check-code-hg.t.err
@@ -37,6 +37,8 @@
   Skipping fastmanifest/tree_copy_test.c it has no-che?k-code (glob)
   Skipping fastmanifest/tree_diff.c it has no-che?k-code (glob)
   Skipping fastmanifest/tree_diff_test.c it has no-che?k-code (glob)
+  Skipping fastmanifest/tree_disk.c it has no-che?k-code (glob)
+  Skipping fastmanifest/tree_disk_test.c it has no-che?k-code (glob)
   Skipping fastmanifest/tree_iterate_rt.c it has no-che?k-code (glob)
   Skipping fastmanifest/tree_iterator.c it has no-che?k-code (glob)
   Skipping fastmanifest/tree_iterator.h it has no-che?k-code (glob)

ERROR: test-check-code-hg.t output changed
!
Failed test-check-code-hg.t: output changed
# Ran 1 tests, 0 skipped, 0 warned, 1 failed.
python hash seed: 583073521
```

Due to the way that arc lint works, we have to associate the linter issue
with the files that changed in the diff, but we don't have an easy way to
figure out the line number where the `no-check-code` line was added, so
we just use line number 0.

Test Plan:
`arc patch D3236640` and `arc lint`:

```
$ arc lint --everything


>>> Lint for fastmanifest/tree_disk.c:

   Error  (S&RX) CheckCode
    Update tests/test-check-code-hg.t to add Skipping
    fastmanifest/tree_disk.c it has no-che?k-code (glob)

    >>>        1 // Copyright 2016-present Facebook. All Rights Reserved.
               2 //
               3 // tree_disk.c: methods to persist to and restore from disk.
               4 //


>>> Lint for fastmanifest/tree_disk_test.c:

   Error  (S&RX) CheckCode
    Update tests/test-check-code-hg.t to add Skipping
    fastmanifest/tree_disk_test.c it has no-che?k-code (glob)

    >>>        1 // Copyright 2016-present Facebook. All Rights Reserved.
               2 //
               3 // tree_disk_test.c: tests to verify tree_disk
               4 //
```

Reviewers: #sourcecontrol, ttung, lcharignon

Reviewed By: lcharignon

Subscribers: lcharignon, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3237054

Signature: t1:3237054:1461949072:ac7cc29fcee9dbc00a4019088f3adb50de9625bf
2016-04-29 10:56:47 -07:00
Ryan McElroy
c750c7f3b3 scm-prompt: add original branch name to rebases 2016-04-29 09:14:36 -07:00
Ryan McElroy
41c40d9839 scm-prompt: add git cherry-picking and reverting 2016-04-29 09:13:49 -07:00
Ryan McElroy
5cf67fbdea scm-prompt: fix typo bug 2016-04-29 08:24:42 -07:00
Ryan McElroy
9b7985786a scm-prompt: move test to main test dir 2016-04-29 06:54:45 -07:00
Ryan McElroy
ff5f612e9e scm-prompt: update test for upstream behavior 2016-04-29 06:52:57 -07:00
Ryan McElroy
4033d08e4d scm-prompt: add test for hg behavior
Test Plan: ~/hgdev/hg/tests/run-tests.py -l

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: lcharignon, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3121692

Tasks: 10618514

Signature: t1:3121692:1461866367:d9e7b4a7fe2e8425027fcfa84cdf474acc17b1d6
2016-04-29 06:44:32 -07:00
Ryan McElroy
78ff089e6a scm-prompt: deal with shared bookmarks 2016-04-29 06:36:09 -07:00
Ryan McElroy
fc6fdac261 scm-prompt: follow physical directories when finding root 2016-04-29 06:36:09 -07:00
Ryan McElroy
e058b78a4e scm-prompt: add quotes to accommodate paths with spaces 2016-04-29 06:36:09 -07:00
Wez Furlong
e71ecbab09 fb-hgext: improve check code linter integration
Summary:
if you run `arc lint --output json` and don't have your environment correctly set up, the failure to run the linter was silently ignored.

I wanted to fix that, but then realized that we could integrate this better without too much effort, hence this diff.

This is a small python script that processes the output from the check code test and captures the appropriate context so that `arc lint` can show you where in the code the problem(s) lie.

Test Plan:
This is the output when the environment is not set up correctly:

```
 $ arc lint


>>> Lint for lint.py:

   Error  (S&RX) ENVIRON
    Please either set MERCURIALRUNTEST env var to the full path to
    run-tests.py, or add the containing directory to your $PATH

    >>>        1

   Error  (S&RX) ENVIRON
    Please either set MERCURIALRUNTEST env var to the full path to
    run-tests.py, or add the containing directory to your $PATH

    >>>        1
```

This is the same thing but in json output mode:

```
$ arc lint --output json
{".arcconfig":[]}
{"scripts\/lint.py":[]}
{"lint.py":[{"line":"1","char":null,"code":"S&RX","severity":"error","name":"ENVIRON","description":"Please either set MERCURIALRUNTEST env var to the full path to run-tests.py, or add the containing directory to your $PATH","original":null,"replacement":null,"granularity":1,"locations":[],"bypassChangedLineFiltering":null,"context":""},{"line":"1","char":null,"code":"S&RX","severity":"error","name":"ENVIRON","description":"Please either set MERCURIALRUNTEST env var to the full path to run-tests.py, or add the containing directory to your $PATH","original":null,"replacement":null,"granularity":1,"locations":[],"bypassChangedLineFiltering":null,"context":""}]}
```

This shows the lint errors from my `hg publish` stack:

```
>>> Lint for phabricator/arcconfig.py:

   Error  (S&RX) CheckCode
    don't raise generic exceptions

              18 def load_for_path(path):
              19     homedir = os.getenv('HOME')
              20     if not homedir:
    >>>       21         raise Exception('$HOME environment variable not found')
              22
              23     # Use their own file as a basis
              24     userconfig = _load_file(os.path.join(homedir, '.arcrc')) or {}
```

Reviewers: #sourcecontrol, ttung, lcharignon

Reviewed By: lcharignon

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3203666

Signature: t1:3203666:1461185075:e9b03c8251d7e3b8e965b81146d17cdeac75d837
2016-04-21 08:54:54 -07:00
Jun Wu
3768f713e9 Add editorconfig
Summary:
Editorconfig (http://editorconfig.org/) is a file format helping define coding
styles like spaces, tabs etc. It supports a wide range of editors. The upstream
is using it already.

This patch adds a simple .editorconfig, making it clear we use 8-char tabs in
C code, 4-char spaces in Python and Shell scripts, and we don't keep trailing
spaces.

Besides, do a style fixes for `scripts/runcheckcode.sh`. But note that
`scripts/scm-prompt.sh` is left untouched since it was copied from other
repository and we may sync it later.

Test Plan:
Use `gg=G` in vim to format `scripts/runcheckcode.sh` and make sure it does
not showed up in Phabricator with space changes ignored.

Reviewers: #sourcecontrol, durham, ttung

Reviewed By: durham

Subscribers: durham, mjpieters

Differential Revision: https://phabricator.fb.com/D3197242

Signature: t1:3197242:1461129423:e24a898370f8e8eb9bea8be414fee8670f06c16d
2016-04-20 03:05:42 -07:00
Jun Wu
a57b447851 runcheckcode: make lz4revlog an optional requirement
Summary:
Before this patch, `runcheckcode.sh` sets an extra config option
`extensions.lz4revlog=`, which will break if lz4revlog is not installed
in the system. This patch drops the config option if the repo does not
require `lz4revlog`.

Test Plan: Run `runcheckcode.sh` in both lz4revlog and non-lz4revlog repos.

Reviewers: #sourcecontrol, ttung

Reviewed By: ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3196200

Signature: t1:3196200:1461088741:11cfc8f3236f471e060e768c01a772072543e6fc
2016-04-19 11:00:44 -07:00
Laurent Charignon
b8efa60b36 arc: add a linter for check-code
Summary:
It was too easy to check in code that was not passing check-code. I
got tired of fixing it so let's add a linter :)

Test Plan:
Test that the linter works as expected and asks the user to provide
the location of run-tests.py if not set.

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3153365
2016-04-08 15:36:32 -07:00
Jing Qian
fa40278190 copy remote_bookmark reflog when sharing 2016-03-23 22:47:54 -07:00
Xudong Wang
f97848cf4b fixing hg-new-workdir script problem
Summary: Fixing issue [[ http://www.facebook.com/groups/sourcecontrol/permalink/908533209196300/?comment_id=908544142528540&offset=0&total_comments=3 | here ]]

Test Plan:
  $ hg-clone-fbsource --no-working-dir
  $ hg-new-workdir ~/fbsource/ ~/fbandroid/

expect hg not updating to tip

Reviewers: quark, rmcelroy

Reviewed By: rmcelroy

Differential Revision: https://phabricator.fb.com/D2700764

Tasks: 9048802

Signature: t1:2700764:1448914720:1218c99891cdd4be40369626cfc7d0c9c41ba811
2015-11-30 22:07:59 +00:00
Ryan McElroy
6653644dc8 add scm-prompt.sh 2015-05-13 10:49:24 -07:00
Ryan McElroy
e4914e56d3 add hg-new-workdir 2015-05-13 13:15:59 -07:00