I waited for a the “Default Customer” issue to be fixed in the POS module and now I want to update my production installation to the new 8.0.22 in order to take advantage of the fix. I logged into the server via SSH and ran the following:
sudo -i
cd /home/frappe/frappe-bech
bench update
And I got several errors indicating that there had been changes made to nginx.py. The only changes made to any py scripts would have to have been done during the install.py script running. No other work has been done at the console.
The error is also telling me I need to be commit the changes or stash them before the merge can take place. It follows with a series of abort comments. So how would I “commit” changes that were done by the install.py script? I certainly do not want anything to change because the system works like it should. Does “commit” keep everything the same as it is now? if so, how do I tell the system to commit?
Here is the short trace back I got when trying to run update:
root@MSD-ERP:/home/frappe/frappe-bench# bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 6 (delta 4), reused 3 (delta 1), pack-reused 0
Unpacking objects: 100% (6/6), done.
From GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps
080ca17…e3fa8c4 master → origin/master
Updating 080ca17…e3fa8c4
error: Your local changes to the following files would be overwritten by merge:
bench/config/nginx.py
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 ca ll
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 inv oke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invo ke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invo ke
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
root@MSD-ERP:/home/frappe/frappe-bench#
What is the difference between commit and stash? Which should I use in this instance? How do I execute either in order to get the bench update to work?
If you can point me to documentation that would explain this it would be most helpful.
Thank you,
BKM