Hi knubee!

>> > is there currently a dvc function to do a diff
>> > between dvc-supported commands and the commands supported by a specific 
>> > backend?
>> > if not, this might be useful for both dvc development and for dvc users.
>> 
>> No there is no such function and I don't think it would be easy to do.
>> Each backend consists of a list of functions that implement access
>> functions. Some of these functions are useful only for one backend. Some
>> of the functions are also useful for other backends.
>> 
>> One thing that would be possible is a function that lists the defined
>> dvc functions: Just walk all function names and classify the ones
>> starting with {xhg|xgit|bzr|...}-dvc-*
>
> i'm surprised to hear that this would be hard to do. isn't there a specified
> interface between dvc and each backend? in other words, if i have bzr and 
> invoke
> a dvc command, doesn't dvc maintain the information about which is the
> appropriate backend command to invoke for bzr? if so, it seems like it would 
> be
> straightforward to show three categories of commands:
>
> - dvc commands that map to the commands of the specified backend

I experimented a bit, the following could be a starting point for such a
function. It just collects all functions starting with xhg-dvc:

(let ((xhg-commands))
  (mapatoms '(lambda (x) (when (and (functionp x)
                                    (string= (substring (symbol-name x) 0 (min 
(length (symbol-name x)) 7)) "xhg-dvc"))
                           (add-to-list 'xhg-commands x))))
  xhg-commands)

> - dvc commands that do not map to any commands in specified backend
We could define a list of available dvc functions and look into each
backend to see what is missing

> - commands of specified backend that do not map to dvc commands

No idea, how to do that. Each backend uses a namespace starting with a
prefix, e.g. xhg-
Some of these functions are candidates for commands that should be
listed. But there are also functions that are only helper functions.
Just do M-x tla- <TAB> to see what I mean.


Stefan.

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to