Page MenuHomePhabricator

Legacy Arcanist configuration names are not respected in .arcrc
Closed, WontfixPublic

Description

Legacy configuration names (like immutable_history) are not respected in .arcrc. This is inconsistent. We should respect both modern and legacy configuration names from all configuration sources.


I prefer immutable_history, but I don't want to enforce it in the project I'm working on, so in my .arcrc, I have:

"config" : {
  "immutable_history" : "true"
}

The project .arcconfig has nothing in it for immutable_history, but yet my .arcrc setting is ignored.

How can I have my .arcrc config take precedence for keys that aren't included in .arcconfig?

This is using arcanist 1.3, I think but "arc version" gave me:

$ arc version
Exception
The current working directory is not part of a working copy for a supported version control system (Git, Subversion or Mercurial).
(Run with --trace for a full exception trace.)

Event Timeline

cjw296 raised the priority of this task from to Needs Triage.
cjw296 updated the task description. (Show Details)
cjw296 added a project: Arcanist.
cjw296 added a subscriber: cjw296.

Depends, I'm wondering if this is resolved with rARC0d0b8abcdd718bcf5a3b774362e69941d3895a44.

When I run arc version, I get a reasonable reply:

$ arc version
arcanist 52947cfd92b331916adffa1ff3233546446c881b (13 Oct 2014) 
libphutil 160eeba602bf5329ec7fee0fc0834e924557d9b3 (7 Oct 2014)

Try:

$ arc upgrade
$ arc version
$ arc get-config history.immutable
stebbib moved this task from In Progress to Backlog on the Arcanist board.

Okay, so I was using arcanist from an rpm created by one of my colleagues, looks like "arc version" requires arcanist to be run from a git clone as described in the docs?

Anyway, re-installed using the git clone method, now:

$ arc --version
arcanist 52947cfd92b331916adffa1ff3233546446c881b (13 Oct 2014)
libphutil 43a0b6d17bb097d76ef5ef936c91fa7448212cc2 (23 Oct 2014)

$ cat ~/.arcrc | grep immutable -B1 -A1
  "config" : {
    "immutable_history" : "true"
  }

But still:

$ 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: -
      Current Source: -

         local Value: -
       project Value: -
          user Value: -
        system Value: -
       default Value: -

In a project where the project's arcconfig has immutable history set, I get:

$ 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: true
      Current Source: project

         local Value: -
       project Value: true
          user Value: -
        system Value: -
       default Value: -

What should I do next?

Looks like legacy config option names aren't read from .arcrc. Change immutable_history to history.immutable in your .arcrc and try again?

epriestley renamed this task from .arcrc ignored when .arcconfig present to Legacy Arcanist configuration names are not respected in .arcrc.Oct 27 2014, 11:55 AM
epriestley updated the task description. (Show Details)

Cool. We'll fix the legacy names, they should work everywhere.

epriestley claimed this task.

I think we missed the window on this one.