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

20 commits

Author SHA1 Message Date
epriestley
31ec011922 Move some VCS-specific logic into VCS APIs
Summary:
We have some git-specific logic on main pathways which should be in the API
class, move it around so "arc lint" with an engine works under Mercurial. This
resovles the error @makinde reported:

> PHP Catchable fatal error:  Argument 1 passed to
ArcanistBaseWorkflow::parseGitRelativeCommit() must be an instance of
ArcanistGitAPI, instance of ArcanistMercurialAPI given, called in
/home/makinde/.arc_install/arcanist/src/workflow/lint/ArcanistLintWorkflow.php
on line 131 and defined in
/home/makinde/.arc_install/arcanist/src/workflow/base/ArcanistBaseWorkflow.php
on line 830

Test Plan: Ran "arc diff" in git and hg working copies, plus "arc lint" with a
configured "lint_engine".

Reviewers: Makinde, aran, jungejason, nh, tuomaspelkonen

Reviewed By: Makinde

CC: aran, Makinde

Differential Revision: 935
2011-09-15 07:39:34 -07:00
mgummelt
e9b7f8e3ca Merge branch 'master' of github.com:facebook/arcanist into get_engine 2011-09-08 18:26:07 -07:00
mgummelt
3250cbb4d3 two small changes for "arc unit" post hook
Summary:
1) unit engine getter method in the unit workflow

   we store some information (unit test results) in the engine that we
   need to access in the "arc unit" post hook

2) make requireCleanWorkingCopy() public

   "arc unit" doesn't need to be clean in general, but we'd like the
   option to upgrade the workflow to require it if necessary.  We use
   this for ensuring a repo is clean before updating unit test
   results.

Test Plan: Used both features in a custom post hook in arc unit

Reviewers: epriestley

Reviewed By: epriestley

CC: dpepper, aran, epriestley

Differential Revision: 917
2011-09-08 18:25:54 -07:00
epriestley
58c09ab36d Improve Arcanist Mercurial support
Summary:
  - Build the manifest of file changes so unit and lint workflows work.
  - Default to creating a diff between the parent of the first outgoing change
and the tip.

Test Plan:
  - Ran "arc diff" in a dirty mercurial repo, got warned about
untracked/uncommitted changes.
  - Ran "arc diff" in a clean mercurial repo, got a diff of everything I'd done
locally.

Reviewed By: aran
Reviewers: Makinde, aran, jungejason, tuomaspelkonen
CC: aran, epriestley
Differential Revision: 796
2011-08-09 19:16:36 -07:00
epriestley
40b445b387 Fix a variable usage
Summary: This stopped being available in scope when I refactored this
recentlyish.
Test Plan: Got error, saw useful message.
Reviewed By: jungejason
Reviewers: mgummelt, jungejason, tuomaspelkonen, aran
CC: aran, epriestley, jungejason
Differential Revision: 787
2011-08-07 16:04:20 -07:00
epriestley
57ff80e6c4 Provide "arc upload --json"
Summary:
  - Provide a "--json" flag for "arc upload"
  - Unify some of the stderr stuff across upload/download/paste.

Test Plan:
  - Ran "arc upload" and "arc upload --json", piped stderr away with 2>/dev/null
to verify only JSON got emitted to stdout
  - Ran "arc paste"

Reviewed By: codeblock
Reviewers: codeblock, jungejason, tuomaspelkonen, aran
CC: aran, codeblock
Differential Revision: 749
2011-08-01 17:44:43 -07:00
epriestley
8150fdf044 Deprecate ArcanistBaseWorkflow::getUserGUID in favor of "PHID"
Summary: One day all "GUID" references will be gone, maybe.
Test Plan: grep, ran workflow before changing and got a warning about
deprecation
Reviewed By: aran
Reviewers: mgummelt, tuomaspelkonen, aran, jungejason
CC: aran
Differential Revision: 671
2011-07-15 12:52:17 -07:00
epriestley
41b23519e6 Move Conduit management into Workflow
Summary:
The primary goal of this is to allow pre/post workflow hooks to upgrade a
workflow which doesn't require conduit into one which does, or one which doesn't
require authentication into one which does. They do this by calling
$workflow->establishConduit() or $workflow->authenticateConduit() respectively.

It also removes a bunch of dead code and a bunch of now-unnecessary public
interfaces.

Test Plan:
Broke my certificate and ran "arc list", "arc unit", "arc help", "arc
call-conduit".
Restored my certificate and re-ran the commands.

