Mercurial > emacs
comparison lisp/vc.el @ 83383:2a679c81f552
Merged from miles@gnu.org--gnu-2005 (patch 118-132, 551-577)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-551
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-552
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-553
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-554
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-555
Remove CVS keywords from newsticker files
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-556
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-557
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-558
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-559
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-560
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-561
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-562
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-563
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-565
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-566
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-567
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-568
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-569
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-570
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-571
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-572
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-573
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-574
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-575
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-576
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-577
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-118
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-119
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-120
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-121
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-122
Update from CVS: lisp/mm-url.el (mm-url-decode-entities): Fix regexp.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-123
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-124
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-125
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-126
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-127
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-128
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-129
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-130
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-131
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-132
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-423
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 09 Oct 2005 20:00:17 +0000 |
parents | de684325b343 96187e7edd1b |
children | b31326248cf6 |
comparison
equal
deleted
inserted
replaced
83382:7a3090aca393 | 83383:2a679c81f552 |
---|---|
1705 a directory, in that case, generate diffs between the correponding | 1705 a directory, in that case, generate diffs between the correponding |
1706 versions of all registered files in or below it." | 1706 versions of all registered files in or below it." |
1707 (interactive | 1707 (interactive |
1708 (let ((file (expand-file-name | 1708 (let ((file (expand-file-name |
1709 (read-file-name (if buffer-file-name | 1709 (read-file-name (if buffer-file-name |
1710 "File or dir to diff: (default visited file) " | 1710 "File or dir to diff (default visited file): " |
1711 "File or dir to diff: ") | 1711 "File or dir to diff: ") |
1712 default-directory buffer-file-name t))) | 1712 default-directory buffer-file-name t))) |
1713 (rev1-default nil) (rev2-default nil)) | 1713 (rev1-default nil) (rev2-default nil)) |
1714 ;; compute default versions based on the file state | 1714 ;; compute default versions based on the file state |
1715 (cond | 1715 (cond |
1726 (if (string= rev1-default "") (setq rev1-default nil)) | 1726 (if (string= rev1-default "") (setq rev1-default nil)) |
1727 (setq rev2-default (vc-workfile-version file)))) | 1727 (setq rev2-default (vc-workfile-version file)))) |
1728 ;; construct argument list | 1728 ;; construct argument list |
1729 (list file | 1729 (list file |
1730 (read-string (if rev1-default | 1730 (read-string (if rev1-default |
1731 (concat "Older version: (default " | 1731 (concat "Older version (default " |
1732 rev1-default ") ") | 1732 rev1-default "): ") |
1733 "Older version: ") | 1733 "Older version: ") |
1734 nil nil rev1-default) | 1734 nil nil rev1-default) |
1735 (read-string (if rev2-default | 1735 (read-string (if rev2-default |
1736 (concat "Newer version: (default " | 1736 (concat "Newer version (default " |
1737 rev2-default ") ") | 1737 rev2-default "): ") |
1738 "Newer version (default: current source): ") | 1738 "Newer version (default current source): ") |
1739 nil nil rev2-default)))) | 1739 nil nil rev2-default)))) |
1740 (if (file-directory-p file) | 1740 (if (file-directory-p file) |
1741 ;; recursive directory diff | 1741 ;; recursive directory diff |
1742 (progn | 1742 (progn |
1743 (vc-setup-buffer "*vc-diff*") | 1743 (vc-setup-buffer "*vc-diff*") |
1996 "File must be checked out for merging. Check out now? ") | 1996 "File must be checked out for merging. Check out now? ") |
1997 (vc-checkout file t) | 1997 (vc-checkout file t) |
1998 (error "Merge aborted")))) | 1998 (error "Merge aborted")))) |
1999 (setq first-version | 1999 (setq first-version |
2000 (read-string (concat "Branch or version to merge from " | 2000 (read-string (concat "Branch or version to merge from " |
2001 "(default: news on current branch): "))) | 2001 "(default news on current branch): "))) |
2002 (if (string= first-version "") | 2002 (if (string= first-version "") |
2003 (if (not (vc-find-backend-function backend 'merge-news)) | 2003 (if (not (vc-find-backend-function backend 'merge-news)) |
2004 (error "Sorry, merging news is not implemented for %s" backend) | 2004 (error "Sorry, merging news is not implemented for %s" backend) |
2005 (setq status (vc-call merge-news file))) | 2005 (setq status (vc-call merge-news file))) |
2006 (if (not (vc-find-backend-function backend 'merge)) | 2006 (if (not (vc-find-backend-function backend 'merge)) |
2331 (let ((update (yes-or-no-p "Update any affected buffers? ")) | 2331 (let ((update (yes-or-no-p "Update any affected buffers? ")) |
2332 (msg (if (or (not name) (string= name "")) | 2332 (msg (if (or (not name) (string= name "")) |
2333 (format "Updating %s... " (abbreviate-file-name dir)) | 2333 (format "Updating %s... " (abbreviate-file-name dir)) |
2334 (format "Retrieving snapshot into %s... " | 2334 (format "Retrieving snapshot into %s... " |
2335 (abbreviate-file-name dir))))) | 2335 (abbreviate-file-name dir))))) |
2336 (message msg) | 2336 (message "%s" msg) |
2337 (vc-call-backend (vc-responsible-backend dir) | 2337 (vc-call-backend (vc-responsible-backend dir) |
2338 'retrieve-snapshot dir name update) | 2338 'retrieve-snapshot dir name update) |
2339 (message (concat msg "done")))) | 2339 (message "%s" (concat msg "done")))) |
2340 | 2340 |
2341 (defun vc-default-retrieve-snapshot (backend dir name update) | 2341 (defun vc-default-retrieve-snapshot (backend dir name update) |
2342 (if (string= name "") | 2342 (if (string= name "") |
2343 (progn | 2343 (progn |
2344 (vc-file-tree-walk | 2344 (vc-file-tree-walk |
2725 (file-name-nondirectory file))) | 2725 (file-name-nondirectory file))) |
2726 (unless (vc-find-backend-function backend 'delete-file) | 2726 (unless (vc-find-backend-function backend 'delete-file) |
2727 (error "Deleting files under %s is not supported in VC" backend)) | 2727 (error "Deleting files under %s is not supported in VC" backend)) |
2728 (if (and buf (buffer-modified-p buf)) | 2728 (if (and buf (buffer-modified-p buf)) |
2729 (error "Please save files before deleting them")) | 2729 (error "Please save files before deleting them")) |
2730 (unless (y-or-n-p (format "Really want to delete %s ? " | 2730 (unless (y-or-n-p (format "Really want to delete %s? " |
2731 (file-name-nondirectory file))) | 2731 (file-name-nondirectory file))) |
2732 (error "Abort!")) | 2732 (error "Abort!")) |
2733 (unless (or (file-directory-p file) (null make-backup-files)) | 2733 (unless (or (file-directory-p file) (null make-backup-files)) |
2734 (with-current-buffer (or buf (find-file-noselect file)) | 2734 (with-current-buffer (or buf (find-file-noselect file)) |
2735 (let ((backup-inhibited nil)) | 2735 (let ((backup-inhibited nil)) |
3078 (temp-buffer-show-function 'vc-annotate-display-select) | 3078 (temp-buffer-show-function 'vc-annotate-display-select) |
3079 (rev (or revision (vc-workfile-version buffer-file-name))) | 3079 (rev (or revision (vc-workfile-version buffer-file-name))) |
3080 (bfn buffer-file-name) | 3080 (bfn buffer-file-name) |
3081 (vc-annotate-version | 3081 (vc-annotate-version |
3082 (if prefix (read-string | 3082 (if prefix (read-string |
3083 (format "Annotate from version: (default %s) " rev) | 3083 (format "Annotate from version (default %s): " rev) |
3084 nil nil rev) | 3084 nil nil rev) |
3085 rev))) | 3085 rev))) |
3086 (if display-mode | 3086 (if display-mode |
3087 (setq vc-annotate-display-mode display-mode) | 3087 (setq vc-annotate-display-mode display-mode) |
3088 (if prefix | 3088 (if prefix |
3089 (setq vc-annotate-display-mode | 3089 (setq vc-annotate-display-mode |
3090 (float (string-to-number | 3090 (float (string-to-number |
3091 (read-string "Annotate span days: (default 20) " | 3091 (read-string "Annotate span days (default 20): " |
3092 nil nil "20")))))) | 3092 nil nil "20")))))) |
3093 (setq temp-buffer-name (format "*Annotate %s (rev %s)*" | 3093 (setq temp-buffer-name (format "*Annotate %s (rev %s)*" |
3094 (buffer-name) vc-annotate-version)) | 3094 (buffer-name) vc-annotate-version)) |
3095 (setq vc-annotate-backend (vc-backend buffer-file-name)) | 3095 (setq vc-annotate-backend (vc-backend buffer-file-name)) |
3096 (message "Annotating...") | 3096 (message "Annotating...") |