The patch below allows 'shortcuts' with dvc-status :
(dvc-status nil "/Gnu/dvc")
I use these in text files to easily run dvc on various trees; evaluate
with C-x C-e. bzr-status already takes a path argument. I did not
examine the other backends.
--
-- Stephe
=== modified file 'lisp/xmtn-dvc.el'
--- lisp/xmtn-dvc.el 2007-03-26 19:31:09 +0000
+++ lisp/xmtn-dvc.el 2007-04-08 15:10:40 +0000
@@ -623,11 +623,15 @@
(defun xmtn--missing-files-future (root)
(xmtn--command-output-lines-future root '("ls" "missing")))
-;; FIXME: I don't know what AGAINST is for.
+;; FIXME: use AGAINST
;;;###autoload
-(defun xmtn-dvc-status (&optional against)
+(defun xmtn-dvc-status (&optional against path)
+ "run monotone inventory on optional PATH (default current tree), display
results.
+
+AGAINST must be a revision specifier (number, last:N,
+revid:foobar, ...) or nil, but is currently not used."
;; FIXME: Use mtn automate inventory?
- (let ((root (dvc-tree-root)))
+ (let ((root (or path (dvc-tree-root))))
(let ((missing-future (xmtn--missing-files-future root)))
(lexical-let ((buffer (dvc-get-buffer-create 'xmtn 'status root))
(root root))
=== modified file 'lisp/dvc-unified.el'
--- lisp/dvc-unified.el 2007-04-08 15:10:40 +0000
+++ lisp/dvc-unified.el 2007-04-09 01:57:13 +0000
@@ -104,9 +104,13 @@
(interactive (list buffer-file-name)))
;;;###autoload
-(dvc-create-unified-command "status" (&optional against)
- "Display the status in this tree for the actual dvc."
- (interactive))
+(defun dvc-status (&optional against path)
+ "Display the status in optional PATH tree."
+ (interactive)
+ (if path
+ (let ((default-directory path))
+ (dvc-apply "dvc-status" against path))
+ (dvc-apply "dvc-status" against nil)))
(dvc-create-unified-command "name-construct" (back-end-revision)
"Returns a string representation of BACK-END-REVISION.")
_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev