]> khamidou — GitHub mirrors - arcanist.git/log
arcanist.git
14 years agoPatch 'unix:filemode' property as 'svn:executable' in SVN
vrana [Wed, 26 Sep 2012 17:24:10 +0000 (10:24 -0700)]
Patch 'unix:filemode' property as 'svn:executable' in SVN

Summary: Patch created on Git contains 'unix:filemode' property which is useless in SVN.

Test Plan: Exported a bundle changing a file to executable in Git, applied it in SVN, verified that the file is executable.

Reviewers: epriestley

Reviewed By: epriestley

CC: ptarjan, aran, Korvin, digoangeline
Differential Revision: https://secure.phabricator.com/D3554

14 years agoDon't run background process with raw diff source
vrana [Wed, 26 Sep 2012 00:57:01 +0000 (17:57 -0700)]
Don't run background process with raw diff source

Test Plan:
  $ arc diff

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3553

14 years agoUnuse $argv in `arc diff --background`
vrana [Mon, 24 Sep 2012 18:32:38 +0000 (11:32 -0700)]
Unuse $argv in `arc diff --background`

Test Plan: This diff.

Reviewers: epriestley

Reviewed By: epriestley

CC: zeeg, aran, Korvin
Differential Revision: https://secure.phabricator.com/D3550

14 years agoStep towards working `arc diff --background 1` on Windows
vrana [Fri, 21 Sep 2012 23:29:12 +0000 (16:29 -0700)]
Step towards working `arc diff --background 1` on Windows

Summary:
Running `a.php` from command line doesn't work on Windows, we need to run `php a.php`.
This shouldn't break other OSes.

Test Plan:
  $ arc diff --background 1

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3544

14 years agoFlush output before printing lint and unit results in diff
vrana [Fri, 21 Sep 2012 22:27:36 +0000 (15:27 -0700)]
Flush output before printing lint and unit results in diff

Summary:
Under HPHP, output buffer size is ignored.
Flush any buffered output before printing anything from `arc diff` to reduce user's confusion.

Test Plan:
  $ arc diff --preview --background 1
  $ arc diff --preview --background 0

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3543

14 years agoMake `arc diff --background 1` default and disable it on Windows
vrana [Tue, 18 Sep 2012 21:14:12 +0000 (14:14 -0700)]
Make `arc diff --background 1` default and disable it on Windows

Summary:
I am using it for about a month.
It works even in Facebook www.

Test Plan:
  $ arc diff --background 1 # hundreds of times

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3495

14 years agofix a bug in ArcanistXHPLinter
Bob Trahan [Fri, 21 Sep 2012 21:59:04 +0000 (14:59 -0700)]
fix a bug in ArcanistXHPLinter

Summary: $param is null here. it should be $node.

Test Plan: arc lint no longer barfed on me!

Reviewers: vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3540

14 years agoReformat lint severities for readability
epriestley [Fri, 21 Sep 2012 19:27:32 +0000 (12:27 -0700)]
Reformat lint severities for readability

Summary: See D3482.

Test Plan: `arc lint`

Reviewers: vrana

Reviewed By: vrana

CC: aran
Differential Revision: https://secure.phabricator.com/D3501

14 years agoAdd git-repo-based bundle tests
epriestley [Fri, 21 Sep 2012 19:27:21 +0000 (12:27 -0700)]
Add git-repo-based bundle tests

Summary:
Adds a test which goes through a git repository commit by commit and applies them (in effect) via "arc patch", verifying that the results match the actual commit.

See D3439 for the fixture stuff.

The git repo archive has a couple of trivial commits in it:

  $ ../libphutil/scripts/utils/directory_fixture.php src/parser/__tests__/bundle.git.tgz
  Spawning an interactive shell. Exit when complete.

  sh-3.2$ git log
  commit f19fb9fa1385c01b53bdb6d8842dd154e47151ec
  Author: epriestley <git@epriestley.com>
  Date:   Wed Sep 5 14:30:28 2012 -0700

      Edit a text file.

  commit 228d7be4840313ed805c25c15bba0f7b188af3e6
  Author: epriestley <git@epriestley.com>
  Date:   Wed Sep 5 14:30:11 2012 -0700

      Add a text file.

Test Plan: Ran tests.

Reviewers: edward

Reviewed By: edward

CC: aran
Maniphest Tasks: T866

Differential Revision: https://secure.phabricator.com/D3440

14 years agoHandle empty file add in Git export
vrana [Fri, 21 Sep 2012 17:23:04 +0000 (10:23 -0700)]
Handle empty file add in Git export

Summary: Fixes T1555.

Test Plan: Added empty file, diffed it, exported and patched. Also manually created diff in Differential.

Reviewers: btrahan, epriestley

Reviewed By: btrahan

CC: aran, Korvin
Maniphest Tasks: T1555

Differential Revision: https://secure.phabricator.com/D3536

14 years agoProperly handle file moves in `arc patch` under SVN
vrana [Wed, 19 Sep 2012 22:59:39 +0000 (15:59 -0700)]
Properly handle file moves in `arc patch` under SVN

Summary:
If the file has no changes (probably because it has been moved or copied) then we fail.

Fixes T1708, fixes T1559.

Test Plan:
  $ svn mv a b
  $ arc diff --only
  $ svn revert a b
  $ arc patch --diff # of created diff

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin
Maniphest Tasks: T1559, T1708

Differential Revision: https://secure.phabricator.com/D3526

14 years agoBuild correct corpus in copied or moved files
vrana [Wed, 19 Sep 2012 21:36:38 +0000 (14:36 -0700)]
Build correct corpus in copied or moved files

