aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc
diff options
context:
space:
mode:
authorStefan Monnier2011-03-06 16:22:16 -0500
committerStefan Monnier2011-03-06 16:22:16 -0500
commit0d6459dfb52188481bfd6bb53f1b2f653ecd6a5d (patch)
tree306b87fc2903ad23343f3c84be1cccfa72e5a97e /lisp/vc
parent798cb64441228d473f7bdd213183c70fb582595c (diff)
parent892777baa1739fa5f1f2d1c2975488c3e6f57bae (diff)
downloademacs-0d6459dfb52188481bfd6bb53f1b2f653ecd6a5d.tar.gz
emacs-0d6459dfb52188481bfd6bb53f1b2f653ecd6a5d.zip
Merge from trunk
Diffstat (limited to 'lisp/vc')
-rw-r--r--lisp/vc/diff-mode.el2
-rw-r--r--lisp/vc/ediff-init.el4
-rw-r--r--lisp/vc/emerge.el8
-rw-r--r--lisp/vc/vc-bzr.el89
-rw-r--r--lisp/vc/vc-dir.el7
-rw-r--r--lisp/vc/vc-rcs.el12
-rw-r--r--lisp/vc/vc-svn.el4
-rw-r--r--lisp/vc/vc.el4
8 files changed, 72 insertions, 58 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 59e442a89c3..8e5fe27f965 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -1266,7 +1266,7 @@ a diff with \\[diff-reverse-direction].
1266 1266
1267 ;; Set up `whitespace-mode' so that turning it on will show trailing 1267 ;; Set up `whitespace-mode' so that turning it on will show trailing
1268 ;; whitespace problems on the modified lines of the diff. 1268 ;; whitespace problems on the modified lines of the diff.
1269 (set (make-local-variable 'whitespace-style) '(trailing)) 1269 (set (make-local-variable 'whitespace-style) '(face trailing))
1270 (set (make-local-variable 'whitespace-trailing-regexp) 1270 (set (make-local-variable 'whitespace-trailing-regexp)
1271 "^[-\+!<>].*?\\([\t ]+\\)$") 1271 "^[-\+!<>].*?\\([\t ]+\\)$")
1272 1272
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index ff1f7f6b017..0d904ec85c4 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -560,7 +560,6 @@ See the documentation string of `ediff-focus-on-regexp-matches' for details.")
560 :group 'ediff) 560 :group 'ediff)
561 561
562 562
563(ediff-defvar-local ediff-use-faces t "")
564(defcustom ediff-use-faces t 563(defcustom ediff-use-faces t
565 "If t, differences are highlighted using faces, if device supports faces. 564 "If t, differences are highlighted using faces, if device supports faces.
566If nil, differences are highlighted using ASCII flags, ediff-before-flag 565If nil, differences are highlighted using ASCII flags, ediff-before-flag
@@ -568,6 +567,7 @@ and ediff-after-flag. On a non-window system, differences are always
568highlighted using ASCII flags." 567highlighted using ASCII flags."
569 :type 'boolean 568 :type 'boolean
570 :group 'ediff-highlighting) 569 :group 'ediff-highlighting)
570(ediff-defvar-local ediff-use-faces t "")
571 571
572;; this indicates that diff regions are word-size, so fine diffs are 572;; this indicates that diff regions are word-size, so fine diffs are
573;; permanently nixed; used in ediff-windows-wordwise and ediff-regions-wordwise 573;; permanently nixed; used in ediff-windows-wordwise and ediff-regions-wordwise
@@ -604,13 +604,13 @@ meaning of this variable."
604 :type 'boolean 604 :type 'boolean
605 :group 'ediff) 605 :group 'ediff)
606 606
607(ediff-defvar-local ediff-highlight-all-diffs t "")
608(defcustom ediff-highlight-all-diffs t 607(defcustom ediff-highlight-all-diffs t
609 "If nil, only the selected differences are highlighted. 608 "If nil, only the selected differences are highlighted.
610Otherwise, all difference regions are highlighted, but the selected region is 609Otherwise, all difference regions are highlighted, but the selected region is
611shown in brighter colors." 610shown in brighter colors."
612 :type 'boolean 611 :type 'boolean
613 :group 'ediff-highlighting) 612 :group 'ediff-highlighting)
613(ediff-defvar-local ediff-highlight-all-diffs t "")
614 614
615 615
616;; The suffix of the control buffer name. 616;; The suffix of the control buffer name.
diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el
index ee34944e448..601b6b1e597 100644
--- a/lisp/vc/emerge.el
+++ b/lisp/vc/emerge.el
@@ -1271,10 +1271,10 @@ Otherwise, the A or B file present is copied to the output file."
1271(defun emerge-merge-directories (a-dir b-dir ancestor-dir output-dir) 1271(defun emerge-merge-directories (a-dir b-dir ancestor-dir output-dir)
1272 (interactive 1272 (interactive
1273 (list 1273 (list
1274 (read-file-name "A directory: " nil nil 'confirm) 1274 (read-directory-name "A directory: " nil nil 'confirm)
1275 (read-file-name "B directory: " nil nil 'confirm) 1275 (read-directory-name "B directory: " nil nil 'confirm)
1276 (read-file-name "Ancestor directory (null for none): " nil nil 'confirm) 1276 (read-directory-name "Ancestor directory (null for none): " nil nil 'confirm)
1277 (read-file-name "Output directory (null for none): " nil nil 'confirm))) 1277 (read-directory-name "Output directory (null for none): " nil nil 'confirm)))
1278 ;; Check that we're not on a line 1278 ;; Check that we're not on a line
1279 (if (not (and (bolp) (eolp))) 1279 (if (not (and (bolp) (eolp)))
1280 (error "There is text on this line")) 1280 (error "There is text on this line"))
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 5e6e054924c..a0a16601ed7 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -182,10 +182,19 @@ in the repository root directory of FILE."
182 ;; format 3' in the first line. 182 ;; format 3' in the first line.
183 ;; If the `checkout/dirstate' file cannot be parsed, fall back to 183 ;; If the `checkout/dirstate' file cannot be parsed, fall back to
184 ;; running `vc-bzr-state'." 184 ;; running `vc-bzr-state'."
185 ;;
186 ;; The format of the dirstate file is explained in bzrlib/dirstate.py
187 ;; in the bzr distribution. Basically:
188 ;; header-line giving the version of the file format in use.
189 ;; a few lines of stuff
190 ;; entries, one per line, with null-separated fields. Each line:
191 ;; entry_key = dirname (may be empty), basename, file-id
192 ;; current = common ( = kind, fingerprint, size, executable )
193 ;; + working ( = packed_stat )
194 ;; parent = common ( as above ) + history ( = rev_id )
195 ;; kinds = (r)elocated, (a)bsent, (d)irectory, (f)ile, (l)ink
185 (lexical-let ((root (vc-bzr-root file))) 196 (lexical-let ((root (vc-bzr-root file)))
186 (when root ; Short cut. 197 (when root ; Short cut.
187 ;; This looks at internal files. May break if they change
188 ;; their format.
189 (lexical-let ((dirstate (expand-file-name vc-bzr-admin-dirstate root))) 198 (lexical-let ((dirstate (expand-file-name vc-bzr-admin-dirstate root)))
190 (condition-case nil 199 (condition-case nil
191 (with-temp-buffer 200 (with-temp-buffer
@@ -210,13 +219,14 @@ in the repository root directory of FILE."
210 ;; was executable the last time bzr checked? 219 ;; was executable the last time bzr checked?
211 "[^\0]*\0" 220 "[^\0]*\0"
212 "[^\0]*\0" ;? 221 "[^\0]*\0" ;?
213 "\\([^\0]*\\)\0" ;"a/f/d" a=added? 222 ;; Parent information. Absent in a new repo.
223 "\\(?:\\([^\0]*\\)\0" ;"a/f/d" a=added?
214 "\\([^\0]*\\)\0" ;sha1 again? 224 "\\([^\0]*\\)\0" ;sha1 again?
215 "\\([^\0]*\\)\0" ;size again? 225 "\\([^\0]*\\)\0" ;size again?
216 ;; y/n. Whether or not the repo thinks 226 ;; y/n. Whether or not the repo thinks
217 ;; the file should be executable? 227 ;; the file should be executable?
218 "\\([^\0]*\\)\0" 228 "\\([^\0]*\\)\0"
219 "[^\0]*\0" ;last revid? 229 "[^\0]*\0\\)?" ;last revid?
220 ;; There are more fields when merges are pending. 230 ;; There are more fields when merges are pending.
221 ) 231 )
222 nil t) 232 nil t)
@@ -226,7 +236,10 @@ in the repository root directory of FILE."
226 ;; conflict markers). 236 ;; conflict markers).
227 (cond 237 (cond
228 ((eq (char-after (match-beginning 1)) ?a) 'removed) 238 ((eq (char-after (match-beginning 1)) ?a) 'removed)
229 ((eq (char-after (match-beginning 4)) ?a) 'added) 239 ;; If there is no parent, this must be a new repo.
240 ;; If file is in dirstate, can only be added (b#8025).
241 ((or (not (match-beginning 4))
242 (eq (char-after (match-beginning 4)) ?a)) 'added)
230 ((or (and (eq (string-to-number (match-string 3)) 243 ((or (and (eq (string-to-number (match-string 3))
231 (nth 7 (file-attributes file))) 244 (nth 7 (file-attributes file)))
232 (equal (match-string 5) 245 (equal (match-string 5)
@@ -866,38 +879,40 @@ stream. Standard error output is discarded."
866 (result nil)) 879 (result nil))
867 (goto-char (point-min)) 880 (goto-char (point-min))
868 (while (not (eobp)) 881 (while (not (eobp))
869 (setq status-str 882 ;; Bzr 2.3.0 added this if there are shelves. (Bug#8170)
870 (buffer-substring-no-properties (point) (+ (point) 3))) 883 (unless (looking-at "[1-9]+ shel\\(f\\|ves\\) exists?\\.")
871 (setq translated (cdr (assoc status-str translation))) 884 (setq status-str
872 (cond 885 (buffer-substring-no-properties (point) (+ (point) 3)))
873 ((eq translated 'conflict) 886 (setq translated (cdr (assoc status-str translation)))
874 ;; For conflicts the file appears twice in the listing: once 887 (cond
875 ;; with the M flag and once with the C flag, so take care 888 ((eq translated 'conflict)
876 ;; not to add it twice to `result'. Ugly. 889 ;; For conflicts the file appears twice in the listing: once
877 (let* ((file 890 ;; with the M flag and once with the C flag, so take care
878 (buffer-substring-no-properties 891 ;; not to add it twice to `result'. Ugly.
879 ;;For files with conflicts the format is: 892 (let* ((file
880 ;;C Text conflict in FILENAME 893 (buffer-substring-no-properties
881 ;; Bah. 894 ;;For files with conflicts the format is:
882 (+ (point) 21) (line-end-position))) 895 ;;C Text conflict in FILENAME
883 (entry (assoc file result))) 896 ;; Bah.
884 (when entry 897 (+ (point) 21) (line-end-position)))
885 (setf (nth 1 entry) 'conflict)))) 898 (entry (assoc file result)))
886 ((eq translated 'renamed) 899 (when entry
887 (re-search-forward "R[ M] \\(.*\\) => \\(.*\\)$" (line-end-position) t) 900 (setf (nth 1 entry) 'conflict))))
888 (let ((new-name (file-relative-name (match-string 2) relative-dir)) 901 ((eq translated 'renamed)
889 (old-name (file-relative-name (match-string 1) relative-dir))) 902 (re-search-forward "R[ M] \\(.*\\) => \\(.*\\)$" (line-end-position) t)
890 (push (list new-name 'edited 903 (let ((new-name (file-relative-name (match-string 2) relative-dir))
891 (vc-bzr-create-extra-fileinfo old-name)) result))) 904 (old-name (file-relative-name (match-string 1) relative-dir)))
892 ;; do nothing for non existent files 905 (push (list new-name 'edited
893 ((eq translated 'not-found)) 906 (vc-bzr-create-extra-fileinfo old-name)) result)))
894 (t 907 ;; do nothing for non existent files
895 (push (list (file-relative-name 908 ((eq translated 'not-found))
896 (buffer-substring-no-properties 909 (t
897 (+ (point) 4) 910 (push (list (file-relative-name
898 (line-end-position)) relative-dir) 911 (buffer-substring-no-properties
899 translated) result))) 912 (+ (point) 4)
900 (forward-line)) 913 (line-end-position)) relative-dir)
914 translated) result))))
915 (forward-line))
901 (funcall update-function result))) 916 (funcall update-function result)))
902 917
903(defun vc-bzr-dir-status (dir update-function) 918(defun vc-bzr-dir-status (dir update-function)
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 38fbaaedd32..d4970207b94 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -265,6 +265,7 @@ See `run-hooks'."
265 (define-key map [C-up] 'vc-dir-previous-directory) 265 (define-key map [C-up] 'vc-dir-previous-directory)
266 ;; The remainder. 266 ;; The remainder.
267 (define-key map "f" 'vc-dir-find-file) 267 (define-key map "f" 'vc-dir-find-file)
268 (define-key map "e" 'vc-dir-find-file) ; dired-mode compatibility
268 (define-key map "\C-m" 'vc-dir-find-file) 269 (define-key map "\C-m" 'vc-dir-find-file)
269 (define-key map "o" 'vc-dir-find-file-other-window) 270 (define-key map "o" 'vc-dir-find-file-other-window)
270 (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process) 271 (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process)
@@ -1184,9 +1185,9 @@ These are the commands available for use in the file status buffer:
1184 ;; therefore it makes sense to always do that. 1185 ;; therefore it makes sense to always do that.
1185 ;; Otherwise if you do C-x v d -> C-x C-f -> C-c v d 1186 ;; Otherwise if you do C-x v d -> C-x C-f -> C-c v d
1186 ;; you may get a new *vc-dir* buffer, different from the original 1187 ;; you may get a new *vc-dir* buffer, different from the original
1187 (file-truename (read-file-name "VC status for directory: " 1188 (file-truename (read-directory-name "VC status for directory: "
1188 default-directory default-directory t 1189 default-directory default-directory t
1189 nil #'file-directory-p)) 1190 nil))
1190 (if current-prefix-arg 1191 (if current-prefix-arg
1191 (intern 1192 (intern
1192 (completing-read 1193 (completing-read
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index d3a64f15f9e..488efaa3522 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -25,14 +25,10 @@
25 25
26;; See vc.el 26;; See vc.el
27 27
28;; Some features will not work with old RCS versions. Where 28;; Some features will not work with ancient RCS versions. Where
29;; appropriate, VC finds out which version you have, and allows or 29;; appropriate, VC finds out which version you have, and allows or
30;; disallows those features (stealing locks, for example, works only 30;; disallows those features.
31;; from 5.6.2 onwards). 31
32;; Even initial checkins will fail if your RCS version is so old that ci
33;; doesn't understand -t-; this has been known to happen to people running
34;; NExTSTEP 3.0.
35;;
36;; You can support the RCS -x option by customizing vc-rcs-master-templates. 32;; You can support the RCS -x option by customizing vc-rcs-master-templates.
37 33
38;;; Code: 34;;; Code:
@@ -391,7 +387,7 @@ whether to remove it."
391 (vc-rcs-set-default-branch file 387 (vc-rcs-set-default-branch file
392 (if (vc-rcs-trunk-p new-version) nil 388 (if (vc-rcs-trunk-p new-version) nil
393 (vc-branch-part new-version))) 389 (vc-branch-part new-version)))
394 ;; If this is an old RCS release, we might have 390 ;; If this is an old (pre-1992!) RCS release, we might have
395 ;; to remove a remaining lock. 391 ;; to remove a remaining lock.
396 (if (not (vc-rcs-release-p "5.6.2")) 392 (if (not (vc-rcs-release-p "5.6.2"))
397 ;; exit status of 1 is also accepted. 393 ;; exit status of 1 is also accepted.
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index 20c7689f401..7362258a42d 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -174,7 +174,9 @@ If you want to force an empty list of arguments, use t."
174 (while (re-search-forward re nil t) 174 (while (re-search-forward re nil t)
175 (let ((state (cdr (assq (aref (match-string 1) 0) state-map))) 175 (let ((state (cdr (assq (aref (match-string 1) 0) state-map)))
176 (propstat (cdr (assq (aref (match-string 2) 0) state-map))) 176 (propstat (cdr (assq (aref (match-string 2) 0) state-map)))
177 (filename (match-string 4))) 177 (filename (if (memq system-type '(windows-nt ms-dos))
178 (replace-regexp-in-string "\\\\" "/" (match-string 4))
179 (match-string 4))))
178 (and (memq propstat '(conflict edited)) 180 (and (memq propstat '(conflict edited))
179 (not (eq state 'conflict)) ; conflict always wins 181 (not (eq state 'conflict)) ; conflict always wins
180 (setq state propstat)) 182 (setq state propstat))
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 02743847800..200291bd925 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1954,7 +1954,7 @@ checked out in that new branch."
1954 ;; For VC's that do not work at file level, it's pointless 1954 ;; For VC's that do not work at file level, it's pointless
1955 ;; to ask for a directory, branches are created at repository level. 1955 ;; to ask for a directory, branches are created at repository level.
1956 default-directory 1956 default-directory
1957 (read-file-name "Directory: " default-directory default-directory t)) 1957 (read-directory-name "Directory: " default-directory default-directory t))
1958 (read-string (if current-prefix-arg "New branch name: " "New tag name: ")) 1958 (read-string (if current-prefix-arg "New branch name: " "New tag name: "))
1959 current-prefix-arg))) 1959 current-prefix-arg)))
1960 (message "Making %s... " (if branchp "branch" "tag")) 1960 (message "Making %s... " (if branchp "branch" "tag"))
@@ -1980,7 +1980,7 @@ allowed and simply skipped)."
1980 ;; For VC's that do not work at file level, it's pointless 1980 ;; For VC's that do not work at file level, it's pointless
1981 ;; to ask for a directory, branches are created at repository level. 1981 ;; to ask for a directory, branches are created at repository level.
1982 default-directory 1982 default-directory
1983 (read-file-name "Directory: " default-directory default-directory t)) 1983 (read-directory-name "Directory: " default-directory default-directory t))
1984 (read-string "Tag name to retrieve (default latest revisions): ")))) 1984 (read-string "Tag name to retrieve (default latest revisions): "))))
1985 (let ((update (yes-or-no-p "Update any affected buffers? ")) 1985 (let ((update (yes-or-no-p "Update any affected buffers? "))
1986 (msg (if (or (not name) (string= name "")) 1986 (msg (if (or (not name) (string= name ""))