Page MenuHomePhabricator

Set "history.immutable" to "false" explicitly in .arcconfig
ClosedPublic

Authored by epriestley on Aug 3 2016, 3:05 PM.
Tags
None
Referenced Files
F13096454: D16364.diff
Thu, Apr 25, 4:40 PM
F13087979: D16364.diff
Thu, Apr 25, 1:13 AM
Unknown Object (File)
Fri, Apr 19, 2:29 AM
Unknown Object (File)
Fri, Apr 19, 2:29 AM
Unknown Object (File)
Fri, Apr 19, 2:29 AM
Unknown Object (File)
Wed, Apr 17, 7:56 PM
Unknown Object (File)
Wed, Apr 17, 7:27 AM
Unknown Object (File)
Sun, Apr 14, 4:56 PM
Subscribers
None

Details

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: -

Diff Detail

Repository
rP Phabricator
Branch
config1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 13237
Build 16963: Run Core Tests
Build 16962: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Set "history.immutable" to "false" explicitly in .arcconfig.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: fooishbar, chad.
fooishbar edited edge metadata.

Unlike previously, this results in arc amend succeeding, rather than complaining.

This revision is now accepted and ready to land.Aug 3 2016, 3:08 PM
This revision was automatically updated to reflect the committed changes.