]> khamidou — GitHub mirrors - arcanist.git/log
arcanist.git
15 years ago'arc diff' passes the diff ID to Test Engine class.
tuomaspelkonen [Fri, 27 May 2011 23:15:43 +0000 (16:15 -0700)]
'arc diff' passes the diff ID to Test Engine class.

Summary:
Test Engine classes might need the differential Diff ID to be
able to attach postponed test results to diffs.

Test Plan:
Added setDifferentialDiff function to PhutilUnitTestEngine class
and made sure it was called with the correct diff ID when running
'arc diff --preview'

Reviewed By: jungejason
Reviewers: jungejason, grglr
Commenters: sgrimm
CC: epriestley, sgrimm, slawekbiel, aran, tuomaspelkonen, jungejason
Differential Revision: 395

15 years agoReorganize documentation.
epriestley [Tue, 31 May 2011 19:14:20 +0000 (12:14 -0700)]
Reorganize documentation.

15 years agoAllow 'arc diff' to detect non-UTF8 files and mark them binary
epriestley [Sat, 21 May 2011 14:16:12 +0000 (07:16 -0700)]
Allow 'arc diff' to detect non-UTF8 files and mark them binary

Summary:
There are a bunch of different ways we could approach this, but practically I
think this is probably the best one even though it's kind of yucky.

A big part of my motivation here is that if we just reject UTF-8 outright, users
are going to end up in a situation they don't understand how to resolve.

UPDATE: after discussion, going with a more conservative approach until such
time as we have a more compelling case for the less strict functionality.

Test Plan:
Created a diff with a text file that contained invalid UTF-8 subsequences.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran
Commenters: aran
CC: aran, epriestley, tuomaspelkonen
Differential Revision: 325

15 years agoDisable 'textconv' when diffing
epriestley [Sun, 29 May 2011 17:45:18 +0000 (10:45 -0700)]
Disable 'textconv' when diffing

Summary:
Adds "--no-textconv" to all 'git diff' commands so we don't invoke textconv. See
T178 for discussion.

Test Plan:
Added something like this to .gitattributes:

  *.txt diff=uppercase

And then this to .git/config:

  [diff "uppercase"]
    textconv = /path/to/uppercase

...where "uppercase" is a script which takes a file and emits an uppercase
version of it.

Then I added a "wisdom.txt" text file:

  The cow goes "moo".
  The duck goes "quack".

Without this patch, the file appears in uppercase in Differential, i.e. textconv
runs. With this patch, it appears as the original text.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran
CC: elgenie, aran, tuomaspelkonen
Differential Revision: 372

15 years agoMake sure 'id' and 'idx' are not marked as builtin functions?
epriestley [Sat, 28 May 2011 15:15:00 +0000 (08:15 -0700)]
Make sure 'id' and 'idx' are not marked as builtin functions?

Summary:
This is sort of a guess. In D357, arc has gone crazy and removed a bunch of
'utils' dependencies for gc3. I think this is because his HPHP/i has them marked
as builtins.

However, I don't have an HPHP/i build (and probably don't have the fortitude to
build it outside of a Facebook environment, I spent about two hours on it at one
point and got maybe 25% of the way through the build process before running into
things I didn't know how to resolve) so I'm not sure this is the issue. No one
else's diffs have exhibited this problem eitehr, so I'm not confident this is
actually the problem or solution.

gc3, can you apply this locally to a copy of arcanist and then run 'arc lint'
(or 'arc lint --apply-patches') on your commit and see if it restores all the
libphutil/utils requirements?

Test Plan:
unable, see summary

Added 'array_keys' to this blacklist and verified the technical behavior of the
patch is correct by var_dump()'ing builtins.

Reviewed By: gc3
Reviewers: gc3, tuomaspelkonen, jungejason, aran
CC: aran, gc3, epriestley
Differential Revision: 361

15 years agoAdd .divinercache to .gitignore.
epriestley [Thu, 26 May 2011 01:51:46 +0000 (18:51 -0700)]
Add .divinercache to .gitignore.

15 years agoMerge pull request #1 from lovrop/master
Evan Priestley [Thu, 26 May 2011 00:16:07 +0000 (17:16 -0700)]
Merge pull request #1 from lovrop/master

Lint rule for duplicate keys in array literals

15 years agoLint rule for duplicate keys in array literals
Lovro Puzar [Wed, 25 May 2011 19:24:25 +0000 (12:24 -0700)]
Lint rule for duplicate keys in array literals

Summary:
Raise an error if an array is initialized with the same key present more than
once.

Test Plan:
bin/arc unit
Also added some duplicates to ArcanistXHPASTLinter.php and verified the output
of bin/arc lint.

Reviewed By: epriestley
Reviewers: jungejason, epriestley, aran
CC: aran, epriestley
Revert Plan:
Tags:

Differential Revision: 346

15 years agoarc lint: add support for PyLint
Andrew Gallagher [Sun, 22 May 2011 10:32:26 +0000 (03:32 -0700)]
arc lint: add support for PyLint

