Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
85a55d38
Commit
85a55d38
authored
Mar 04, 2011
by
Glenn Morris
Browse files
* lisp/vc/vc-bzr.el (vc-bzr-after-dir-status): Handle bzr 2.3.0. (Bug#8170)
parent
38c179c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
32 deletions
+38
-32
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/vc/vc-bzr.el
lisp/vc/vc-bzr.el
+34
-32
No files found.
lisp/ChangeLog
View file @
85a55d38
2011-03-04 Glenn Morris <rgm@gnu.org>
* vc/vc-bzr.el (vc-bzr-after-dir-status): Handle bzr 2.3.0. (Bug#8170)
2011-03-04 Tom Tromey <tromey@redhat.com>
* progmodes/gud.el (gdb-script-mode): Derive from prog-mode.
...
...
lisp/vc/vc-bzr.el
View file @
85a55d38
...
...
@@ -879,38 +879,40 @@ stream. Standard error output is discarded."
(result nil))
(goto-char (point-min))
(while (not (eobp))
(setq status-str
(buffer-substring-no-properties (point) (+ (point) 3)))
(setq translated (cdr (assoc status-str translation)))
(cond
((eq translated 'conflict)
;; For conflicts the file appears twice in the listing: once
;; with the M flag and once with the C flag, so take care
;; not to add it twice to `result'. Ugly.
(let* ((file
(buffer-substring-no-properties
;;For files with conflicts the format is:
;;C Text conflict in FILENAME
;; Bah.
(+ (point) 21) (line-end-position)))
(entry (assoc file result)))
(when entry
(setf (nth 1 entry) 'conflict))))
((eq translated 'renamed)
(re-search-forward "R[ M] \\(.*\\) => \\(.*\\)$" (line-end-position) t)
(let ((new-name (file-relative-name (match-string 2) relative-dir))
(old-name (file-relative-name (match-string 1) relative-dir)))
(push (list new-name 'edited
(vc-bzr-create-extra-fileinfo old-name)) result)))
;; do nothing for non existent files
((eq translated 'not-found))
(t
(push (list (file-relative-name
(buffer-substring-no-properties
(+ (point) 4)
(line-end-position)) relative-dir)
translated) result)))
(forward-line))
;; Bzr 2.3.0 added this if there are shelves. (Bug#8170)
(unless (looking-at "[1-9]+ shel\\(f\\|ves\\
)
exists?\\.
")
(setq status-str
(buffer-substring-no-properties (point) (+ (point) 3)))
(setq translated (cdr (assoc status-str translation)))
(cond
((eq translated 'conflict)
;; For conflicts the file appears twice in the listing: once
;; with the M flag and once with the C flag, so take care
;; not to add it twice to `result'. Ugly.
(let* ((file
(buffer-substring-no-properties
;;For files with conflicts the format is:
;;C Text conflict in FILENAME
;; Bah.
(+ (point) 21) (line-end-position)))
(entry (assoc file result)))
(when entry
(setf (nth 1 entry) 'conflict))))
((eq translated 'renamed)
(re-search-forward "
R[
M]
\\
(
.
*\\
)
=>
\\
(
.
*\\
)
$
" (line-end-position) t)
(let ((new-name (file-relative-name (match-string 2) relative-dir))
(old-name (file-relative-name (match-string 1) relative-dir)))
(push (list new-name 'edited
(vc-bzr-create-extra-fileinfo old-name)) result)))
;; do nothing for non existent files
((eq translated 'not-found))
(t
(push (list (file-relative-name
(buffer-substring-no-properties
(+ (point) 4)
(line-end-position)) relative-dir)
translated) result))))
(forward-line))
(funcall update-function result)))
(defun vc-bzr-dir-status (dir update-function)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment