Summary:
If contributors use "history.immutable" by default (for example, in user/global config) and then try to contribute to Phabricator, they might land in a way that creates merge commits, which we'd prefer to avoid.
To make this a bit harder to do unintentionally, set "history.immutable" to "false" explicitly in `.arcconfig`. This will override any user or system setting and keep `land` in squash mode in this project.
This might also be a problem in general, and maybe in the long term we need something like one of these warnings:
> (when arc landing) You haven't landed changes to this project before, are you sure you want to create a merge commit / are you sure you want to squash?
...or:
> (when doing anything) This project doesn't have a history.immutable setting; you should probably set one so user settings don't win out.
...or just not let this be set at the user/system level, although that's annoying in some cases. Also maybe this:
> (when arc landing) You're about to create a merge commit, but the last Differential change in history squashed instead. Merge anyway?
However, we haven't seen this as a widespread issue outside of this project yet (and even in this project I think it has only happened 2-3 times), so just put up a guard rail in our own configuration for now.
Test Plan:
- Ran `arc set-config history.immutable true` to set the flag in my user settings.
- Ran `arc get-config` to verify that the setting overrode system/user settings:
```
epriestley@orbital ~/dev/phabricator $ arc get-config history.immutable --verbose
history.immutable
If true, arc will never change repository history (e.g., through amending
or rebasing). Defaults to true in Mercurial and false in Git. This
setting has no effect in Subversion.
Example Value: false
Current Value: false
Current Source: project
local Value: -
project Value: false
user Value: true
system Value: -
default Value: -
```
Reviewers: chad, fooishbar
Reviewed By: fooishbar
Differential Revision: https://secure.phabricator.com/D16364
Summary:
Also fix a few other minor issues:
- Use lint config.
- Fix a method signature from `arc unit --everything` (unrelated).
- Add a javelin doc.
Test Plan: Ran `arc lint`, `arc unit`, `arc linters`.
Reviewers: btrahan, joshuaspence
Reviewed By: joshuaspence
Subscribers: epriestley
Differential Revision: https://secure.phabricator.com/D9072
Summary:
Ref T2039. This diff is the equivalent to D9057, but for rP.
Depends on D9066.
Test Plan: Ran `arc lint` and ensure it doesn't complain about the `.arclint` file.
Reviewers: #blessed_reviewers, epriestley
Subscribers: epriestley, Korvin
Maniphest Tasks: T2039
Differential Revision: https://secure.phabricator.com/D9064
Summary: If I'm not mistaken, `project_id` was recently replaced by `project.name` and `conduit_uri` replaced by `phabricator.uri`.
Test Plan: I guess if this differential works, then everything is okay.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley
CC: Korvin, epriestley, aran
Differential Revision: https://secure.phabricator.com/D8338
Summary: If `jsxmin` is not available, use a pure PHP implementation instead (JsShrink).
Test Plan:
- Ran `arc lint --lintall` on all JS and fixed every relevant warning.
- Forced minification on and browsed around the site using JS behaviors. Didn't hit anything problematic.
Reviewers: vrana, btrahan
Reviewed By: vrana
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D5670
Summary:
This commit doesn't change license of any file. It just makes the license implicit (inherited from LICENSE file in the root directory).
We are removing the headers for these reasons:
- It wastes space in editors, less code is visible in editor upon opening a file.
- It brings noise to diff of the first change of any file every year.
- It confuses Git file copy detection when creating small files.
- We don't have an explicit license header in other files (JS, CSS, images, documentation).
- Using license header in every file is not obligatory: http://www.apache.org/dev/apply-license.html#new.
This change is approved by Alma Chao (Lead Open Source and IP Counsel at Facebook).
Test Plan: Verified that the license survived only in LICENSE file and that it didn't modify externals.
Reviewers: epriestley, davidrecordon
Reviewed By: epriestley
CC: aran, Korvin
Maniphest Tasks: T2035
Differential Revision: https://secure.phabricator.com/D3886
Summary: Allow Conduit method so they stop raising lint warnings. See D874.
Test Plan: Ran "arc lint" on conduit files and was no longer given frivolous
warnings.
Reviewers: nh, jungejason, tuomaspelkonen, aran
Reviewed By: nh
CC: aran, nh, epriestley
Differential Revision: 875
Summary:
Javelin is currently embedded in Phabricator via copy-and-paste of prebuilt
packages. This is not so great.
Pull it in as a submodule instead and make all the Phabriator resources declare
proper dependency trees. Add Javelin linting.
Test Plan:
I tried to run through pretty much all the JS functionality on the site. This is
still a high-risk change, but I did a pretty thorough test
Differential: inline comments, revealing diffs, list tokenizers, comment
preview, editing/deleting comments, add review action.
Maniphest: list tokenizer, comment actions
Herald: rule editing, tokenizers, add/remove rows
Reviewed By: tomo
Reviewers: aran, tomo, mroch, jungejason, tuomaspelkonen
CC: aran, tomo, epriestley
Differential Revision: 223
Summary:
The name of this config option is super confusing since it really just means "do
not implicitly 'mark-committed' when running 'arc commit' or 'arc amend'" but
that's kind of a lot of text. Not sure what best to do about this.
If this looks ok, I'll also make this change to libphutil, diviner, arcanist and
javelin.
Test Plan:
will amend
Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, aran, jungejason
CC: aran, epriestley, tuomaspelkonen
Differential Revision: 245