Summary:
This problem shows very far away.
One of the symptomps is that the contents of a moved file is displayed as added in Differential but it is not a big deal.

The real trouble happens when you try to `arc patch` this diff.
It tries to both copy the file and to add a new contents (which fails).

Fixes T1709.

Test Plan:
  $ git mv a b
  $ git commit -m.
  $ arc diff --only
  $ git reset --hard HEAD^
  $ arc patch --diff # of the created diff

  $ arc unit src/parser/__tests__

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin, boris, mroch, slawekbiel
Maniphest Tasks: T1709

Differential Revision: https://secure.phabricator.com/D3524

14 years agoMark moved binary file as image
vrana [Tue, 18 Sep 2012 22:07:01 +0000 (15:07 -0700)]
Mark moved binary file as image

Test Plan: Moved image, verified that the source file is marked as image: https://secure.phabricator.com/differential/diff/6924/

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3520

14 years agoHandle binary file moves in `arc patch` under Git
vrana [Tue, 18 Sep 2012 23:03:32 +0000 (16:03 -0700)]
Handle binary file moves in `arc patch` under Git

Summary: We don't store old file PHID for binary file moves here.

Test Plan: `arc patch` on revision with binary file moves which was failing earlier.

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3521

14 years agoRequire PHP 5.3.0 on Windows
vrana [Mon, 17 Sep 2012 20:53:04 +0000 (13:53 -0700)]
Require PHP 5.3.0 on Windows

Test Plan:
  $ arc diff

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3506

14 years agoLint functions not available on Windows on PHP 5.2
vrana [Mon, 17 Sep 2012 18:48:41 +0000 (11:48 -0700)]
Lint functions not available on Windows on PHP 5.2

Summary: Also use absolute paths.

