From: Glenn Morris Date: Tue, 25 Jan 2011 05:10:02 +0000 (-0800) Subject: Make it easier to control which revisions bzrmerge might skip. X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~1322^2~132 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d0cb866238b3a7ab811ed666d21e8bd97f6f3b41;p=emacs.git Make it easier to control which revisions bzrmerge might skip. * admin/bzrmerge.el (bzrmerge-skip-regexp): New variable. (bzrmerge-missing): Use it. --- diff --git a/admin/ChangeLog b/admin/ChangeLog index 2337ccc879d..5ce38fdfbd5 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,8 @@ +2011-01-25 Glenn Morris + + * bzrmerge.el (bzrmerge-skip-regexp): New variable. + (bzrmerge-missing): Use it. + 2011-01-19 Paul Eggert * make-tarball.txt: Suggest 'autoreconf -I m4 --force' diff --git a/admin/bzrmerge.el b/admin/bzrmerge.el index 3cf7cf9b389..e9fd0ea00f8 100644 --- a/admin/bzrmerge.el +++ b/admin/bzrmerge.el @@ -27,6 +27,11 @@ (eval-when-compile (require 'cl)) ; assert +(defvar bzrmerge-skip-regexp + "back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version" + "Regexp matching logs of revisions that might be skipped. +`bzrmerge-missing' will ask you if it should skip any matches.") + (defun bzrmerge-merges () "Return the list of already merged (not yet committed) revisions. The list returned is sorted by oldest-first." @@ -91,6 +96,7 @@ The list returned is sorted by oldest-first." (defun bzrmerge-missing (from merges) "Return the list of revisions that need to be merged. MERGES is the revisions already merged but not yet committed. +Asks about skipping revisions with logs matching `bzrmerge-skip-regexp'. The result is of the form (TOMERGE . TOSKIP) where TOMERGE and TOSKIP are both lists of revnos, in oldest-first order." (with-current-buffer (get-buffer-create "*bzrmerge*") @@ -114,8 +120,7 @@ are both lists of revnos, in oldest-first order." (setq revno (string-to-number revno))) (re-search-forward "^message:\n") (while (and (not skip) - (re-search-forward - "back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version" nil t)) + (re-search-forward bzrmerge-skip-regexp nil t)) (let ((str (buffer-substring (line-beginning-position) (line-end-position)))) (when (string-match "\\` *" str)