monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] default path for dvc-missing


From: Stephen Leake
Subject: [Monotone-devel] default path for dvc-missing
Date: Fri, 25 Jul 2008 08:15:35 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt)

dvc-missing is a useful starting point for DVC, when you know there
are changes in the local database that are not present in the
workspace.

This is the case when you've just synchronized your local database
with another developer, and want to review their changes before
updating your workspace.

This is common when using monotone; I'm not sure about the other
backends.

If I'm in a dvc-status buffer, and I want to review another workspace,
I can do M-x dvc-status, and get prompted to navigate to the other
workspace.

But for dvc-missing, I must do C-u M-x dvc-missing to get the prompt,
which is confusing.

So I'd like to change the defaults for dvc-missing to be the same as
for dvc-status. Currently, the 'path' argument for dvc-status defaults
to nil (which results in prompting for it), but for dvc-missing it
defaults to default-directory.

dvc-missing would become:

(defun dvc-missing (&optional other path use-current)
  "Show revisions missing from PATH (default prompt),
relative to OTHER. OTHER defaults to the head revision of the
current branch; for some back-ends, it may also be a remote
repository.

If USE-CURRENT non-nil (default user prefix arg), PATH defaults to current 
tree."
  (interactive `(nil nil ,current-prefix-arg))
  (let ((default-directory
          (dvc-read-project-tree-maybe "DVC missing (directory): "
                                       (when path (expand-file-name path))
                                       use-current)))
  ...)

Then M-x dvc-missing would prompt, and C-u M-x dvc-missing would use
default-directory. Which is the same as M-x dvc-missing RET, so maybe
it's not necessary to support C-u for dvc-missing anymore.

We could change some of the menu entries that call dvc-missing to
specify the path to be default-directory; I'm not sure which ones I'd
change. C-u combined with the menu entry might be sufficient. It might
be best to always have two menu entries; one for 'dvc-missing on
current tree', one for 'dvc-missing on other tree'. But then we should
do the same for dvc-status, and possibly others; it would be better to
use C-u consistently for that.

Objections?

-- 
-- Stephe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]