[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc-git.el,v
From: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc-git.el,v |
Date: |
Mon, 23 Jul 2007 20:51:04 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Dan Nicolaescu <dann> 07/07/23 20:51:04
Index: vc-git.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-git.el,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- vc-git.el 23 Jul 2007 16:05:04 -0000 1.9
+++ vc-git.el 23 Jul 2007 20:51:02 -0000 1.10
@@ -2,7 +2,7 @@
;; Copyright (C) 2006, 2007 Free Software Foundation, Inc.
-;; Author: Alexandre Julliard
+;; Author: Alexandre Julliard <address@hidden>
;; Keywords: tools
;; This file is part of GNU Emacs.
@@ -101,8 +101,8 @@
;; - next-version (file rev) ??
;; - check-headers () ??
;; - clear-headers () ??
-;; - delete-file (file) COMMENTED OUT,
VERIFY IF CORRECT
-;; - rename-file (old new) COMMENTED OUT, VERIFY IF
CORRECT
+;; - delete-file (file) OK
+;; - rename-file (old new) OK
;; - find-file-hook () PROBABLY NOT NEEDED
;; - find-file-not-found-hook () PROBABLY NOT NEEDED
@@ -237,10 +237,14 @@
(defun vc-git-find-version (file rev buffer)
(let ((coding-system-for-read 'binary)
- (coding-system-for-write 'binary))
+ (coding-system-for-write 'binary)
+ (fullname (substring
+ (vc-git--run-command-string
+ file "ls-files" "-z" "--full-name" "--")
+ 0 -1)))
(vc-git-command
buffer 0
- (concat (if rev rev "HEAD") ":" file) "cat-file" "blob")))
+ (concat (if rev rev "HEAD") ":" fullname) "cat-file" "blob")))
(defun vc-git-checkout (file &optional editable rev)
(vc-git-command nil0 file "checkout" (or rev "HEAD")))
@@ -383,16 +387,11 @@
(point)
(progn (forward-line 1) (1- (point))))))))))
-;; XXX verify this is correct
-;; (defun vc-git-delete-file (file)
-;; (condition-case ()
-;; (delete-file file)
-;; (file-error nil))
-;; (vc-git-command nil 0 file "update-index" "--remove"))
-
-;; XXX verify this is correct
-;; (defun vc-git-rename-file (old new)
-;; (vc-git-command nil 0 new old "mv"))
+(defun vc-git-delete-file (file)
+ (vc-git-command nil 0 file "rm" "-f" "--"))
+
+(defun vc-git-rename-file (old new)
+ (vc-git-command nil 0 (list old new) "mv" "-f" "--"))
;; Internal commands
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/22
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/22
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/22
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/22
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Miles Bader, 2007/07/23
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/23
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/23
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/23
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v,
Dan Nicolaescu <=
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/23
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/24
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/24
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/25
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/25
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/26
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/26
- [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v, Dan Nicolaescu, 2007/07/27