Test Plan: Linted Arcanist, libphutil, Phabricator, found no false positives and one real error in [[ https://secure.phabricator.com/diffusion/PHU/browse/master/src/channel/PhutilSocketChannel.php;42d8e8447c8b5d6a$92 | PhutilSocketChannel ]].

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3504

14 years agoDeclare ArcanistBaseWorkflow::run()
vrana [Sat, 15 Sep 2012 01:07:18 +0000 (18:07 -0700)]
Declare ArcanistBaseWorkflow::run()

Summary: We call it from `arcanist.php`.

Test Plan: This diff.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3496

14 years agoHandle `arc diff --background 1 --`
vrana [Sat, 15 Sep 2012 01:46:33 +0000 (18:46 -0700)]
Handle `arc diff --background 1 --`

Summary: We currently insert background parameters to end which causes ignoring them if there is '--'.

Test Plan:
  $ arc diff --background 1 -- HEAD^

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3497

14 years agoFix typo in comment
vrana [Sat, 15 Sep 2012 00:52:24 +0000 (17:52 -0700)]
Fix typo in comment

14 years agoPublicize formatting unit test result
vrana [Thu, 13 Sep 2012 20:25:26 +0000 (13:25 -0700)]
Publicize formatting unit test result

Summary: I want to use it from outside.

Test Plan:
  $ arc unit src/lint/linter/__tests__/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3493

14 years agoUse array_mergev() in Phutil test engine
vrana [Thu, 13 Sep 2012 20:07:27 +0000 (13:07 -0700)]
Use array_mergev() in Phutil test engine

Test Plan: This diff.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3491

14 years agoMerge pull request #52 from killme2008/master
Evan Priestley [Thu, 13 Sep 2012 23:35:16 +0000 (16:35 -0700)]
Merge pull request #52 from killme2008/master

Fixed git branch name contains color

14 years agoGet branch name with --no-color option
dennis zhuang [Thu, 13 Sep 2012 22:12:19 +0000 (15:12 -0700)]
Get branch name with --no-color option

14 years agoLint short ternary as PHP 5.3 feature
vrana [Thu, 13 Sep 2012 18:19:25 +0000 (11:19 -0700)]
Lint short ternary as PHP 5.3 feature

Summary: I don't offer a replacement because `f() ?: 1` converted to `f() ? f() : 1` can cause side effects and whitespace issues.

Test Plan: New test.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3489

14 years agoSkip linter tests with usage problems
vrana [Wed, 12 Sep 2012 17:39:39 +0000 (10:39 -0700)]
Skip linter tests with usage problems

Summary: D3480#comment-1

Test Plan: This diff.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3481

14 years agoAdd missing space in string
vrana [Wed, 12 Sep 2012 17:42:36 +0000 (10:42 -0700)]
Add missing space in string

14 years agoTweak severity of pht() linter
vrana [Wed, 12 Sep 2012 17:17:59 +0000 (10:17 -0700)]
Tweak severity of pht() linter

Summary:
`pht()` can be some random function.
Better solution would be to separate this linter to its own class but it would be slower.

Also use `PhutilLintEngine` as `lint.engine`.

Test Plan:
  $ arc lint # on file with pht($a)

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3480

14 years agoFix typo in comment
vrana [Wed, 12 Sep 2012 09:11:22 +0000 (02:11 -0700)]
Fix typo in comment

14 years agoMake `ruby -wc` a linter in Arcanist
Leah Xue [Thu, 6 Sep 2012 18:50:15 +0000 (11:50 -0700)]
Make `ruby -wc` a linter in Arcanist

Summary: Add `ruby -wc` as a linter and raise Error whenever there's a syntax error

Test Plan: Just a few dumb unit tests.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3447

14 years agoMake spell check linter patching
vrana [Mon, 10 Sep 2012 23:09:44 +0000 (16:09 -0700)]
Make spell check linter patching

Test Plan:
Wrote "Posible" in the linter, let it change to "Possible".
New unit test.

Reviewers: jack, epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3469

14 years agoFix false negatives in "break;" lint check
epriestley [Sat, 8 Sep 2012 00:46:35 +0000 (17:46 -0700)]
Fix false negatives in "break;" lint check

Summary: See D3449, comments, unit tests.

Test Plan: Unit tests.

Reviewers: vrana

Reviewed By: vrana

CC: aran
Differential Revision: https://secure.phabricator.com/D3463

14 years agoAdd a test case for false negative switch lint rule
vrana [Thu, 6 Sep 2012 22:13:18 +0000 (15:13 -0700)]
Add a test case for false negative switch lint rule

Summary:
I tried to fixed it but I've given up.

See rP958e6cd109f3.

Test Plan:
  $ arc unit

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3449

14 years agoAllow Phutil tests setting link
vrana [Fri, 7 Sep 2012 21:18:55 +0000 (14:18 -0700)]
Allow Phutil tests setting link

Summary: Also delete some copy pasta.

Test Plan: Next diff.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3455

14 years agoLink Arcanist test cases
vrana [Fri, 7 Sep 2012 22:16:39 +0000 (15:16 -0700)]
Link Arcanist test cases

Summary: See D3455.

Test Plan: This diff (after rebase).

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3460

14 years agoUse /usr/bin/env python
Peter Ruibal [Fri, 7 Sep 2012 02:03:42 +0000 (19:03 -0700)]
Use /usr/bin/env python

Summary: Use python from env, instead of the distro installed one in /usr/bin

Test Plan:
Ran arc anoid on a system that only had python in /usr/bin, still
works. Ran arc anoid on a system that had a python in /usr/local/bin before
/usr/bin.  Still works as well

Reviewers: epriestley, alanh

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3451

14 years agoSupport linking unit tests
vrana [Fri, 7 Sep 2012 01:44:15 +0000 (18:44 -0700)]
Support linking unit tests

Summary: This is Arcanist part of D3434.

Test Plan: None.

Reviewers: epriestley, wez

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3450

14 years agoMerge pull request #51 from bpedman/master
Evan Priestley [Thu, 6 Sep 2012 16:40:22 +0000 (09:40 -0700)]
Merge pull request #51 from bpedman/master

Fix getCommitMessage to properly separate subject and body with 2 newlines

14 years agoFix commit message format returned by getCommitMessage
Brandon Pedersen [Thu, 6 Sep 2012 14:56:44 +0000 (08:56 -0600)]
Fix commit message format returned by getCommitMessage

Git commit messages must have 2 newlines between the subject and body
If used to rewrite a commit message then the commit message will be
incorrectly reformatted.

14 years agoImplement the arcanist top-level log handling in terms of $console->writeLog()
epriestley [Wed, 5 Sep 2012 18:45:54 +0000 (11:45 -0700)]
Implement the arcanist top-level log handling in terms of $console->writeLog()

Summary:
  - See D3422.
  - Also improve some event configuration/debugging stuff.

Test Plan: Ran `arc list --trace`, set bogus/valid event handlers.

Reviewers: vrana, nh

Reviewed By: vrana

CC: aran
Differential Revision: https://secure.phabricator.com/D3423

14 years agoUse punctuation in spelling linter
vrana [Wed, 5 Sep 2012 06:45:54 +0000 (23:45 -0700)]
Use punctuation in spelling linter

Summary: Also move dependency one directory down.

Test Plan:
  $ arc lint # on file with "teh"

Reviewers: jack, epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3436

14 years agoDelete obsolete comment
vrana [Wed, 5 Sep 2012 04:21:30 +0000 (21:21 -0700)]
Delete obsolete comment

Summary:
HPHP now autoloads in `is_subclass_of()`.
I've left the `class_exists()` check as the code is more explicit.

Test Plan:
  // under HPHP
  function __autoload($c) {
    echo "$c\n";
  }
  is_subclass_of('C', 'stdClass');

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3435

14 years agoAlways include 'workflow' on Arcanist events
epriestley [Tue, 4 Sep 2012 19:08:04 +0000 (12:08 -0700)]
Always include 'workflow' on Arcanist events

Summary:
This object is highly useful in many client event handlers (particularly for access to the CLI) and allows them to be implemented less intrusively.

This also slightly reduces code duplication.

Test Plan: Ran "arc diff".

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran
Maniphest Tasks: T1753

Differential Revision: https://secure.phabricator.com/D3421

14 years ago[hg - arc patch] make mercurial bookmark with arc patch
katherine [Sat, 18 Aug 2012 18:23:56 +0000 (11:23 -0700)]
[hg - arc patch] make mercurial bookmark with arc patch

Summary:
w00t!

Created new functions getBookmarkName, createBookmark that use mercurial
commands to create a new bookmark and apply the commit message when
running arc patch. Like with git, it checks if the bookmark already
exists. If it does, creates arcpatch-DXXX-1, -2 etc

Updated the mercurial section of run() to include applying the commit
message.

Pretty new to programming in general still, so I wasn't sure if I should
have just modified getBranchName and createBranch to work with Mercurial
(instead of creating new functions). This was easier for me to make sure
I didn't break the git functionality. Let me know I can merge the
functions.

Test Plan:
Tested in my www-hg repository. Probably need to test further (suggestions?)

Ran the following trials with arc patch D539987
1) the bookmark arcpatch-D539987 already existed
2) the bookmark did not exist
3) tried an invalid commit, arc patch R539987
4) --nobookmark flag (bookmark was not created, but the commit applied)
5) --nocommit flag (boomark was created, and the commit was not applied)
6) --nocommit and --nobokmark

Here's the summary of the results:
https://secure.phabricator.com/P493

Reviewers: dschleimer

