Please change the Subject header to a concise description of your patch. Please describe your patch between the LOG-START and LOG-END markers: <<LOG-START>>
* lisp/bzr-core.el (bzr-tree-id): Make this use a normal lambda, since it does not need to capture anything. * lisp/bzr-submit.el: Add (provide ...) line. (bzr-submit-patch-mapping): Fix customize interface bug. (bzr-patch-sent-action): Default to keeping both patch and changes, since that's the least invasive to the user. (bzr-changed-files): Fix regexp. (bzr-prepare-patch-submission): Insert bzr version string. (bzr-submit-patch): Put ".tmp-" in front of the patch name, in order to follow the same convention as the log-edit file created by DVC. * lisp/bzr.el (bzr-command-version) [variable]: New variable that contains the version of bzr that we are currently using. (bzr-command-version) [function]: Set bzr-command-version. Include only the first line from the output. <<LOG-END>> [VERSION] dvc-dev-bzr bzr (bazaar-ng) 0.8.2 Emacs : GNU Emacs 22.0.50.2 (i686-pc-linux-gnu, GTK+ Version 2.8.17) of 2006-06-07 on tuxtanker -- Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/ Interests: Emacs Lisp, text markup, protocols -- Jabber: mwolson_at_hcoop.net /` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #PurdueLUG |_] | \| |_| Project involvement: Emacs, Muse, Planner, ERC, EMMS
pgpSys8xBo6v9.pgp
Description: PGP signature
=== modified file 'lisp/bzr-core.el'
--- lisp/bzr-core.el
+++ lisp/bzr-core.el
@@ -56,11 +56,10 @@
(let ((tree-id nil))
(dvc-run-dvc-sync
'bzr (list "log" "-r" "1")
- :finished (dvc-capturing-lambda
- (output error status arguments)
+ :finished (lambda (output error status arguments)
(set-buffer output)
(goto-char (point-min))
- (if (re-search-forward "^branch nick:\s-*\(.+\)$" nil t)
+ (if (re-search-forward "^branch nick:\\s-*\\(.+\\)$" nil t)
(setq tree-id (match-string 1))
(setq tree-id "<unknown>")))
:error (lambda (output error status arguments)
=== modified file 'lisp/bzr-submit.el'
--- lisp/bzr-submit.el
+++ lisp/bzr-submit.el
@@ -55,14 +55,14 @@
addresses and the base name to use in the attached patch.
This is used by the `tla-submit-patch' function."
- :type '(repeat (cons :tag "Rule"
+ :type '(repeat (list :tag "Rule"
(string :tag "Branch nickname")
(list :tag "Target"
(string :tag "Email address")
(string :tag "Base name of patch"))))
:group 'dvc-bzr-submit)
-(defcustom bzr-patch-sent-action 'keep-patch
+(defcustom bzr-patch-sent-action 'keep-both
"*What shall be done, after sending a patch via mail.
The possible values are 'keep-patch, 'keep-changes, 'keep-both, 'keep-none."
:type '(choice (const keep-patch)
@@ -87,13 +87,13 @@
(when (and include-added
(re-search-forward "^added:" nil t))
(forward-line 1)
- (while (looking-at "^ \([^ ].*\)$")
+ (while (looking-at "^ \\([^ ].*\\)$")
(setq files (cons (match-string 1) files))
(forward-line 1)))
(goto-char (point-min))
(when (re-search-forward "^modified:" nil t)
(forward-line 1)
- (while (looking-at "^ \([^ ].*\)$")
+ (while (looking-at "^ \\([^ ].*\\)$")
(setq files (cons (match-string 1) files))
(forward-line 1))))
:error (lambda (output error status arguments)
@@ -201,7 +201,8 @@
(set (make-local-variable 'bzr-patch-data)
(list patch-full-name bzr-tree-root patch-full-name))
- (insert "[VERSION] " version-string)
+ (insert "[VERSION] " version-string "\n\n")
+ (insert bzr-command-version)
(goto-char (point-max))
(mml-attach-file patch-full-name "text/x-patch")
(bzr-show-diff-from-file patch-full-name)
@@ -248,7 +249,7 @@
(patch-base-file-name (or (nth 1 submit-patch-info) "bzr")))
(bzr-prepare-patch-submission
(dvc-uniquify-file-name (bzr-tree-root))
- (concat patch-base-file-name "-patch-"
+ (concat ".tmp-" patch-base-file-name "-patch-"
(format-time-string "%Y-%m-%d_%H-%M-%S" (current-time)))
mail-address
tree-id
@@ -262,3 +263,6 @@
"<<LOG-END>>\n")
nil
(interactive-p))))
+
+(provide 'bzr-submit)
+;;; bzr-submit.el ends here
=== modified file 'lisp/bzr.el'
--- lisp/bzr.el
+++ lisp/bzr.el
@@ -40,6 +40,9 @@
"The default directory that is suggested when calling `bzr-init-repository'.
This setting is useful, if you'd like to create a bunch of repositories in
a common base directory.")
+
+(defvar bzr-command-version nil
+ "Version of bzr that we are using.")
(defun bzr-init (&optional dir)
"Run bzr init."
@@ -390,11 +393,16 @@
(defun bzr-command-version ()
"Run bzr version."
(interactive)
- (let ((version (dvc-run-dvc-sync 'bzr (list "version")
- :finished 'dvc-output-buffer-handler)))
- (when (interactive-p)
- (message "Bazaar-NG Version: %s" version))
- version))
+ (setq bzr-command-version
+ (dvc-run-dvc-sync
+ 'bzr (list "version")
+ :finished (lambda (output error status arguments)
+ (set-buffer output)
+ (goto-char (point-min))
+ (buffer-substring (point) (point-at-eol)))))
+ (when (interactive-p)
+ (message "Bazaar-NG Version: %s" bzr-command-version))
+ bzr-command-version)
(defun bzr-whoami ()
"Run bzr whomai."
_______________________________________________ Dvc-dev mailing list [email protected] https://mail.gna.org/listinfo/dvc-dev
