Updating erpnext and frappe

Hello;

@Ben_Cornwell_Mott

I tried to do update erpnext which is master version as following:

ERPNext: v8.0.29 (master)
Frappe Framework: v8.0.47 (master)

To get the latest changes, but I faced a troubles.

I need to ask a question related to the below steps taken from below link:

cd apps
cd erpnext
git fetch upstream master
git checkout master
cd …
cd …
bench switch-to-master
bench update

The question is:
do I have to do this for erpnext and frappe or only for erpnext? Because I feel that doing it for frappe is wrong.

Regards
Bilal

Please refrain from asking direct questions to individuals in the forum. There are a number of people that can assist you.

If you’re trying to update ERPNext, use bench update from the frappe-bench folder.
If that’s not working, please post a trace of the issue.

1 Like

OK but really I notified you because I saw for you the reply on the post.
I need to use bench update but as I got to know that bench update has a problem that it might do major update (for example, if my current version is 7 then it might make it 8) and that might cause troubles.
Is it really?
Regards
Bilal

I tried bench update from frappe-bench and I got the following (although I did not touch these files (common_site_config,py, setup_bench.yml, … etc). Appreciate the kindly help

error: Your local changes to the following files would be overwritten by merge:
.travis.yml
bench/config/common_site_config.py
playbooks/develop/includes/setup_bench.yml
playbooks/develop/includes/setup_dev_env.yml
playbooks/develop/includes/wkhtmltopdf.yml
vm/ansible/roles/wkhtmltopdf/tasks/main.yml
vm/ansible/vm.yml
Please, commit your changes or stash them before you can merge.
Aborting

As shown in the below:

bghayad@bghayad:/home/frappe/frappe-bench$ sudo bench update
[sudo] password for bghayad:
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
remote: Counting objects: 3644, done.
remote: Compressing objects: 100% (1266/1266), done.
remote: Total 3644 (delta 2434), reused 3525 (delta 2317), pack-reused 0
Receiving objects: 100% (3644/3644), 22.11 MiB | 256.00 KiB/s, done.
Resolving deltas: 100% (2434/2434), completed with 74 local objects.
From https://github.com/frappe/bench
a39fb1e…3a93dfa master -> origin/master

  • [new tag] 4.1 -> 4.1
  • [new tag] v0.9 -> v0.9
  • [new tag] v0.91 -> v0.91
  • [new tag] v0.92 -> v0.92
  • [new tag] v0.93 -> v0.93
  • [new tag] v1.0 -> v1.0
  • [new tag] v2.0 -> v2.0
  • [new tag] v2.1 -> v2.1
  • [new tag] v3.0 -> v3.0
  • [new tag] v3.1 -> v3.1
  • [new tag] v4.0 -> v4.0
    Updating a39fb1e…3a93dfa
    error: Your local changes to the following files would be overwritten by merge:
    .travis.yml
    bench/config/common_site_config.py
    playbooks/develop/includes/setup_bench.yml
    playbooks/develop/includes/setup_dev_env.yml
    playbooks/develop/includes/wkhtmltopdf.yml
    vm/ansible/roles/wkhtmltopdf/tasks/main.yml
    vm/ansible/vm.yml
    Please, commit your changes or stash them before you can merge.
    Aborting
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 11, in
    load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
    File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
    bench_command()
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
    return self.main(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
    rv = self.invoke(ctx)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
    return callback(*args, **kwargs)
    File “/home/frappe/.bench/bench/commands/update.py”, line 35, in update
    update_bench()
    File “/home/frappe/.bench/bench/utils.py”, line 229, in update_bench
    exec_cmd(“git pull”, cwd=cwd)
    File “/home/frappe/.bench/bench/utils.py”, line 130, in exec_cmd
    raise CommandFailedError(cmd)
    bench.utils.CommandFailedError: git pull

Regards
Bilal

please do the following steps:

cd bench-repo
git pull
cd .. 
cd frappe-bench
bench update

bench update --reset and --upgrade works after