From 5ee2f74a7e3375f15e816cd08b00b5d993c7cb2f Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 3 Oct 2013 18:12:35 +0530 Subject: [PATCH] [minor] fixes to crm patch --- core/doctype/patch_log/patch_log.txt | 16 +++++++++++++++- webnotes/modules/patch_handler.py | 5 ++++- wnf.py | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/core/doctype/patch_log/patch_log.txt b/core/doctype/patch_log/patch_log.txt index 9b6a06f608..08d353ef77 100644 --- a/core/doctype/patch_log/patch_log.txt +++ b/core/doctype/patch_log/patch_log.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-17 11:36:45", "docstatus": 0, - "modified": "2013-07-05 14:48:05", + "modified": "2013-10-03 17:39:09", "modified_by": "Administrator", "owner": "Administrator" }, @@ -26,11 +26,25 @@ "parenttype": "DocType", "permlevel": 0 }, + { + "doctype": "DocPerm", + "name": "__common__", + "parent": "Patch Log", + "parentfield": "permissions", + "parenttype": "DocType", + "permlevel": 0, + "read": 1, + "report": 1, + "role": "Administrator" + }, { "doctype": "DocType", "name": "Patch Log" }, { "doctype": "DocField" + }, + { + "doctype": "DocPerm" } ] \ No newline at end of file diff --git a/webnotes/modules/patch_handler.py b/webnotes/modules/patch_handler.py index a8a2419480..edf685e38e 100644 --- a/webnotes/modules/patch_handler.py +++ b/webnotes/modules/patch_handler.py @@ -14,6 +14,8 @@ from __future__ import unicode_literals """ import webnotes +class PatchError(Exception): pass + def run_all(patch_list=None): """run all pending patches""" if webnotes.conn.table_exists("__PatchLog"): @@ -24,7 +26,8 @@ def run_all(patch_list=None): for patch in (patch_list or patches.patch_list.patch_list): if patch not in executed: if not run_single(patchmodule = patch): - return log(patch + ': failed: STOPPED') + log(patch + ': failed: STOPPED') + raise PatchError(patch) def reload_doc(args): import webnotes.modules diff --git a/wnf.py b/wnf.py index d860cbc693..cab65c46dd 100755 --- a/wnf.py +++ b/wnf.py @@ -231,7 +231,7 @@ def update(remote=None, branch=None, site=None): latest(site=site) @cmd -def latest(site=None, verbose=False): +def latest(site=None, verbose=True): import webnotes.modules.patch_handler import webnotes.model.sync