aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/vc.el34
2 files changed, 33 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 39a70fc387f..7a47b2f3586 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12010-06-09 Dan Nicolaescu <dann@ics.uci.edu>
2
3 Improve VC create/retrieve tag/branch.
4 * vc.el (vc-create-tag): Do not read the directory name for VCs
5 with repository revision granularity. Adjust the tag/branch
6 prompt. Reset VC properties.
7 (vc-retrieve-tag): Do not read the directory name for VCs
8 with repository revision granularity. Reset VC properties.
9
12010-06-09 Julien Danjou <julien@danjou.info> 102010-06-09 Julien Danjou <julien@danjou.info>
2 11
3 * net/notifications.el: New file. 12 * net/notifications.el: New file.
diff --git a/lisp/vc.el b/lisp/vc.el
index 3d991a21a61..1e52a3ca66f 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -580,9 +580,6 @@
580;; display the branch name in the mode-line. Replace 580;; display the branch name in the mode-line. Replace
581;; vc-cvs-sticky-tag with that. 581;; vc-cvs-sticky-tag with that.
582;; 582;;
583;; - vc-create-tag and vc-retrieve-tag should update the
584;; buffers that might be visiting the affected files.
585;;
586;;;; Internal cleanups: 583;;;; Internal cleanups:
587;; 584;;
588;; - backends that care about vc-stay-local should try to take it into 585;; - backends that care about vc-stay-local should try to take it into
@@ -1896,14 +1893,22 @@ the named configuration. If the prefix argument BRANCHP is
1896given, the tag is made as a new branch and the files are 1893given, the tag is made as a new branch and the files are
1897checked out in that new branch." 1894checked out in that new branch."
1898 (interactive 1895 (interactive
1899 (list (read-file-name "Directory: " default-directory default-directory t) 1896 (let ((granularity
1900 (read-string "New tag name: ") 1897 (vc-call-backend (vc-responsible-backend default-directory)
1901 current-prefix-arg)) 1898 'revision-granularity)))
1899 (list
1900 (if (eq granularity 'repository)
1901 ;; For VC's that do not work at file level, it's pointless
1902 ;; to ask for a directory, branches are created at repository level.
1903 default-directory
1904 (read-file-name "Directory: " default-directory default-directory t))
1905 (read-string (if current-prefix-arg "New branch name: " "New tag name: "))
1906 current-prefix-arg)))
1902 (message "Making %s... " (if branchp "branch" "tag")) 1907 (message "Making %s... " (if branchp "branch" "tag"))
1903 (when (file-directory-p dir) (setq dir (file-name-as-directory dir))) 1908 (when (file-directory-p dir) (setq dir (file-name-as-directory dir)))
1904 (vc-call-backend (vc-responsible-backend dir) 1909 (vc-call-backend (vc-responsible-backend dir)
1905 'create-tag dir name branchp) 1910 'create-tag dir name branchp)
1906 (vc-resynch-buffer dir t t) 1911 (vc-resynch-buffer dir t t t)
1907 (message "Making %s... done" (if branchp "branch" "tag"))) 1912 (message "Making %s... done" (if branchp "branch" "tag")))
1908 1913
1909;;;###autoload 1914;;;###autoload
@@ -1914,8 +1919,16 @@ If locking is used for the files in DIR, then there must not be any
1914locked files at or below DIR (but if NAME is empty, locked files are 1919locked files at or below DIR (but if NAME is empty, locked files are
1915allowed and simply skipped)." 1920allowed and simply skipped)."
1916 (interactive 1921 (interactive
1917 (list (read-file-name "Directory: " default-directory default-directory t) 1922 (let ((granularity
1918 (read-string "Tag name to retrieve (default latest revisions): "))) 1923 (vc-call-backend (vc-responsible-backend default-directory)
1924 'revision-granularity)))
1925 (list
1926 (if (eq granularity 'repository)
1927 ;; For VC's that do not work at file level, it's pointless
1928 ;; to ask for a directory, branches are created at repository level.
1929 default-directory
1930 (read-file-name "Directory: " default-directory default-directory t))
1931 (read-string "Tag name to retrieve (default latest revisions): "))))
1919 (let ((update (yes-or-no-p "Update any affected buffers? ")) 1932 (let ((update (yes-or-no-p "Update any affected buffers? "))
1920 (msg (if (or (not name) (string= name "")) 1933 (msg (if (or (not name) (string= name ""))
1921 (format "Updating %s... " (abbreviate-file-name dir)) 1934 (format "Updating %s... " (abbreviate-file-name dir))
@@ -1924,9 +1937,10 @@ allowed and simply skipped)."
1924 (message "%s" msg) 1937 (message "%s" msg)
1925 (vc-call-backend (vc-responsible-backend dir) 1938 (vc-call-backend (vc-responsible-backend dir)
1926 'retrieve-tag dir name update) 1939 'retrieve-tag dir name update)
1927 (vc-resynch-buffer dir t t) 1940 (vc-resynch-buffer dir t t t)
1928 (message "%s" (concat msg "done")))) 1941 (message "%s" (concat msg "done"))))
1929 1942
1943
1930;; Miscellaneous other entry points 1944;; Miscellaneous other entry points
1931 1945
1932;; FIXME: this should be a defcustom 1946;; FIXME: this should be a defcustom