Reviewed By: dschleimer

CC: aran, epriestley, phleet, bos, csilvers
Differential Revision: https://secure.phabricator.com/D3334

14 years agoAdd a `willCreateRevision` event
epriestley [Thu, 30 Aug 2012 19:28:35 +0000 (12:28 -0700)]
Add a `willCreateRevision` event

Summary:
Adds an event prior to creation of a new revision so installs can muck around with titles, etc.

I'll also update the docs.

Test Plan: Ran "arc diff --trace" and observed event dispatch. Added `var_dump()` and verified $revision is a reasonable object.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran, geoffberger
Differential Revision: https://secure.phabricator.com/D3408

14 years agoUse paste.query for arc paste
Nick Harper [Wed, 29 Aug 2012 18:04:19 +0000 (11:04 -0700)]
Use paste.query for arc paste

Summary: paste.info is deprecated; switch to using paste.query

Test Plan:
  arc paste P123
  arc paste P123 --json

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3402

14 years agoDispatch event after building diff message
vrana [Tue, 28 Aug 2012 01:21:49 +0000 (18:21 -0700)]
Dispatch event after building diff message

Summary:
We log time of running `arc diff`. It's easy with `--verbatim` or with users just confirming the message built in commit template.

With `--background`, I want to log only waiting time, not message editing time. This event should allow it.

Test Plan:
  $ arc diff

Haven't created the listener yet.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3394

14 years agoMinor, fix obvious typo in SVN patch workflow (@mroch).
epriestley [Fri, 24 Aug 2012 00:52:38 +0000 (17:52 -0700)]
Minor, fix obvious typo in SVN patch workflow (@mroch).

14 years agoCreate v2 libraries
vrana [Wed, 22 Aug 2012 22:27:13 +0000 (15:27 -0700)]
Create v2 libraries

Summary:
This is how it looks like now:

>     What do you want to name this library? x
> Writing '__phutil_library_init__.php' to 'x/__phutil_library_init__.php'...
> Usage Exception: This library is using libphutil v1, which is no longer supported. Run 'arc liberate --upgrade' to upgrade to v2.

Test Plan:
  $ arc liberate # in new dir

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3368

14 years agoAlways use lint advices
vrana [Wed, 22 Aug 2012 18:07:41 +0000 (11:07 -0700)]
Always use lint advices

Summary:
We want to have a class of lint problems which are displayed to author and attached to revision but don't require excuse in diff workflow.
Lint advices already serve this purpose but no linters emit them because they need `--advice` flag to be processed.

By always enabling advices, we can switch more linters from warnings to advices and don't stop the diff workflow for them.

This diff also bumps down default severity of TODO rule.

Test Plan: Made lint advice mistake, ran `arc lint`.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, ide, Korvin
Differential Revision: https://secure.phabricator.com/D3364

14 years agoImprove management of zlib dependency
epriestley [Tue, 21 Aug 2012 00:26:42 +0000 (17:26 -0700)]
Improve management of zlib dependency

Summary:
  - Add zlib functions to extension functions.
  - Provide a better error if the extension is actually missing.

Test Plan: Eyeballed it.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: Korvin, aran
Differential Revision: https://secure.phabricator.com/D3321

14 years agoLink docs from message
vrana [Thu, 16 Aug 2012 21:27:35 +0000 (14:27 -0700)]
Link docs from message

Test Plan:
  phutil_console_confirm("See http://www.phabricator.com/docs/phabricator/article/Differential_User_Guide_Large_Changes.html for information");

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3317

14 years agoUse console in unit inside diff
vrana [Wed, 15 Aug 2012 22:54:34 +0000 (15:54 -0700)]
Use console in unit inside diff

14 years agoDon't ask for confirmation with unsound unit tests
vrana [Mon, 16 Jul 2012 22:54:11 +0000 (15:54 -0700)]
Don't ask for confirmation with unsound unit tests

Test Plan:
  $ arc diff # with unsound tests
  $ arc diff --ignore-unsound-tests # with unsound tests

Reviewers: epriestley, aran

Reviewed By: epriestley

CC: aran, Korvin
Maniphest Tasks: T1515

Differential Revision: https://secure.phabricator.com/D2985

14 years agoFix lint warning
vrana [Wed, 15 Aug 2012 21:27:01 +0000 (14:27 -0700)]
Fix lint warning

14 years agoWarn about strstr() misuse
vrana [Wed, 15 Aug 2012 20:30:40 +0000 (13:30 -0700)]
Warn about strstr() misuse

Summary: See D3296#1.

Test Plan:
New test.
Linted Arcanist, libphutil, Phabricator repositories, found no false positive and one real positive.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3297

14 years agoWarn before using `strpos($a, $b) === 0`
vrana [Wed, 15 Aug 2012 19:56:36 +0000 (12:56 -0700)]
Warn before using `strpos($a, $b) === 0`

Summary:
I'm not sure if we are interested in this kind of linters ("Don't use slow function if there is a fast alternative").
I didn't find a case where `strpos() === 0` could be useful except [[ http://www.php.net/manual/en/mbstring.overload.php | mbstring.func_overload ]] craziness.

Test Plan:
New unit test.
Linted Arcanist, libphutil, Phabricator repositories, found no false positive and one real positive.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3296

14 years agoAdd extraData field to test results
Wez Furlong [Wed, 15 Aug 2012 17:34:29 +0000 (10:34 -0700)]
Add extraData field to test results

Summary:
See discussion on T1630.
extraData provides more scope for extensions to piggy-back
more data on the test results and have that pulled up to the UI.

We're using keys like "facebook:complexity" to store additional
data as part of the test results.