Reviewed By: mgummelt
Reviewers: mgummelt, jungejason, tuomaspelkonen, aran
CC: aran, epriestley, mgummelt
Differential Revision: 664
2011-07-15 12:38:45 -07:00
epriestley
182e260472 Verify that ~/.arcrc is 600 before reading from it
Summary:
Since this has auth information in it now, we should prevent other users on the
system from reading it. Detect readable files and prompt the user to fix them.

Test Plan:
Did "o+r" on my ~/.arcrc, ran "arc list", got prompted, hit "Y", verified it set
perms to 600, ran "arc list" again and wasn't prompted.

Reviewed By: jungejason
Reviewers: fratrik, jungejason, aran, tuomaspelkonen
CC: aran, jungejason, epriestley
Differential Revision: 532
2011-06-26 11:55:31 -07:00
epriestley
d73179ea99 "arc install-certificate", client side changes
Summary:
Provide an "install-certificate" workflow to simplify ~/.arcrc edits. See also
D460.

Test Plan:
Installed certificates via "arc install-certificate".

Reviewed By: aran
Reviewers: aran, jungejason, tuomaspelkonen
CC: aran, epriestley
Differential Revision: 465
2011-06-20 05:48:40 -07:00
epriestley
13ea6ea5b6 Add basic binary file support to 'arc patch'
Summary:
I'm probably missing some edge cases but it took me almost 3 hours to get this
far and I think it only makes things work that didn't work before. Some stuff
like SVN binary patches still won't work, although they should be far easier to
implement.

Most of the magic here just comes from reading the git source code. It appears
to work correctly; I sprinkled printf() around git liberally and recompiled it
during development. Took me about 45 minutes to figure out that "Index" vs
"index" causes git to silently fail in a confusing way. :/

Git has a diff mode for binary changes but I don't think we lose much by always
using the full binaries. We can enhance it later if we want.

Test Plan:
Exported and patched binary changes (a picture of a duck) into a working copy.

Reviewed By: aran
Reviewers: tuomaspelkonen, jungejason, aran
CC: simpkins, aran, epriestley
Differential Revision: 327
2011-05-22 06:58:16 -07:00
epriestley
628de7d7a1 Make all the working-copy-paths errors extremely explicit. 2011-03-12 18:23:52 -08:00
epriestley
982e482290 Make some UI things less confusing and reduce the amount of horrific torture
that arc apparently inflicts upon users.

Summary:

Test Plan: .

Reviewers:

CC:

Differential Revision: 223104
2011-03-12 17:59:15 -08:00
epriestley
5099b005cf Some documentation.
Summary:

Test Plan:

Reviewers:

CC:
2011-02-19 11:36:08 -08:00
epriestley
83a0083b3b Improve argument passthru behavior to make added args available to test engines.
Summary:
When you add new arguments to the unit command, they need to be
threaded through to the unit engine. This enables you to specify passthru
command which will be shipped through the callstack.

Test Plan:
Ran 'arc diff --maxtests 8 --apply-patches --trace' and verified
resulting behavior was correct.

Differential Revision: 207877
Reviewed By: dschleimer
Reviewers: dschleimer
CC: dschleimer
Revert Plan:
OK
2011-02-01 20:45:32 -08:00
epriestley
4818892841 Basic 'shell-complete' workflow.
Summary:
Adds data-driven shell completion help to arcanist.

Test Plan:
ran various commands in git and svn working copies,
output seemed reasonable

Differential Revision: 201754
Reviewed By: adonohue
Reviewers: mroch, adonohue
Commenters: crackerjack
CC: epriestley, adonohue, achao
Revert Plan:
OK
2011-01-17 20:18:27 -08:00
epriestley
bb7e649fa5 Ship lint warnings to Differential.
Summary: Send skipped lint warnings to Differential. This also fixes a nasty
bug with lint excluding too many warnings based on line changes.

Test Plan: meta

Reviewers:

CC:

Differential Revision: 200387
2011-01-11 20:45:36 -08:00
epriestley
efb8219196 Fix some problems with the module linter that would cause various conflicting
warnings raised in __init__.php to overwrite eachother in uncomfortable ways.
2011-01-09 20:40:31 -08:00
epriestley
2c235bdf38 Fix a couple of lint issues, and update to version 2 (github). 2011-01-09 15:51:04 -08:00
epriestley
2e73916fa2 Initial commit. 2011-01-09 15:22:25 -08:00