Summary:
Provides a lint class as a wrapper around the external project PyLint.
This exposes some arc config variables to control the behavior:

lint.pylint.prefix - non-standard installation location of pylint
lint.pylint.logilab_astng.prefix - non-standard installation location
  of logilab-astng, a dependency of pylint
lint.pylint.logilab_common.prefix - non-standard installation location
  of logilab-common, a dependency of pylint
lint.pylint.codes.{error,warning,advice} - regexes matching against
  PyLint message codes which should trigger arc errors/warnings/advice
lint.pylint.options - options to pass PyLint

Test Plan:
used to lint python code

Reviewed By: epriestley
Reviewers: epriestley, jungejason
CC: aran, epriestley
Differential Revision: 343

15 years agoImage files should also be treated as binary files when patching.
tuomaspelkonen [Wed, 25 May 2011 00:07:14 +0000 (17:07 -0700)]
Image files should also be treated as binary files when patching.

Summary:
Arc patch for image files failed, because they were treated like text
files.

Test Plan:
Tested that 'arc patch' worked for a png file.

Reviewed By: jungejason
Reviewers: epriestley, jungejason
CC: aran, jungejason
Differential Revision: 341

15 years agoAdd basic binary file support to 'arc patch'
epriestley [Sat, 21 May 2011 14:52:49 +0000 (07:52 -0700)]
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

15 years agoarc lint: add support for PyFlakes
Andrew Gallagher [Thu, 19 May 2011 09:00:59 +0000 (02:00 -0700)]
arc lint: add support for PyFlakes

Summary:
Provide a simple linter wrapper around pyflakes.  This relies on finding
pyflakes via:
- lint.pyflakes.path - arcconfig setting of absolute path to pyflakes
- lint.pyflakes.prefix - arcconfig setting of the prefix that pyflakes
  was installed under
- users path

Test Plan:
linted python code with PyFlakes warnings

Reviewed By: epriestley
Reviewers: jungejason, epriestley
Commenters: jungejason
CC: aran, epriestley, andrewjcg, jungejason
Differential Revision: 310

15 years agoarc lint: fix typo in PEP8 linter
Andrew Gallagher [Thu, 19 May 2011 20:38:18 +0000 (13:38 -0700)]
arc lint: fix typo in PEP8 linter

Test Plan:
linted!

Reviewed By: jungejason
Reviewers: epriestley, jungejason
CC: aran, jungejason
Differential Revision: 314

15 years agoDetect library conflicts in Arcanist and raise a very specific error message
epriestley [Thu, 19 May 2011 17:13:44 +0000 (10:13 -0700)]
Detect library conflicts in Arcanist and raise a very specific error message

Summary:
When you run one copy of arcanist against another copy, you previously got a
meaningless error. After D311 you get a slightly more meaningful error.

Capture the new exception and raise an extremely specific error.

NOTE: Adding arcanist to .arcconfig forces the library conflict error to
trigger; otherwise there's just an implicit conflict because 'arc' reads the
running-copy library amp instead of the working-copy library map. This only
worked before because arcanist includes itself.

Test Plan:
Ran arcanist on a different copy of arcanist, got a good error message.

Reviewed By: jungejason
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, jungejason, epriestley
Differential Revision: 312

15 years agoUse phutil_passthru() in "arc commit" instead of passthru().
epriestley [Wed, 18 May 2011 17:32:00 +0000 (10:32 -0700)]
Use phutil_passthru() in "arc commit" instead of passthru().

Summary:
passthru() doesn't show up on --trace, and one time a while ago someone had an
issue which was harder than necessary to debug because the command wasn't
avialable in the log. Use the logged version.

Also fix a locale issue I ran into on my local machine, with "en_US.utf8" not
being a valid locale.

Test Plan:
Created an SVN repo and used "arc commit" to make commits against it.

Reviewed By: jungejason
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, epriestley, jungejason
Differential Revision: 306

15 years agoarc lint: fix/enable PEP8 linter
Andrew Gallagher [Wed, 18 May 2011 23:04:06 +0000 (16:04 -0700)]
arc lint: fix/enable PEP8 linter

Summary:
This diff:
- Adds the PEP8 linter to the externals directory
- Changes the path for finding pep8.py
- Removes use of execx since pep8.py return an errors code
  when it finds PEP8 violations

Test Plan:
tested linting python code

Reviewed By: epriestley
Reviewers: epriestley, jungejason
CC: aran, epriestley
Differential Revision: 309

15 years agoarc diff: --only doesn't conflict with --nounit or --nolint
Adam Simpkins [Tue, 17 May 2011 19:54:38 +0000 (12:54 -0700)]
arc diff: --only doesn't conflict with --nounit or --nolint

Summary:
The --only flag implies --nounit and --nolint, so there's really no
conflict if these flags are specified together.

(My wrapper around arc diff automatically specifies --nounit in some
cases.  It is useful to be able to manually add --only in some cases,
and not have it fail because it conflicts with the automatically
specified --nounit flag.)

Test Plan:
Ran "arc diff --only --nounit".

