[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#161: can't create new file if have RCS version
From: |
Stefan Monnier |
Subject: |
bug#161: can't create new file if have RCS version |
Date: |
Fri, 23 May 2008 18:12:57 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
> It seems that vc-state can't handle a case where a file doens't exist
> but it is under version-control.
Does the patch below fix your problem?
> The function vc-state mentions new substates including removed;
> using that avoided the problem.
`removed' is used for something slightly different: it's when you've
told the VCS that the file should not be controlled by the VCS
any more. What you describe would be more like `missing', I think, tho
I'm not sure about RCS's semantics.
Stefan
--- vc-rcs.el.~1.77.~ 2008-05-23 13:16:49.000000000 -0400
+++ vc-rcs.el 2008-05-23 18:10:07.000000000 -0400
@@ -155,7 +155,8 @@
;; permissions can tell us whether locking is used for
;; the file or not.
(if (and (eq state 'up-to-date)
- (not (vc-mistrust-permissions file)))
+ (not (vc-mistrust-permissions file))
+ (file-exists-p file))
(cond
((string-match ".rw..-..-." (nth 8 (file-attributes file)))
(vc-file-setprop file 'vc-checkout-model 'implicit)
@@ -170,10 +171,10 @@
(let* ((attributes (file-attributes file 'string))
(owner-name (nth 2 attributes))
(permissions (nth 8 attributes)))
- (cond ((string-match ".r-..-..-." permissions)
+ (cond ((and permissions (string-match ".r-..-..-." permissions))
(vc-file-setprop file 'vc-checkout-model 'locking)
'up-to-date)
- ((string-match ".rw..-..-." permissions)
+ ((and permissions (string-match ".rw..-..-." permissions))
(if (eq (vc-rcs-checkout-model file) 'locking)
(if (file-ownership-preserved-p file)
'edited
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#161: can't create new file if have RCS version,
Stefan Monnier <=