开发者

Can vc-dir be set to show up-to-date files?

is it possible to get the up-to-date files back in a *vc-dir* buffer? up to now I've been using psvn.el (and before that cvs-examine), both have a command that allow me to see the full content/status of the tree.

if there is something like this in *vc-dir*, I don't manage to find it.

if there isn't, how do you guys and girls use it?


so it looks like the functionality is not there yet, and now I think that this question was correctly moved from programmers to stackoverflow: it's not about the tool itself, but how to expand it.

I had a look at the sources a开发者_如何学JAVAnd I think that I need a function to recurse a subdir only including those files that are known to be under version control. if this function existed and was called vc-dir-find-versioned-child-files, then the solution would be close to this:

     (define-key map [follow-link] 'mouse-face)
     (define-key map "x" 'vc-dir-hide-up-to-date)
+    (define-key map "X" 'vc-dir-show-child-files)
     (define-key map "S" 'vc-dir-search) ;; FIXME: Maybe use A like dired?
     (define-key map "Q" 'vc-dir-query-replace-regexp)

and

 (ewoc-set-hf vc-ewoc (vc-dir-headers backend def-dir) ""))))

+(defun vc-dir-show-child-files ()
+  "expand the directory under the cursor"
+  (interactive)
+  (let ((files (vc-dir-find-versioned-child-files (vc-dir-current-file)))
+        fileentries)
+    (when files
+      (dolist (crt files)
+        (push (list (file-relative-name crt) (vc-state crt))
+              fileentries))
+      (vc-dir-update fileentries (current-buffer)))))

 (defun vc-dir-show-fileentry (file)

close, but not exactly, as the status is not correctly computed, it now gives a nil.

what I still miss in vc-dir is information like who did the last commit and the number of the revision for each entry (preferably local and remote). but I'm not good enough to interact with LISP.


if vc-dir does not do what I need, what about ecb?


It appears that vc-dir is hard coded to hide up-to-date files. There is a function vc-dir-hide-up-to-date that does the opposite of what you want, and since vc-dir uses ewoc, it shouldn't be too hard to mirror it. I can take a stab at it later if no one has any better ideas.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