Reviewed By: epriestley
Reviewers: epriestley, jungejason
CC: aran, epriestley, simpkins
Differential Revision: 298

15 years agolint: fail early if no lint engine is defined
Adam Simpkins [Tue, 17 May 2011 19:43:49 +0000 (12:43 -0700)]
lint: fail early if no lint engine is defined

Summary:
Update the lint workflow to exit immediately it there is no lint engine
configured.  Previously it scanned the repository to find the paths to
check before failing in this case.  Scanning the repository can be
relatively slow on large repositories.

Test Plan:
Ran "arc lint" in a large repository with no lint engine configured.
Verified that it failed quickly, without scanning the repository first.

Reviewed By: jungejason
Reviewers: jungejason, epriestley
CC: aran, jungejason
Differential Revision: 297

15 years ago'arc liberate', convenience wrapper for various libphutil operations
epriestley [Wed, 11 May 2011 23:30:22 +0000 (16:30 -0700)]
'arc liberate', convenience wrapper for various libphutil operations

Summary:
The story for creating and maintaining libphutil libraries and modules
is pretty terrible right now: you need to know a bunch of secret scripts and
dark magic. Provide 'arc liberate' which endeavors to always do the right thing
and put a library in the correct state.

Test Plan:
Ran liberate on libphutil, arcanist, phabricator; created new
libphutil libraries, added classes to them, liberated everything, introduced
errors etc and liberated that stuff, nothing was obviously broken in a terrible
way..?

Reviewed By: aran
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, epriestley
Differential Revision: 269

15 years agoUpdate arcanist to use PhutilServiceProfiler.
epriestley [Mon, 16 May 2011 23:07:10 +0000 (16:07 -0700)]
Update arcanist to use PhutilServiceProfiler.

Summary:
Switch to the new PhutilServiceProfiler API.

Test Plan:
Ran "arc" with "--trace", got mostly reasonable output. I'll clean up conduit
output in a followup.

Reviewed By: aran
Reviewers: aran, jungejason, tuomaspelkonen
CC: aran
Differential Revision: 292

15 years agoStop undeclared variable warning for $obj->{$prop} syntax
epriestley [Thu, 12 May 2011 01:51:25 +0000 (18:51 -0700)]
Stop undeclared variable warning for $obj->{$prop} syntax

Summary:
This isn't necessarily a root-cause solution but this syntax is really really
bad. If we want to fix the root cause, I'd recommend making its use a lint
error?

Test Plan:
Unit tests failed before patch, passed afterward.

Reviewed By: aran
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran
Differential Revision: 270

15 years agoAllow ArcanistLinter to load files not directly affected by lint
epriestley [Fri, 6 May 2011 15:34:18 +0000 (08:34 -0700)]
Allow ArcanistLinter to load files not directly affected by lint

Summary:
This is necessary for the Javelin linters. The libphutil and flib linters do it
implicitly, so there's no real tradeoff here.

Test Plan:
Ran javelin linters.

Reviewed By: tuomaspelkonen
Reviewers: tomo, aran, jungejason, tuomaspelkonen
CC: aran, tuomaspelkonen, epriestley
Differential Revision: 238

15 years agomark remote hooks
epriestley [Fri, 6 May 2011 22:35:07 +0000 (15:35 -0700)]
mark remote hooks

15 years agoRestore "arc patch D12345" syntax
epriestley [Fri, 6 May 2011 19:08:57 +0000 (12:08 -0700)]
Restore "arc patch D12345" syntax

Summary:
I only dropped this because it's slightly inconvient to accommodate, but
empirically it's pretty confusing to users (who often use --diff 12345 when they
mean --revision 12345).

Test Plan:
Ran "arc patch D45", "arc patch --revision 45", "arc help patch"

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran
CC: aran, tuomaspelkonen
Differential Revision: 241

15 years agoProvide 'arc call-conduit' to facilitate script integration with Phabricator
epriestley [Fri, 6 May 2011 15:43:38 +0000 (08:43 -0700)]
Provide 'arc call-conduit' to facilitate script integration with Phabricator

Summary:
Provide a formal mechanism for making conduit calls from other scripts.

Test Plan:
Called 'conduit.ping'.

Reviewed By: jungejason
Reviewers: aran, jungejason, tuomaspelkonen
CC: aran, jungejason
Differential Revision: 239

15 years agoMake the rule for applying git diff less restrict
jungejason [Fri, 6 May 2011 00:07:39 +0000 (17:07 -0700)]
Make the rule for applying git diff less restrict

Summary:
the current command to apply a git diff is 'git apply --index',
which will fail the whole patch and does not touch the working tree when
some of the hunks do not apply. We want to allow the user to patch the
ones which apply.

Test Plan:
run 'arc apply' against a diff whcih partially applies and
verify that the hunks which apply are applied, and .rej files are
generated for the rest.

Reviewed By: simpkins
Reviewers: simpkins, epriestley
Commenters: ju
CC: aran, slawekbiel, simpkins, ju
Differential Revision: 235

