]> git.eshelyaron.com Git - emacs.git/commitdiff
Make it easier to control which revisions bzrmerge might skip.
authorGlenn Morris <rgm@gnu.org>
Tue, 25 Jan 2011 05:10:02 +0000 (21:10 -0800)
committerGlenn Morris <rgm@gnu.org>
Tue, 25 Jan 2011 05:10:02 +0000 (21:10 -0800)
* admin/bzrmerge.el (bzrmerge-skip-regexp): New variable.
(bzrmerge-missing): Use it.

admin/ChangeLog
admin/bzrmerge.el

index 2337ccc879d76d77773f942428c483aee0f55552..5ce38fdfbd58dac5a1fbfdc8e1344e8a427870da 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-25  Glenn Morris  <rgm@gnu.org>
+
+       * bzrmerge.el (bzrmerge-skip-regexp): New variable.
+       (bzrmerge-missing): Use it.
+
 2011-01-19  Paul Eggert  <eggert@cs.ucla.edu>
 
        * make-tarball.txt: Suggest 'autoreconf -I m4 --force'
index 3cf7cf9b389ee0fc12cea7635b10d44a6b7ea18a..e9fd0ea00f81af185bae9538e99a2235a5f1849e 100644 (file)
 (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)