Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bench switch-to-master fails #141

Closed
jevonearth opened this issue Aug 21, 2015 · 1 comment
Closed

bench switch-to-master fails #141

jevonearth opened this issue Aug 21, 2015 · 1 comment

Comments

@jevonearth
Copy link

When attempting bench update on a V4 erpnext install, I get the following useful notice:

erpnext@erp-sandbox:~/frappe-bench$ bench update

This update will cause a major version change in Frappe/ERPNext from 4 to 6.
This would take significant time to migrate and might break custom apps. Please run `bench update --upgrade` to confirm.

You can stay on the latest stable release by running `bench switch-to-master` or pin your bench to 4 by running `bench swtich-to-v4`
erpnext@erp-sandbox:~/frappe-bench$

When i try run bench switch-to-master, I get the following errors:

erpnext@erp-sandbox:~/frappe-bench$ bench switch-to-master
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.92', 'console_scripts', 'bench')()
  File "/home/erpnext/bench-repo/bench/cli.py", line 60, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 680, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/bench-repo/bench/cli.py", line 319, in _switch_to_master
    switch_to_master(upgrade=upgrade)
  File "/home/erpnext/bench-repo/bench/app.py", line 174, in switch_to_master
    switch_branch('master', apps=apps, bench=bench, upgrade=upgrade)
  File "/home/erpnext/bench-repo/bench/app.py", line 150, in switch_branch
    raise MajorVersionUpgradeException("Switching to {0} will cause upgrade from {1} to {2}. Pass --upgrade to confirm".format(branch, version_upgrade[1], version_upgrade[2]), version_upgrade[1], version_upgrade[2])
bench.app.MajorVersionUpgradeException: Switching to master will cause upgrade from 4 to 6. Pass --upgrade to confirm
erpnext@erp-sandbox:~/frappe-bench$

Tested using:
frappe/bench at commit: 27d64b6

ERPNext: v4.20.2
Frappe Framework: v4.10.2
and
ERPNext: v4.25.7
Frappe Framework: v4.14.3

@pdvyas
Copy link
Contributor

pdvyas commented Aug 22, 2015

You've to pass --upgrade to switch to a branch with a different major version. In your case, going from 4 to 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants