Page MenuHomePhabricator

arc upgrade on Windows doesn't understand it's a git repo
Closed, ResolvedPublic


using git-bash, and a normal installation, some users see this:

*** This command executed from D:\someproject\dev (project development repo) ***
$ arc upgrade --trace
libphutil loaded from 'D:\Arcanist\libphutil\src'.
arcanist loaded from 'D:\Arcanist\arcanist\src'.
Config: Reading user configuration file "C:\Users\<censored>\AppData\Roaming/.arcrc"...
Config: Reading system configuration file "C:\ProgramData\phabricator\arcanist\config"...
Working Copy: Reading .arcconfig from "D:\someproject\dev/.arcconfig".
Working Copy: Path "d:\someproject\dev" is part of `git` working copy "D:\someproject\dev".
Working Copy: Project root is at "D:\someproject\dev".
Config: Did not find local configuration at "D:\someproject\dev\.git\arc/config".
Upgrading libphutil...
Working Copy: No candidate locations for .arcconfig from this working directory.
Working Copy: Path "D:\Arcanist\libphutil" is not in any working copy.
[2015-09-22 20:19:13] EXCEPTION: (Exception) The current working directory is not part of a working copy for a supported version control system (Git, Subversion or Mercurial). at [<arcanist>\src\repository\api\ArcanistRepositoryAPI.php:82]
arcanist(head=master, ref.master=28b89785fe5f), phutil(head=master, ref.master=c72eb747e706)
  #0 ArcanistRepositoryAPI::newAPIFromConfigurationManager(ArcanistConfigurationManager) called at [<arcanist>\src\workflow\ArcanistUpgradeWorkflow.php:42]
  #1 ArcanistUpgradeWorkflow::run() called at [<arcanist>\scripts\arcanist.php:382]

running arc which in 'D:\Arcanist\libphutil' does recognize it as a git repo.

Event Timeline

avivey updated the task description. (Show Details)
avivey added projects: Windows, Arcanist.
avivey added a subscriber: avivey.

More information:

An install script is used to install arcanist on team member's development computers (Win7 x64).

PHP Version (as seen in script below): php-5.6.1-Win32-VC11-x86

Some users on team experience the problem, others do not. Those who have the problem seem to experience it in any shell (cmd, git bash, cygbash).

Relevant excerpt of the script (as it does some things unrelated to arcanist/phabricator as well):

Attempt to create Arcanist directory
arcanist_dir = 'Arcanist'
if not os.path.exists(arcanist_dir):
    print "Arcanist directory already exists.\n"
    remove = raw_input("Force remove directory and start over? (y/N)")
        os.system("RMDIR Arcanist /s /q")
        print "Not sure what to do\n"

Clone Git repositories for arcanist
print "Cloning Repositories...\n"

Download PHP
print('Downloaded PHP\n')

Unzip PHP
print "Unzipping PHP...\n"
zipf = zipfile.ZipFile('')

Add Arcanist and PHP to System PATH
print('Editing path...\n')
key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 0, _winreg.KEY_ALL_ACCESS)
value = _winreg.QueryValueEx(key, 'PATH')
newpath = value[0] + ';' + current_dir + '\\' + arcanist_dir + '\\arcanist\\bin;' + current_dir + '\\' + arcanist_dir + '\\PHP'
_winreg.SetValueEx(key, 'PATH', 0 , _winreg.REG_SZ, newpath)
os.environ["PATH"] = newpath

Full links to some various traces that were of no apparent help: