Hi all,
sorry for my long absence. Have been working out some other stuff and had no time to complete this topic here.
Now I’m sitting in front of a clone of my productive V4.
What my task is:
- Update
- Make ERPNext the same for my users again.
I have changed a few bits in the code but I am not really aware of how to save them and then reapply them. Are there possibilities to say: Save al from ERPNext - Update - Reapply.
Like -r would do in some Unix based apps?
Edit - this is my error on above recommendation:
erpnext@erpnext-vm:~/frappe-bench$ cd apps/frappe/
erpnext@erpnext-vm:~/frappe-bench/apps/frappe$ git stash
No local changes to save
erpnext@erpnext-vm:~/frappe-bench/apps/frappe$ cd ../..
erpnext@erpnext-vm:~/frappe-bench$ cd apps/erpnext/
erpnext@erpnext-vm:~/frappe-bench/apps/erpnext$ git stash
No local changes to save
erpnext@erpnext-vm:~/frappe-bench/apps/erpnext$ cd ../..
erpnext@erpnext-vm:~/frappe-bench$ bench update
remote: Counting objects: 35, done.
remote: Total 35 (delta 23), reused 23 (delta 23), pack-reused 12
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
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 29, in cli
return 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 113, in update
pull_all_apps()
File "/home/erpnext/bench-repo/bench/app.py", line 57, in pull_all_apps
exec_cmd("git pull {rebase} upstream HEAD".format(rebase=rebase), cwd=app_dir)
File "/home/erpnext/bench-repo/bench/utils.py", line 59, 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 HEAD' returned non-zero exit status 1
erpnext@erpnext-vm:~/frappe-bench$
Edit number 2:
I tried the same now with root - here is the output
root@erpnext-vm:/home/erpnext/frappe-bench# cd apps/frappe/
root@erpnext-vm:/home/erpnext/frappe-bench/apps/frappe# sudo git stash
No local changes to save
root@erpnext-vm:/home/erpnext/frappe-bench/apps/frappe# cd ../..
root@erpnext-vm:/home/erpnext/frappe-bench# cd apps/erpnext/
root@erpnext-vm:/home/erpnext/frappe-bench/apps/erpnext# sudo git stash
No local changes to save
root@erpnext-vm:/home/erpnext/frappe-bench/apps/erpnext# cd ../..
root@erpnext-vm:/home/erpnext/frappe-bench# sudo bench update
From https://github.com/frappe/shopping-cart
* branch HEAD -> FETCH_HEAD
Already up-to-date.
From https://github.com/frappe/frappe
* branch HEAD -> FETCH_HEAD
Already up-to-date.
From https://github.com/frappe/erpnext
* branch HEAD -> FETCH_HEAD
Updating 282695f..2dbe2b6
error: The following untracked working tree files would be overwritten by merge:
erpnext/accounts/doctype/gl_entry/test_gl_entry.py
Please move or remove 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 29, in cli
return 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 113, in update
pull_all_apps()
File "/home/erpnext/bench-repo/bench/app.py", line 57, in pull_all_apps
exec_cmd("git pull {rebase} upstream HEAD".format(rebase=rebase), cwd=app_dir)
File "/home/erpnext/bench-repo/bench/utils.py", line 59, 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 HEAD' returned non-zero exit status 1
Best,
Daniel