Test Plan:
Nothing in the codebase touches extraData at the moment, so
you'll just have to have faith/prove by inspection.

Reviewers: vrana, nh, tuomaspelkonen, epriestley

Reviewed By: epriestley

CC: aran, epriestley
Maniphest Tasks: T1630

Differential Revision: https://secure.phabricator.com/D3276

14 years agoDetect use of f()[0] in lint
epriestley [Wed, 15 Aug 2012 11:36:50 +0000 (04:36 -0700)]
Detect use of f()[0] in lint

Summary: XHPAST doesn't currently parse most PHP 5.4 stuff, but it does parse this. Warn about it.

Test Plan:
Unit tests, and:

   Error  (XHP35) Use Of PHP 5.4 Features
    The f()[...] syntax was not introduced until PHP 5.4, but this codebase
    targets an earlier version of PHP. You can rewrite this expression using
    idx().

             365   public function lintPHP54Features($root) {
             366
             367     if (false) {
    >>>      368       id()[0];
                            ^
             369     }
             370

Reviewers: alanh, vrana

Reviewed By: alanh

CC: aran
Differential Revision: https://secure.phabricator.com/D3291

14 years agoPass lint and unit results to diff created event
vrana [Mon, 13 Aug 2012 19:20:34 +0000 (12:20 -0700)]
Pass lint and unit results to diff created event

Summary:
I need to run some jobs only if the tests hasn't been skipped.
I know that this could end up by passing more and more data to the event but this is all I need so far.

Test Plan: Dumped `unitResult` from the listener.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3259

14 years agoImplement base85 in a 32-bit safe way, without bcmath
epriestley [Mon, 13 Aug 2012 02:21:33 +0000 (19:21 -0700)]
Implement base85 in a 32-bit safe way, without bcmath

Summary: See T1635 and the giant inline comment.

Test Plan: Ran unit tests on 32-bit and 64-bit machines.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran
Maniphest Tasks: T1635

Differential Revision: https://secure.phabricator.com/D3250

14 years agoAdd test coverage to the base85 implementation
epriestley [Mon, 13 Aug 2012 02:20:46 +0000 (19:20 -0700)]
Add test coverage to the base85 implementation

Summary: See T1635. I'm going to make an effort to rewrite this in a way that's safe in 32-bit PHP, i.e. without bcmath. Add test coverage to limit the chance I screw it up.

Test Plan: Ran unit tests.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran
Maniphest Tasks: T1635

Differential Revision: https://secure.phabricator.com/D3249

14 years agoSwitch arcanist to phutil_utf8_convert()
epriestley [Sun, 12 Aug 2012 15:50:01 +0000 (08:50 -0700)]
Switch arcanist to phutil_utf8_convert()

Summary: See D3252. Reduces code duplication a little bit. Also remove some dire warnings about impending doom -- this has been in use in the wild for a long time.

Test Plan: Added a file in ISO-8859-1, ran `arc diff --encoding ISO-8859-1` to generate this revision, got an encoding note in output.

Reviewers: davidreuss, vrana, btrahan

Reviewed By: davidreuss

CC: aran
Maniphest Tasks: T452

Differential Revision: https://secure.phabricator.com/D3253

14 years agoRaise exception instead of returning magical number from 'arc anoid'
epriestley [Fri, 10 Aug 2012 22:29:27 +0000 (15:29 -0700)]
Raise exception instead of returning magical number from 'arc anoid'

Summary: how do I python

Test Plan: help

Reviewers: alanh

Reviewed By: alanh

CC: aran
Differential Revision: https://secure.phabricator.com/D3245

14 years agoFix serious problems with 'arc anoid'
epriestley [Fri, 10 Aug 2012 22:16:02 +0000 (15:16 -0700)]
Fix serious problems with 'arc anoid'

Summary: https://github.com/facebook/arcanist/issues/48

Test Plan: hmm

Reviewers: alanh, tuomaspelkonen

Reviewed By: tuomaspelkonen

CC: aran
Differential Revision: https://secure.phabricator.com/D3244

14 years agoAllow arcanist to search for libphutil in externals/includes/
epriestley [Fri, 10 Aug 2012 21:58:19 +0000 (14:58 -0700)]
Allow arcanist to search for libphutil in externals/includes/

Summary:
In some cases (notably, homebrew) an installer may not control where arcanist/ and libphutil/ live and may not be able to control 'include_path'.

Allow libphutil/ to be symlinked into arcanist/externals/includes/ if all else fails.

Test Plan:
  - Moved `libphutil` to `libphutilx`. Ran "arc" and got a failure.
  - Symlinked it into externals/includes/, ran `arc`, got success.
  - Moved it back to `libphutil`, ran `arc`, success.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran, tfmeusburger
Differential Revision: https://secure.phabricator.com/D3243

14 years agoFix doc links
vrana [Fri, 10 Aug 2012 21:15:15 +0000 (14:15 -0700)]
Fix doc links

Summary: I will also commit fixes in other repos.

Test Plan: LinkChecker

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3242

14 years agoRemove `beginRedirectOut()` from Arcanist
epriestley [Fri, 10 Aug 2012 19:10:09 +0000 (12:10 -0700)]
Remove `beginRedirectOut()` from Arcanist

Summary: We always do this on --recon now, see D3213.

Test Plan: Ran `arc diff --background 1` to generate this diff.

Reviewers: vrana

Reviewed By: vrana

CC: aran
Differential Revision: https://secure.phabricator.com/D3241

14 years agoMake the "this is technical documentation" message of "Arcanist Overview" more clear
epriestley [Fri, 10 Aug 2012 18:37:30 +0000 (11:37 -0700)]
Make the "this is technical documentation" message of "Arcanist Overview" more clear

Summary:
The only purpose of "Arcanist Overview" is to tell people they shouldn't be here, but we bury the lede.

Make it clear that this is not user documentation.

After T988 we can improve the organization here, but some recent users found this pretty confusing.

Test Plan: Generated and read documentation.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran
Differential Revision: https://secure.phabricator.com/D3235

14 years agoImprove "arc patch" error messages for mismatched local and diff
epriestley [Fri, 10 Aug 2012 01:39:41 +0000 (18:39 -0700)]
Improve "arc patch" error messages for mismatched local and diff

Summary: We emit a confusing error if there's no ".arcconfig" in the local right now.

Test Plan:
  $ arc patch D3185

    This patch is for the 'phabricator' project,  but the working copy
    belongs to the 'phabricatox' project. Still try to apply the patch? [Y/n]

  $ arc patch D3185

    This patch is for the 'phabricator' project, but the working copy does
    not have an '.arcconfig' file to identify which project it belongs to.
    Still try to apply the patch? [Y/n]

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran
Differential Revision: https://secure.phabricator.com/D3231

14 years agoAllow specifying root in `arc inlines`
vrana [Fri, 10 Aug 2012 00:37:47 +0000 (17:37 -0700)]
Allow specifying root in `arc inlines`

Summary: Simplifies editor bindings.

Test Plan:
  $ arc inlines --root W:/devtools/phabricator/

Reviewers: epriestley

Reviewed By: epriestley

CC: vii, aran, Korvin
Differential Revision: https://secure.phabricator.com/D3229

14 years agoRedirect output to console in background mode of `arc diff`
vrana [Thu, 9 Aug 2012 02:02:33 +0000 (19:02 -0700)]
Redirect output to console in background mode of `arc diff`

Summary: See D3208.

Test Plan:
  $ arc diff --background 1

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3210

14 years agoFix an issue where 'arc alias' reverses parameters
epriestley [Wed, 8 Aug 2012 19:58:27 +0000 (12:58 -0700)]
Fix an issue where 'arc alias' reverses parameters

Summary:
We shove alias parameters onto the front of the arg list so if you make an alias like "qdiff" = "diff x y z" and then run "qdiff a b c", we end up with "diff x y z a b c". However, currently we reverse alias parameters, so you actually get "diff z y x a b c".

This is a problem for `arc alias bdiff -- diff --background 1`, which evaluates to `arc diff 1 --background` and fails.

Test Plan: Created a `bdiff` alias and ran it successfully.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran
Differential Revision: https://secure.phabricator.com/D3196

14 years agoRun lint and unit before updating revision
vrana [Wed, 8 Aug 2012 19:08:41 +0000 (12:08 -0700)]
Run lint and unit before updating revision

Summary: Depends on D2614.

Test Plan:
Updated a diff with no lint errors.
Updated a diff with lint errors, verified that the previous message is not lost.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3174

14 years agoRun lint and unit tests in `arc diff` on background
vrana [Mon, 6 Aug 2012 20:40:20 +0000 (13:40 -0700)]
Run lint and unit tests in `arc diff` on background

Summary:
I usually write commit messages 1-2 minutes.
`arc lint` in our repository usually runs for around 30 seconds, `arc unit` another minute or two.
Even Phabricator unit tests sometimes runs long (because `CREATE DATABASE` and `DROP DATABASE` is slow in our setup for some reason).

Waiting for the results is boring and unnecessary.

This diff presents two different concepts how to run them on background:

# Lint is run with `--output json`, results are parsed and presented back to user. It isn't perfect - there's no context in printed lint errors which is a serious problem.
# Unit tests are run normally and the results are written to a scratch file. It also isn't perfect - colors are lost during the process.

I'll probably choose one approach and use it on both places. Let me know your thoughts about them.

This can be further improved to resolve the futures also after inputting the update message but it can be done in a separate diff.

Test Plan:
- Remove lint engine.
- Remove unit engine.
- Make lint errors.
- Make unit errors.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, beng, tuomaspelkonen, alanh
Differential Revision: https://secure.phabricator.com/D2614

14 years agoDepend on events when attaching Diff ID to postponed unit tests
vrana [Mon, 6 Aug 2012 23:56:11 +0000 (16:56 -0700)]
Depend on events when attaching Diff ID to postponed unit tests

Summary:
According to @epriestley, it's nasty and kind of crazy: D2933#1.
It also stands in my way for D2614.

Test Plan: Rewrote our callsite to event listener and verified that it still works.

Reviewers: tuomaspelkonen, epriestley

Reviewed By: epriestley

CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D3171

14 years agoFix an issue where branches at the same commit race to destruction in "arc branch"
epriestley [Wed, 8 Aug 2012 01:21:32 +0000 (18:21 -0700)]
Fix an issue where branches at the same commit race to destruction in "arc branch"

Summary:
If two branches have the same HEAD, they currently race to overwrite each other in $commit_map.

We don't need to return a map indexed by commit since nothing ever reads the keys out of it. Just update $branches in place.

Test Plan: With two branches at the same HEAD, ran "arc branch". Saw both branches in output.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran
Differential Revision: https://secure.phabricator.com/D3188

14 years agoThrow properly if there are uncommitted changes under Git
epriestley [Mon, 6 Aug 2012 18:56:01 +0000 (11:56 -0700)]
Throw properly if there are uncommitted changes under Git

Summary: This was accidentally disabled with some Mercurial changes that allowed dirty working copies.

Test Plan: Ran `arc diff` with staged changes.

Reviewers: nh

Reviewed By: nh

CC: aran
Differential Revision: https://secure.phabricator.com/D3165

14 years agoUse PhutilConsole in lint and unit
vrana [Sun, 5 Aug 2012 02:23:53 +0000 (19:23 -0700)]
Use PhutilConsole in lint and unit

Test Plan:
`arc lint` with OK result and with patchable error.
`arc unit` with passes and errors.
`arc diff` with patchable lint error.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3151

14 years agoAdd an arc flag workflow
Alan Huang [Fri, 3 Aug 2012 19:00:54 +0000 (12:00 -0700)]
Add an arc flag workflow

Summary:
Allow querying and modifying flags from arcanist. Currently
supports only printing and deleting flags for Differential revisions,
but it should be straightforward to add more capabilities (given Conduit
support).

Test Plan:
Run arc flag, passing it various revisions. Flags are
modified appropriately.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Maniphest Tasks: T1556

Differential Revision: https://secure.phabricator.com/D3133

14 years agoAdd mysql and mysqli functions to the phutil map whitelist
epriestley [Wed, 1 Aug 2012 18:02:20 +0000 (11:02 -0700)]
Add mysql and mysqli functions to the phutil map whitelist

Summary: I originally excluded `mysql` these under the theory that it would be impossible to test anything without it, but `arc` doesn't need it and you could have only one of the mysql-flavored extensions without having the other one. Whitelist all the mysql and mysqli extension functions as far as depenencies are concerned.

Test Plan: @floatinglomas, let me know if this fixes things for you?

Reviewers: btrahan, vrana, floatinglomas

Reviewed By: btrahan

CC: aran
Differential Revision: https://secure.phabricator.com/D3119

14 years agoMerge pull request #47 from aurelijus/master
Evan Priestley [Mon, 30 Jul 2012 11:54:21 +0000 (04:54 -0700)]
Merge pull request #47 from aurelijus/master

JSHint linter issue on windows

14 years agoJSHint linter issue on windows
Aurelijus [Mon, 30 Jul 2012 07:21:03 +0000 (09:21 +0200)]
JSHint linter issue on windows

Summary: On windows there is no 'which', only 'where'

Test Plan: Run JSHint linter on windows and unix-like system.

Reviewers: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3096

14 years agoMake arc patch show the superior error message if you are not authenticated
Bob Trahan [Sun, 29 Jul 2012 18:57:36 +0000 (11:57 -0700)]
Make arc patch show the superior error message if you are not authenticated

Summary: ...by making requireAuthentication return true if conduit is required.

Test Plan: mv ~/.arcrc ~/.arcrcbak; arc patch D12121; <verify error message>

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Maniphest Tasks: T1522

Differential Revision: https://secure.phabricator.com/D3014

14 years agoInclude extension classes in the builtin list
epriestley [Thu, 26 Jul 2012 21:46:53 +0000 (14:46 -0700)]
Include extension classes in the builtin list

Summary: Just like we ship with a list of extension functions, add a list of extension classes so people stop getting lint errors about DOMDocument just because some linter uses it.

Test Plan: Ran "arc lint".

Reviewers: vrana, btrahan, codeblock

Reviewed By: vrana

CC: aran
Differential Revision: https://secure.phabricator.com/D3082

14 years agoAdded support for 'hg export' diff format
Grigory [Thu, 26 Jul 2012 17:06:16 +0000 (10:06 -0700)]
Added support for 'hg export' diff format

Summary: This diff format is used by de-facto mercurial GUI called "TortoiseHG".
It is available as the only way to copy diff into clipboard (right click commit,
select "export", select "copy patch". I added this format support into arcanist
so revisions in Differential can be created from TortoiseHG via simple copy-
paste. Unit test added, manually tested.

See: https://github.com/facebook/arcanist/pull/46

Reviewed by: epriestley

14 years agoMinor, improve behavior of arc get-config.
epriestley [Thu, 26 Jul 2012 03:14:28 +0000 (20:14 -0700)]
Minor, improve behavior of arc get-config.

14 years agoAllow hyphens in arc library names
Nick Harper [Thu, 26 Jul 2012 01:37:25 +0000 (18:37 -0700)]
Allow hyphens in arc library names

Summary:
We've had these in our library names and they're quite useful as word
separators. Allowing them shouldn't cause any trouble.

Test Plan:
ran arc liberate in an empty directory, and it didn't complain when I gave
it a name with a hyphen.

Reviewers: epriestley, vrana, jungejason

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3070

14 years agoEnrich arc configuration and add stronger typing
epriestley [Thu, 26 Jul 2012 01:37:09 +0000 (18:37 -0700)]
Enrich arc configuration and add stronger typing

Summary:
See <https://github.com/facebook/arcanist/issues/45>

Currently, when the user types `arc set-config x false`, we set it as the string "false", which is usually not desirable. We have some steps toward typed config already, but expand on what we have and move as much stuff as possible into it, including all the config settings that aren't currently documented (there are still some lint-specific and project-specific settings not present here, but this is most of it).

Also make the `phutil_libraries` key a legacy name for `load`, and `immutable_history` a legacy name for `history.immutable`. Generally the goal here is to make config simpler and bring it more in-line with Git/Mercurial, which use dotted hierarchies.

I'll add some documentation here but I think most of the changes should be fairly straightforward.

Test Plan:
  - `arc set-config history.immutable on` (And similar -- sets to boolean true.)
  - `arc set-config history.immutable off` (And similar -- sets to boolean false.)
  - `arc set-config history.immutable derp` (And similar -- raises exception.)
  - `arc set-config history.immutable ''` (And similar -- removes setting value.)
  - `arc set-config --show`
  - `arc get-config`
  - `arc get-config base`

Reviewers: dschleimer, bos, btrahan, vrana

Reviewed By: dschleimer

CC: aran
Maniphest Tasks: T1546

Differential Revision: https://secure.phabricator.com/D3045

14 years agoFix parsing of "hg diff -r x:y" diffs
epriestley [Wed, 25 Jul 2012 22:55:32 +0000 (15:55 -0700)]
Fix parsing of "hg diff -r x:y" diffs

Summary: When you run `hg diff -r x:y`, we get two "-r" arguments in the diff header. Currently, we parse this incorrectly.

Test Plan: Added unit test which previously failed; test now passes.

Reviewers: dschleimer, btrahan

Reviewed By: dschleimer

CC: aran, cakoose
Maniphest Tasks: T1550

Differential Revision: https://secure.phabricator.com/D3061

14 years agoCreate a mysterious new workflow
Alan Huang [Sat, 21 Jul 2012 09:09:21 +0000 (02:09 -0700)]
Create a mysterious new workflow

Summary:
Phabricator, as we all know, is marketed as a fun adventure game. However, while it is occasionally fun and often an adventure, it's so far been sorely deficient in the game aspect. This patch aims to rectify that oversight. (Presence of the first two qualities is not guaranteed.)

Note: In case there's any doubt, this is not a serious suggestion. I was bored.

Test Plan: Seriously?

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3026

14 years agoEnable raising lint warnings for mulitple lines at once
vrana [Sun, 22 Jul 2012 19:52:10 +0000 (12:52 -0700)]
Enable raising lint warnings for mulitple lines at once

Summary:
We have a lint rule checking if some string is too long.
This string can span multiple lines.
If we report a warning at the first line then it is muted if the first line wasn't modified.
We need to say that this whole block is wrong and report it when at least one line from the block was modified.

Test Plan: Changed a lint rule to call `raiseLintAtLines()` and verified that the warning is reported even if the changed line isn't first.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3029

14 years agoFix ambiguous argument where a branch has the same name as a file
epriestley [Sun, 22 Jul 2012 20:19:09 +0000 (13:19 -0700)]
Fix ambiguous argument where a branch has the same name as a file

Summary: Currently, if you have a branch named "docs" and a local file named "docs", `git show -s docs` complains because it's ambiguous. Use `--` to unambiguously mark branches as revisions, not files.

Test Plan: Ran `arc branch` in a working copy with a "docs" branch and a "docs" file, got expected results.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran
Differential Revision: https://secure.phabricator.com/D3030

14 years agoShow "Fnnn" number in "arc upload"
epriestley [Sat, 21 Jul 2012 13:44:21 +0000 (06:44 -0700)]
Show "Fnnn" number in "arc upload"

Summary: We don't show the "Fnnn" number, but should.

Test Plan:
```$ arc upload README --conduit-uri=http://local.aphront.com:8080/
Uploading 'README'...
  F121 README: http://local.aphront.com:8080/file/data/fnu76irnwftin4akjpxv/PHID-FILE-yrjeblelwq6rv5a5gjko/README

Done.```

Reviewers: phleet, btrahan, vrana

Reviewed By: btrahan

CC: aran
Differential Revision: https://secure.phabricator.com/D3023

14 years agoMerge pull request #44 from ifraimow/master
Evan Priestley [Thu, 19 Jul 2012 22:19:57 +0000 (15:19 -0700)]
Merge pull request #44 from ifraimow/master

Adding confirmation message to 'arc todo' with information about the task created

14 years agoAdding confirmation message to 'arc todo' with information about the task created
Izzy Fraimow [Thu, 19 Jul 2012 22:12:12 +0000 (15:12 -0700)]
Adding confirmation message to 'arc todo' with information about the task created

Summary: 'arc todo' now logs a message with the task title and URI when run.

Test Plan: Run 'arc todo test' and see that it logs a message with the form 'Created task <task number>: '<task title' at <task URI>

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3016

14 years agoAllow running phpunit tests from any directory
vissi [Thu, 19 Jul 2012 22:00:14 +0000 (15:00 -0700)]
Allow running phpunit tests from any directory

Test Plan: Run `arc unit` anywhere.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D3017

14 years agoMerge pull request #43 from rafikk/master
Evan Priestley [Thu, 19 Jul 2012 17:50:09 +0000 (10:50 -0700)]
Merge pull request #43 from rafikk/master

Specify error severity for some PyFlakes messages

14 years agoSpecify error message for some pyflakes messages
Rafik Salama [Thu, 19 Jul 2012 17:40:31 +0000 (10:40 -0700)]
Specify error message for some pyflakes messages

14 years agoSpeedup `arc branch`
vrana [Wed, 18 Jul 2012 23:50:49 +0000 (16:50 -0700)]
Speedup `arc branch`

Summary:
This reduces time of `arc branch` from 13s to 7s in my repo which is faster than `git branch --verbose` (10s).

The price for this speedup is that we loose the information [ahead 1, behind 21242] but we showed it only in branches with no revision so it's not a big deal.

Test Plan:
  $ arc branch

Reviewers: epriestley

Reviewed By: epriestley

CC: ahupp, aran, Korvin
Differential Revision: https://secure.phabricator.com/D3005

14 years agoFix arc handling of "\n" files on Windows in SVN
epriestley [Wed, 18 Jul 2012 13:53:07 +0000 (06:53 -0700)]
Fix arc handling of "\n" files on Windows in SVN

Summary:
On Windows, a diff may have "\n" newlines (from the file itself) but "\r\n" blocks (from svn).

NOTE: indents are funky since I edited this with Notepad++, I'll fix before landing.

Test Plan: Diffed an edit to a "\n" newline file on Windows in SVN.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran
Differential Revision: https://secure.phabricator.com/D2998