15 years agoinit invest
jungejason [Wed, 13 Apr 2011 21:18:30 +0000 (14:18 -0700)]
init invest

15 years agoAdded 'edit' field to 'getcommitmessage' conduit calls.
tuomaspelkonen [Tue, 3 May 2011 01:54:20 +0000 (18:54 -0700)]
Added 'edit' field to 'getcommitmessage' conduit calls.

Summary:
Server log was showing errors for undefined index 'edit'.

Test Plan:
arc lint

Reviewed By: jungejason
Reviewers: jungejason, grglr
Commenters: grglr
CC: aran, epriestley, grglr, jungejason, tuomaspelkonen
Differential Revision: 217

15 years agoProvide setup/teardown hooks for ArcanistPhutilTestCase
epriestley [Sat, 30 Apr 2011 16:54:47 +0000 (09:54 -0700)]
Provide setup/teardown hooks for ArcanistPhutilTestCase

Summary:
I'm making a move on Lisk stubbability and need these so I can set up
Lisk isolation unconditionally in Phabricator tests. Also document and organize
this class.

Test Plan:
Changed the expected counts in the meta-tests and got failures. Ran
all unit tests.

Reviewed By: aran
Reviewers: aran, jungejason, tuomaspelkonen
CC: aran
Differential Revision: 192

15 years agoAggregate display of postponed tests
slawekbiel [Thu, 28 Apr 2011 18:46:20 +0000 (11:46 -0700)]
Aggregate display of postponed tests

Summary:
Displaying each postponed test separately was spammy.
Now it will only display a single line with the total count

Test Plan:
~/local/arcanist/bin/arc unit --sandcastle-tests
35 tests to run.
Completed 'ParentInfoTestCase.php'
Interrupted 'MentionsUntagTestCase.php'
    PASS  ParentInfoTestCase
  POSTPONED  34 tests

Reviewed By: sgrimm
Reviewers: jungejason, sgrimm
CC: sgrimm
Revert Plan:
sure

Other Notes:

Differential Revision: 173

15 years agoadd short option for fetching git revision hash
slawekbiel [Wed, 27 Apr 2011 21:10:19 +0000 (14:10 -0700)]
add short option for fetching git revision hash

Summary:
Sometimes we need to show abbreviated hashes, passing --short is more
reliable than substring of fixed number of characters.

Test Plan:
- called with and without the parameter, got correct results
           -

Reviewed By: jungejason
Reviewers: jungejason
CC: jungejason
Revert Plan:
sure

Other Notes:

Differential Revision: 170

15 years agoStop this from failing on directories, etc.; u-u-u-u-ultra clown.
epriestley [Mon, 11 Apr 2011 23:13:22 +0000 (16:13 -0700)]
Stop this from failing on directories, etc.; u-u-u-u-ultra clown.

15 years agoLoad more context for lint only if the files actually exist.
epriestley [Mon, 11 Apr 2011 21:53:48 +0000 (14:53 -0700)]
Load more context for lint only if the files actually exist.

15 years agoArc cover handles a file that is added and modified correctly.
tuomaspelkonen [Mon, 11 Apr 2011 20:54:00 +0000 (13:54 -0700)]
Arc cover handles a file that is added and modified correctly.

Summary:
Modifying a new file and running 'arc cover' before committing the
modifications confused arc. The problem was that 'unstaged' status
erased 'added' status and this caused problems.

Test Plan:
Tested that arc cover ignores added files when they are modified, but
old files that are modified are still handled correctly by arc cover.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, epriestley
Differential Revision: 122

15 years agoLoad files which we don't directly examine, since there are some common cases
epriestley [Sun, 10 Apr 2011 23:05:44 +0000 (16:05 -0700)]
Load files which we don't directly examine, since there are some common cases
where we either generate an entire file or an external script examines it.

15 years agoImprove workflow for missing certificates.
epriestley [Sun, 10 Apr 2011 20:09:31 +0000 (13:09 -0700)]
Improve workflow for missing certificates.

15 years agoImprove lint rendering
adonohue [Sat, 9 Apr 2011 02:10:27 +0000 (19:10 -0700)]
Improve lint rendering

Summary:
Declare victory like it's the United States.

Test Plan:
www copyright, apache copyright, control keyword whitespace and trailing
whitespace lint warnings

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 117

15 years agoFix repository UUID parsing.
epriestley [Wed, 6 Apr 2011 05:27:32 +0000 (22:27 -0700)]
Fix repository UUID parsing.

15 years agoShip up repository UUIDs with diffs.
epriestley [Wed, 6 Apr 2011 03:12:37 +0000 (20:12 -0700)]
Ship up repository UUIDs with diffs.

15 years agoCorrectly detect uncommitted files in Git
epriestley [Wed, 6 Apr 2011 02:27:05 +0000 (19:27 -0700)]
Correctly detect uncommitted files in Git

Summary:
I simplified this code at some point and broke it horribly
in the process. Mask in the right flag here and combine the maps
correctly. This solves the great mystery of increased developer
clowniness.

