1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-10-24 09:38:50 +02:00
Commit graph

8 commits

Author SHA1 Message Date
dschleimer
82d05fee9f [arcanist] add system arc config file
Summary:
Adds a system arc config file with precedence below the user config
file, both to ArcanistWorkingCopyIdentity::readConfigFromAnySource()
and to base commit resolution.

Test Plan:
[14:48:45 Mon Jun 25 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist system_config 21245 $ cat /etc/arcconfig
{
    "base": "literal:foobar"
}
[14:52:31 Mon Jun 25 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist system_config 21246 $ ./bin/arc get-config base
(system) base = literal:foobar
(global) base =

[14:52:39 Mon Jun 25 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist system_config 21247 $ ./bin/arc which --show-base --base 'arc:system'
foobar

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1233

Differential Revision: https://secure.phabricator.com/D2854
2012-06-25 15:14:11 -07:00
epriestley
4448bd09c7 Call clearstatcache() after changing ~/.arcrc permissions
Summary: Otherwise we'll get a cached result from fileperms() if we end up here again.

Test Plan: `chmod 644 ~/.arcrc ; arc help` no longer double prompts when run from outside of a .arcconfig working copy.

Reviewers: csilvers

Reviewed By: csilvers

CC: aran

Maniphest Tasks: T1359

Differential Revision: https://secure.phabricator.com/D2752
2012-06-14 12:30:21 -07:00
dschleimer
5089cd7de1 [Arcanist] add a local (per working copy) config file
Summary:
This adds the concept of a local (i.e. working copy local) config file
to arc.  This config file has the highest precedence for config
settings that may come from any config file.  The config is stored in
.(git|hg|sv)/arc/config, and is read ahead of the project config by
getConfigFromAnySource().

Test Plan:
#Testing arc set-config and arc get-config

[16:57:04 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19410 $ ./bin/arc get-config
(global) default = https://phabricator.fb.com/conduit

[16:57:12 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19410 $ ./bin/arc set-config foo bar
Set key 'foo' = 'bar' in global config.

[16:57:23 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19411 $ ./bin/arc get-config
(global) default = https://phabricator.fb.com/conduit
(global) foo = bar

[16:57:26 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19411 $ ./bin/arc set-config --local foo baz
Set key 'foo' = 'baz' in local config.

[16:57:35 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19412 $ ./bin/arc get-config
(global) default = https://phabricator.fb.com/conduit
(global) foo = bar
(local) foo = baz

[16:57:39 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19412 $ ./bin/arc set-config foo ''
Deleted key 'foo' from global config (was 'bar').

[16:57:49 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19413 $ ./bin/arc get-config
(global) default = https://phabricator.fb.com/conduit
(global) foo =
(local) foo = baz

[16:57:51 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19413 $ ./bin/arc set-config --local foo ''
Deleted key 'foo' from local config (was 'baz').

[16:58:05 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19414 $ ./bin/arc get-config
(global) default = https://phabricator.fb.com/conduit

#testing getConfigFromAnySource by means of lint

[11:26:57 Wed Jun 13 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19612 $ ./bin/arc set-config lint.engine BogusLintEngine
Set key 'lint.engine' = 'BogusLintEngine' in global config.

[11:30:04 Wed Jun 13 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19613 $ ./bin/arc set-config --local lint.engine DummyLintEngine
Set key 'lint.engine' = 'DummyLintEngine' in local config.

[11:30:19 Wed Jun 13 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19587 $ ./bin/arc lint
Exception
Failed to load symbol 'DummyLintEngine'. If this symbol was recently added or moved, your library map may be out of date. You can rebuild the map by running 'arc liberate'. For more information, see: http://www.phabricator.com/docs/phabricator/article/libphutil_Libraries_User_Guide.html
(Run with --trace for a full exception trace.)

[11:30:25 Wed Jun 13 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19586 $ ./bin/arc set-config --local lint.engine ''
Deleted key 'lint.engine' from local config (was 'DummyLintEngine').

[11:30:34 Wed Jun 13 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
arcanist local_config 19587 $ ./bin/arc lint
 OKAY  No lint warnings.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1233

Differential Revision: https://secure.phabricator.com/D2739
2012-06-13 16:02:29 -07:00
Jamie Wong
0aaa13016c Use getConfigFromAnySource when checking for immutable_history 2012-06-11 10:15:28 -04:00
vrana
6433f7ff3d Allow skipping unit tests and support 'repeat' workflow arguments
Summary:
We run all tests before deploy but some of them are expected to fail.
We need to skip them.
It can be useful also for someone else.

I don't propagate this to `arc diff` as that would be much more complicated - we would need a new state 'partially skipped'.

The 'path' argument needs to be a file, skipping whole dirs is not supported.
The 'path' argument is in fact engine specific and engines can support format like 'Class::testMethod' but I didn't bother to document it to not confuse people.

Test Plan:
`arc unit --skip test.php`
`arc unit --skip ../src/test.php`

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2673
2012-06-07 17:42:49 -07:00
Jamie Wong
1ea5e7e9cf Support mutable history in mercurial for arc diff and arc amend
Summary:
This adds basic support for mutable history for arc diff and arc amend for
mercurial. This is purely opt-in (so it shouldn't affect anyone who doesn't want
this feature) by explicitly setting

    "immutable_history" : false

in arc configuration.

This also fixes another instance of weird behaviour for multiple heads - the
first instance was fixed here:
https://github.com/facebook/arcanist/pull/28

Test Plan:
without "immutable_history" turned on)>

When ##arc diff## produces an update diff, it should list only commits that are
ancestors of the current revision - not ones from other heads.

Reviewers: epriestley

CC: csilvers, aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2654
2012-06-07 15:29:24 -04:00
epriestley
d016f81135 Add "--conduit-timeout" to arc and modernize argument parsing
Summary:
We added "repeat" to PhutilArgumentParser a while ago, so we can modernize the rest of the argument parsing (allow multiple --load-phutil-library flags).

Add a "--conduit-timeout" flag to allow users to set the timeout. See D2602.

Test Plan:
  $ arc diff --conduit-timeout=0.01
  Exception
  [cURL/28] <CURLE_OPERATION_TIMEOUTED> The request took too long to complete.
  (Run with --trace for a full exception trace.)
  $ arc diff --conduit-version 33
  Exception
  ERR-BAD-VERSION: Your 'arc' client version is '33', which is newer than the server version, '5'. Upgrade your Phabricator install.
  (Run with --trace for a full exception trace.)
  $ arc diff --conduit-uri http://derp.derp/
  Usage Exception: YOU NEED TO INSTALL A CERTIFICATE TO LOGIN TO PHABRICATOR

  You are trying to connect to 'http://derp.derp/api/' but do not have a certificate installed for this host. Run:

        $ arc install-certificate

  ...to install one.
  $ arc diff --load-phutil-library src --load-phutil-library ../phabricator/src --trace
  Loading phutil library '0' from '/INSECURE/devtools/arcanist/src'...
  Loading phutil library '1' from '/INSECURE/devtools/phabricator/src'...

Reviewers: phleet, vrana, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2603
2012-06-03 08:31:49 -07:00
vrana
0b45ec30be Move files in Arcanist one level up
Summary:
- `kill_init.php`
- Manually change library map.
- Manually rename `/data/` test dirs.
- [src/lint/linter] `git mv base/ArcanistLinterTestCase.php __tests__/`
- `arc liberate`

Test Plan: Browse around to make sure I like it better, especially `repository/api`, and `workflow`.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Koolvin

Maniphest Tasks: T1103

Differential Revision: https://secure.phabricator.com/D2637
2012-06-01 11:56:00 -07:00
Renamed from src/workflow/base/ArcanistBaseWorkflow.php (Browse further)