mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 00:37:51 +00:00
parent
2a5289fce8
commit
c6e7477abf
17
bench/app.py
17
bench/app.py
@ -135,14 +135,15 @@ def remove_app(app, bench_path='.'):
|
|||||||
def pull_all_apps(bench_path='.', reset=False):
|
def pull_all_apps(bench_path='.', reset=False):
|
||||||
'''Check all apps if there no local changes, pull'''
|
'''Check all apps if there no local changes, pull'''
|
||||||
rebase = '--rebase' if get_config(bench_path).get('rebase_on_pull') else ''
|
rebase = '--rebase' if get_config(bench_path).get('rebase_on_pull') else ''
|
||||||
|
|
||||||
# chech for local changes
|
# chech for local changes
|
||||||
for app in get_apps(bench_path=bench_path):
|
if not reset:
|
||||||
app_dir = get_repo_dir(app, bench_path=bench_path)
|
for app in get_apps(bench_path=bench_path):
|
||||||
if os.path.exists(os.path.join(app_dir, '.git')):
|
app_dir = get_repo_dir(app, bench_path=bench_path)
|
||||||
out = subprocess.check_output(["git", "status"], cwd=app_dir)
|
if os.path.exists(os.path.join(app_dir, '.git')):
|
||||||
if not re.search(r'nothing to commit, working (directory|tree) clean', out):
|
out = subprocess.check_output(["git", "status"], cwd=app_dir)
|
||||||
print '''
|
if not re.search(r'nothing to commit, working (directory|tree) clean', out):
|
||||||
|
print '''
|
||||||
|
|
||||||
Cannot proceed with update: You have local changes in app "{0}" that are not committed.
|
Cannot proceed with update: You have local changes in app "{0}" that are not committed.
|
||||||
|
|
||||||
@ -150,7 +151,7 @@ Here are your choices:
|
|||||||
|
|
||||||
1. Merge the {0} app manually with "git pull" / "git pull --rebase" and fix conflicts.
|
1. Merge the {0} app manually with "git pull" / "git pull --rebase" and fix conflicts.
|
||||||
1. Temporarily remove your changes with "git stash" or discard them completely
|
1. Temporarily remove your changes with "git stash" or discard them completely
|
||||||
with "git reset --hard"
|
with "bench update --reset" or for individual repositries "git reset --hard"
|
||||||
2. If your changes are helpful for others, send in a pull request via GitHub and
|
2. If your changes are helpful for others, send in a pull request via GitHub and
|
||||||
wait for them to be merged in the core.'''.format(app)
|
wait for them to be merged in the core.'''.format(app)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user