Test Plan:
Ran 'arc diff' in a working copy with staged but
uncommitted files, got an error message (previously, I didn't).

Reviewed By: aran
Reviewers: mroch, aran
CC: aran
Differential Revision: 104

15 years agoImprove 'arc' error message when failing to load a library
jungejason [Mon, 4 Apr 2011 23:26:46 +0000 (16:26 -0700)]
Improve 'arc' error message when failing to load a library

Summary:
display better message about the .arcconfig. The message will
be something like this now:
  Usage Exception: Failed to load library "phabricator" at location
  "srcaaaaa/". Please check the "phutil_libraries" setting in your
  .arcconfig file. Refer to page
  http://phabricator.com/docs/arcanist/article/Setting_Up_.arcconfig.html
  for more info.

Test Plan:
modify the .arcconfig file to test it. Also make sure it
works for correct settings.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, epriestley
Differential Revision: 99

15 years agoJSON output for Lint
Aran Donohue [Mon, 4 Apr 2011 01:04:20 +0000 (18:04 -0700)]
JSON output for Lint

Summary:
Refactor ArcanistLintRenderer into three independent classes, and let
the Workflow select between them based on its 'output' parameter.

Test Plan:
Introduce a Lint warning and lint with no --output, with --output summary and
with --output JSON.

Reviewed By: epriestley
Reviewers: epriestley
CC: aran, epriestley
Differential Revision: 96

15 years agoExpand ArcanistDiffParser to accept awkward Diffusion + SVN workflows.
epriestley [Thu, 31 Mar 2011 02:33:50 +0000 (19:33 -0700)]
Expand ArcanistDiffParser to accept awkward Diffusion + SVN workflows.

15 years agoAdd an empty file lint test.
epriestley [Wed, 23 Mar 2011 03:51:45 +0000 (20:51 -0700)]
Add an empty file lint test.

15 years agoSpecial case ArcanistTextLinter for completely empty files.
epriestley [Tue, 22 Mar 2011 18:08:59 +0000 (11:08 -0700)]
Special case ArcanistTextLinter for completely empty files.

15 years ago[Adding postpone status for unittests]
slawekbiel [Tue, 22 Mar 2011 00:29:12 +0000 (17:29 -0700)]
[Adding postpone status for unittests]

Summary:
That's for the tests that will be run asynchronously.

Test Plan:
run arc unit with some tests that returned postponed status - they showed up.
Background was yellow.

Reviewed By: epriestley
CC: epriestley
Revert Plan:
sure

Other Notes:

Differential Revision: 77

15 years agoImprove the error message for ERR-NO-CERTIFICATE
jungejason [Wed, 16 Mar 2011 22:17:07 +0000 (15:17 -0700)]
Improve the error message for ERR-NO-CERTIFICATE

Summary:
list the hosts for which the .arcrc file have certificate and
which conduit-uri the user is trying to access.

Test Plan:
test the case where a cert is missing.

Reviewed By: epriestley
CC: epriestley
Differential Revision: 76

15 years agoDetect SVN 1.6 "tree-conflicts".
epriestley [Sun, 20 Mar 2011 22:06:55 +0000 (15:06 -0700)]
Detect SVN 1.6 "tree-conflicts".

15 years agoUse phutil_console_confirm() correctly, not vestigal $this->confirm().
epriestley [Sat, 19 Mar 2011 19:15:28 +0000 (12:15 -0700)]
Use phutil_console_confirm() correctly, not vestigal $this->confirm().

Summary:

Test Plan:
$ arc patch --diff 553961

    Patch deletes file 'html/miniprofile.php', but the file does not exist in
    the working copy. Continue anyway? [y/N] y

    Patch deletes file 'html/index.php', but the file does not exist in the
    working copy. Continue anyway? [y/N] y

 OKAY  Successfully applied patch to the working copy.

Reviewers:

CC:

15 years agoFix symbol reference in arcconfig.diviner (thanks, jason!)
epriestley [Fri, 18 Mar 2011 02:19:31 +0000 (19:19 -0700)]
Fix symbol reference in arcconfig.diviner (thanks, jason!)

15 years agoResolve paths when running "--lintall"
epriestley [Mon, 14 Mar 2011 22:03:50 +0000 (15:03 -0700)]
Resolve paths when running "--lintall"

Summary: this was all kinds of fail when running from a subdirectory or on
invalid paths. Detect nonexistent paths; resolve valid paths.

Test Plan: ran "arc lint --lintall" on a file from a subdirectory, and on a
file which did not exist. Received patches and an error, respectively

Reviewers: arudolph

CC:

Differential Revision: 72

15 years agoasukhachev's patch for 'arc amend' not being overeager.
epriestley [Tue, 15 Mar 2011 00:39:12 +0000 (17:39 -0700)]
asukhachev's patch for 'arc amend' not being overeager.

15 years agoMake all the working-copy-paths errors extremely explicit.
epriestley [Sun, 13 Mar 2011 02:16:15 +0000 (18:16 -0800)]
Make all the working-copy-paths errors extremely explicit.

15 years agoMake some UI things less confusing and reduce the amount of horrific torture
epriestley [Sun, 13 Mar 2011 01:57:35 +0000 (17:57 -0800)]
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

15 years agoDetect use of "+" on a string literal in PHP.
epriestley [Thu, 10 Mar 2011 23:11:41 +0000 (15:11 -0800)]
Detect use of "+" on a string literal in PHP.

Summary:
This is realistically always wrong and the author means "."

Test Plan:
lint / unit

Reviewed By: crackerjack
Reviewers: crackerjack, aran
CC: crackerjack
Differential Revision: 68

15 years agoArcanist: Apply symlink patches correctly
epriestley [Tue, 8 Mar 2011 05:33:36 +0000 (21:33 -0800)]
Arcanist: Apply symlink patches correctly

Summary:
When an arcbundle includes a symlink, we fail to apply it correctly
when applying to a subversion working copy.

Test Plan:
created a diff which added a symlink, removed it locally, bundled
and applied the patch, got a good symlink out

Reviewed By: aran
Reviewers: aran
CC: epriestley, aran
Differential Revision: 63

15 years agoMerge branch 'patch'
epriestley [Tue, 8 Mar 2011 06:09:11 +0000 (22:09 -0800)]
Merge branch 'patch'

15 years agoFix 'arc patch' when adding files in new directories
epriestley [Tue, 8 Mar 2011 04:21:16 +0000 (20:21 -0800)]
Fix 'arc patch' when adding files in new directories

Summary:
If you apply an arcbundle to a subversion working copy which adds
files in new subdirectories, we fail to create and add the parent directories
so the whole operation fails. Make sure we create and add any missing parent
directories before apply patches.

Test Plan:
Applied Facebook diff #542056 to www@rE349795 cleanly, while it
failed previously.

Reviewed By: aran
Reviewers: aran
CC: aran
Differential Revision: 62

15 years agoMerge branch 'master' of github.com:facebook/arcanist
epriestley [Tue, 8 Mar 2011 06:04:29 +0000 (22:04 -0800)]
Merge branch 'master' of github.com:facebook/arcanist

15 years agoArcanist: parse SVN "replaced" status
epriestley [Tue, 8 Mar 2011 03:03:27 +0000 (19:03 -0800)]
Arcanist: parse SVN "replaced" status

Summary:
SVN has a special 'replaced' status which was not being parsed
correctly. Parse it correctly.

Test Plan:
Replaced a file, ran arc diff, got a sensible diff.

Reviewed By: aran
Reviewers: aran
CC: aran
Differential Revision: 60

15 years agoMerge branch 'master' of github.com:facebook/arcanist
epriestley [Tue, 8 Mar 2011 04:21:09 +0000 (20:21 -0800)]
Merge branch 'master' of github.com:facebook/arcanist

15 years agoGet rid of explicit timezone silliness.
epriestley [Tue, 8 Mar 2011 04:20:48 +0000 (20:20 -0800)]
Get rid of explicit timezone silliness.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoExplicitly use "--format=medium" when running 'git log'
epriestley [Mon, 7 Mar 2011 23:37:38 +0000 (15:37 -0800)]
Explicitly use "--format=medium" when running 'git log'

Summary:
Git (the world's hardest revision control system) allows you to change
output formats by accident and/or without your direct knowledge. Protect users
from themselves.

Test Plan:
Changed "pretty" in [format] to "format:quack" so every log just
outputs the word "quack". Ran "arc diff" successfully.

Reviewed By: aran
Reviewers: aran
CC: epriestley, aran
Differential Revision: 56

15 years agoMake XHPAST parse-depth warning an actual warning.
epriestley [Mon, 7 Mar 2011 19:21:29 +0000 (11:21 -0800)]
Make XHPAST parse-depth warning an actual warning.

Summary:
XHPAST encounters a parse-depth problem on some files because PHP
5.2 has an un-overridable parse depth limit for JSON. The text of this error
says it is a "warning" but we currently raise an error. Make it a warning
instead.

The JSON depth is 20 until PHP 5.2.3, where it becomes 128. After PHP 5.3
it defaults to 512 and is user-configurable, which will allow us to resolve
this issue in nearly all cases.

Since I made if/else express as a list in the AST, this only actually arises
in long binary chains, most commonly string concatenation, like:

  $out = 'a'.'a'.'a'.'a'...

...where each string is a variable or HTML tag and the program is constructing
a complicated document.

At some point I'll add some PHP 5.3 massaging to the XHPAST decoder itself to
raise this limit to something more huge.

Test Plan:
Ran "arc lint --lintall" on a file with a very deep binary
expression tree ("1 + 1 + 1 ...") and received a warning instead of an error.

Reviewed By: aran
Reviewers: pad, aran
CC: epriestley, aran
Differential Revision: 54

15 years agoFix issue with svn-hook-pre-commit when resolving .arcconfig for nested
epriestley [Sat, 5 Mar 2011 08:42:46 +0000 (00:42 -0800)]
Fix issue with svn-hook-pre-commit when resolving .arcconfig for nested
directories

Summary:
If you had changes to a directory covered by a .arcconfig residing
inside another directory also covered by an .arcconfig, the hook would
incorrectly attribute the first file it attempted to resolve to the topmost
.arcconfig because it failed to break out of the loop after resolving it.

All other files would be correctly attributed, because they'd hit the cache.

Test Plan:
Created an svn repository and checked it out locally. Created a
structure like this:

  .arcconfig
  shallow
  a/
   b/
    c/
     .arcconfig
     d/
      deep
      deep2
      deep3

Made modifications to "deep", "deep2", and "deep3". Received an error message
about multiple .arcconfig changes, attributing one file to the topmost
arcconfig and the other two to the deeper one.

Applied patch.

Commit now goes through. Made a commit affecting 'shallow' and 'deep' and
'deep2', commit was correctly blocked and files were attributed to the
corresponding .arcconfigs.

Reviewed By: mroch
Reviewers: mroch
CC: mroch
Differential Revision: 50

15 years agoRestore the --edit workflow somewhat properly. (2)
epriestley [Fri, 4 Mar 2011 22:51:39 +0000 (14:51 -0800)]
Restore the --edit workflow somewhat properly. (2)

Summary: summary999

Test Plan: test2

Reviewers:

CC:

Differential Revision: 219938

15 years agoMerge branch 'master' of github.com:facebook/arcanist
epriestley [Fri, 4 Mar 2011 00:11:10 +0000 (16:11 -0800)]
Merge branch 'master' of github.com:facebook/arcanist

15 years agoMake 'arc' work for users without the POSIX PHP installed.
epriestley [Thu, 3 Mar 2011 03:31:40 +0000 (19:31 -0800)]
Make 'arc' work for users without the POSIX PHP installed.

Summary:
Some PHP installs don't have this by default. Do a conditional check
since this functionality is noncritical.

Test Plan:
will make srash test

Differential Revision: 43
Reviewed By: aran
Reviewers: rash67, aran, jungejason
CC: aran
15 years agoMake 'arc' work for users without the POSIX PHP installed.
epriestley [Thu, 3 Mar 2011 03:31:40 +0000 (19:31 -0800)]
Make 'arc' work for users without the POSIX PHP installed.

Summary: Some PHP installs don't have this by default. Do a conditional check
since this functionality is noncritical.

Test Plan: will make srash test

Reviewers: rash67, aran, jungejason

CC:

Differential Revision: 43

15 years agoMerge branch 'master' of github.com:facebook/arcanist
epriestley [Thu, 3 Mar 2011 03:31:36 +0000 (19:31 -0800)]
Merge branch 'master' of github.com:facebook/arcanist

15 years agoUpdated .divinerconfig.
epriestley [Wed, 2 Mar 2011 23:25:45 +0000 (15:25 -0800)]
Updated .divinerconfig.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoPossible workaround for null 'changes'.
epriestley [Mon, 28 Feb 2011 19:33:22 +0000 (11:33 -0800)]
Possible workaround for null 'changes'.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoMerge branch 'master' of github.com:facebook/arcanist
epriestley [Sun, 27 Feb 2011 04:54:21 +0000 (20:54 -0800)]
Merge branch 'master' of github.com:facebook/arcanist

15 years agoFix a couple of warnings raised by HipHop.
epriestley [Sun, 27 Feb 2011 04:53:24 +0000 (20:53 -0800)]
Fix a couple of warnings raised by HipHop.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoRespect @nolint
adonohue [Fri, 25 Feb 2011 01:59:49 +0000 (17:59 -0800)]
Respect @nolint

Summary:
Respect @nolint annotations

Test Plan:
New "test case"

Differential Revision: 41
Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
15 years agoMerge branch 'master' of github.com:facebook/arcanist
adonohue [Fri, 25 Feb 2011 02:36:43 +0000 (18:36 -0800)]
Merge branch 'master' of github.com:facebook/arcanist

15 years agoRespect @nolint
adonohue [Fri, 25 Feb 2011 01:59:49 +0000 (17:59 -0800)]
Respect @nolint

Summary:
Respect @nolint annotations

Test Plan:
New "test case"

Differential Revision: 41
Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
15 years agoImprove error messages when trying to parse bad .arcconfig files.
epriestley [Fri, 25 Feb 2011 00:34:27 +0000 (16:34 -0800)]
Improve error messages when trying to parse bad .arcconfig files.

Summary: Haiping is getting a pretty confusing error message when trying to
commit.

Test Plan: Created a mock repository, installed the hook, made commits against
directories with bad .arcconfigs.

Reviewers:

CC:

15 years agoStop arc from destroying files under HPHPi.
epriestley [Thu, 24 Feb 2011 22:08:49 +0000 (14:08 -0800)]
Stop arc from destroying files under HPHPi.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoMake arcanist more flexible about SVN base revisions
epriestley [Wed, 23 Feb 2011 20:06:22 +0000 (12:06 -0800)]
Make arcanist more flexible about SVN base revisions

Summary: When running "arc diff" in a mixed-base-revision working copy, we
prevent the operation. Relax this restriction so that having a different root
revision is okay, so long as all affected files share the same revision. This
facilitates multiple similar edits without updates.

Test Plan: Reverted a file to an older revision in an SVN working copy, ran
"arc diff", was rejected. Applied patch, ran "arc diff", diff went through and
was recorded with the right SVN base revision in the database.

Reviewers:

CC:

15 years agoMerge branch 'master' of github.com:facebook/arcanist
epriestley [Tue, 22 Feb 2011 01:00:05 +0000 (17:00 -0800)]
Merge branch 'master' of github.com:facebook/arcanist

15 years agoCorrectly parse conflicted files out of SVN XML.
epriestley [Tue, 22 Feb 2011 00:59:37 +0000 (16:59 -0800)]
Correctly parse conflicted files out of SVN XML.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoPartially restore --edit to stop it from stomping all over everything.
epriestley [Sun, 20 Feb 2011 06:07:12 +0000 (22:07 -0800)]
Partially restore --edit to stop it from stomping all over everything.

Summary: We sync from local right now, which is fairly terrible. But
fixing this correctly is also not trivial and I don't have the right
primitives yet.

Test Plan:

Reviewers:

CC:

15 years agoSome documentation.
epriestley [Sat, 19 Feb 2011 19:36:08 +0000 (11:36 -0800)]
Some documentation.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoProvide a "--conduit-uri" override for testing, and tweak some documentation.
epriestley [Sat, 19 Feb 2011 06:17:41 +0000 (22:17 -0800)]
Provide a "--conduit-uri" override for testing, and tweak some documentation.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoResolve further subtlety with untracked files.
epriestley [Sat, 19 Feb 2011 01:08:10 +0000 (17:08 -0800)]
Resolve further subtlety with untracked files.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoMerge branch 'master' of github.com:facebook/arcanist
epriestley [Sat, 19 Feb 2011 00:52:52 +0000 (16:52 -0800)]
Merge branch 'master' of github.com:facebook/arcanist

15 years agoDon't send untracked files to lint or unit workflows when running 'arc diff'.
epriestley [Sat, 19 Feb 2011 00:52:27 +0000 (16:52 -0800)]
Don't send untracked files to lint or unit workflows when running 'arc diff'.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoDon't reject commits which fail to trigger any linters.
epriestley [Thu, 17 Feb 2011 20:45:15 +0000 (12:45 -0800)]
Don't reject commits which fail to trigger any linters.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoRespect --no-ansi and disable ansi for non-TTY terminals.
epriestley [Thu, 17 Feb 2011 07:41:03 +0000 (23:41 -0800)]
Respect --no-ansi and disable ansi for non-TTY terminals.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoPrep this for actual production installs.
epriestley [Thu, 17 Feb 2011 07:14:55 +0000 (23:14 -0800)]
Prep this for actual production installs.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoMerge branch 'master' of github.com:facebook/arcanist
epriestley [Thu, 17 Feb 2011 05:04:16 +0000 (21:04 -0800)]
Merge branch 'master' of github.com:facebook/arcanist

15 years agoBasic documentation for ".arcconfig".
epriestley [Thu, 17 Feb 2011 05:03:32 +0000 (21:03 -0800)]
Basic documentation for ".arcconfig".

Summary:

Test Plan:

Reviewers:

CC:

15 years agoMove this block into a more sensible branch.
epriestley [Thu, 17 Feb 2011 02:49:45 +0000 (18:49 -0800)]
Move this block into a more sensible branch.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoFix two common points of confusion:
epriestley [Thu, 17 Feb 2011 02:47:17 +0000 (18:47 -0800)]
Fix two common points of confusion:
- show "push upstream" instructions after arc amend
- parse 'diffcamp revision'

Summary:

Test Plan:

Reviewers:

CC:

15 years agoAdd @nocommit and tests to Text linter.
epriestley [Thu, 17 Feb 2011 01:26:51 +0000 (17:26 -0800)]
Add @nocommit and tests to Text linter.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoRestore hook configuration in lint unit tests. Make working copy setup an
epriestley [Wed, 16 Feb 2011 19:53:34 +0000 (11:53 -0800)]
Restore hook configuration in lint unit tests. Make working copy setup an
external.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoExpose the already-functional "--engine" flag for the unit workflow.
epriestley [Wed, 16 Feb 2011 19:53:13 +0000 (11:53 -0800)]
Expose the already-functional "--engine" flag for the unit workflow.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoImprove bash completion for commands like 'arc lint' and 'arc unit'.
epriestley [Wed, 16 Feb 2011 19:51:06 +0000 (11:51 -0800)]
Improve bash completion for commands like 'arc lint' and 'arc unit'.

Summary:

Test Plan:

Reviewers:

CC:

15 years agoSupport --load-phutil-library in arcanist.
epriestley [Wed, 16 Feb 2011 18:07:48 +0000 (10:07 -0800)]
Support --load-phutil-library in arcanist.

Summary:

Test Plan:

Reviewers:

CC: