Error on Upgrading

Hi Chaps :wink:

wasn’t here for a long time :slight_smile: sound great because everything works fine.
Now I got this little problem when trying to upgrade from 4 to 5.

See below:

    erpnext@erpnext-vm:~/frappe-bench$ bench update --upgrade
remote: Counting objects: 35, done.
remote: Total 35 (delta 23), reused 23 (delta 23), pack-reused 12
Unpacking objects: 100% (35/35), done.
From https://github.com/frappe/shopping-cart
 * branch            develop    -> FETCH_HEAD
Updating baa9601..0f151e9
Fast-forward
 setup.py                             |    2 +-
 shopping_cart/__version__.py         |    3 ++-
 shopping_cart/config/desktop.py      |    1 +
 shopping_cart/hooks.py               |    3 ++-
 shopping_cart/translations/bs.csv    |   46 ++++++++++++++++++++++++++++++++++
 shopping_cart/translations/ca.csv    |   29 +++++++++++++++++++++
 shopping_cart/translations/de.csv    |    6 ++---
 shopping_cart/translations/es.csv    |    6 ++---
 shopping_cart/translations/fr.csv    |    2 +-
 shopping_cart/translations/hr.csv    |    6 ++---
 shopping_cart/translations/ja.csv    |    2 +-
 shopping_cart/translations/nl.csv    |    4 +--
 shopping_cart/translations/pt.csv    |    2 +-
 shopping_cart/translations/ru.csv    |    2 +-
 shopping_cart/translations/tr.csv    |    6 ++---
 shopping_cart/translations/zh-tw.csv |    2 +-
 16 files changed, 100 insertions(+), 22 deletions(-)
 create mode 100644 shopping_cart/translations/bs.csv
 create mode 100644 shopping_cart/translations/ca.csv
From https://github.com/frappe/frappe
 * branch            develop    -> FETCH_HEAD
Updating 506e885..506c928
error: Your local changes to the following files would be overwritten by merge:
	frappe/templates/print_formats/standard.html
	frappe/templates/print_formats/standard_macros.html
	frappe/templates/styles/standard.css
Please, commit your changes or stash them before you can merge.
Aborting
Error: None
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 56, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/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-3.3-py2.7.egg/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/bench-repo/bench/cli.py", line 236, in update
    pull_all_apps()
  File "/home/erpnext/bench-repo/bench/app.py", line 91, in pull_all_apps
    exec_cmd("git pull {rebase} upstream {branch}".format(rebase=rebase, branch=get_current_branch(app_dir)), cwd=app_dir)
  File "/home/erpnext/bench-repo/bench/utils.py", line 79, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'git pull  upstream develop' returned non-zero exit status 1
erpnext@erpnext-vm:~/frappe-bench$ 

Another thing is that I really want to checkout my changes before I do the update and then checkin my changes again. Is that possible?

Best regards,
Dan

You can do a git stash in the frappe repo.

You can also take this opportunity to make these changes in a better way :smile:

Make a new app and override the template (by putting the edited template in templates/print_formats/standard.html dir of your app)