Bench migrate-to-v5 Error!

Hi,

I seem to bothering again. Running “bench migrate-to-v5” command on a frappe bench freshly installed in Ubuntu getting the following error :

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/erpnext/bench-repo/bench/cli.py", line 38, in cli
    return bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/bench-repo/bench/cli.py", line 208, in _migrate_to_v5
    migrate_to_v5(bench=bench)
  File "/home/erpnext/bench-repo/bench/migrate_to_v5.py", line 14, in migrate_to_v5
    checkout_v5(repo, bench=bench)
  File "/home/erpnext/bench-repo/bench/migrate_to_v5.py", line 47, in checkout_v5
    exec_cmd("git checkout v5.0", cwd=cwd)
  File "/home/erpnext/bench-repo/bench/utils.py", line 61, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'git checkout v5.0' returned non-zero exit status 1

Anything wrong with my setup??

Akshay

What is your remote? If you are using your own fork, make sure it has the v5.0 branch.

No not using my fork … used the simple commands as illustrated at frappe/bench/readme. however when I run “git remote” … the only thing I see is upstream.

run git fetch upstream

successfully runs under frappe app but has no effect under erpnext app

I suspect it’s not fetching the refs.

What’s the output of

cd frappe-bench/apps/erpnext
git config --list
``

Hi ,

i had simmlar problem

here my result :
user.name=Bobby
user.email=bobzz.zone@gmail.com
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.upstream.url=GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
remote.upstream.fetch=+refs/heads/develop:refs/remotes/upstream/develop
branch.develop.remote=upstream
branch.develop.merge=refs/heads/develop

Thanks

In the erpnext dir,

git config --unset-all remote.upstream.fetch
git config --add remote.upstream.fetch
'+refs/heads/*:refs/remotes/upstream/*'
1 Like

its really awesome…its workss…