Stephen Leake, 2007-04-29:

> xmtn-revision-get-file-revision calls write-file, which runs this hook
> with buffer-modified-p set to t, which means I am prompted to update
> the copyright on files I have not changed, when fetching them for
> diffing.

This is a bug.  Thanks for pointing it out.  I fixed it (and related 
problems in DVC) in my branch by using `with-temp-file' or 
`write-region' instead (which you also mentioned in your other message).


> The purpose of xmtn-revision-get-file-revision seems to be (it doesn't
> have a doc string)

The theory behind not having a docstring for this function is that it 
only implements an interface specified in DVC-API; the only thing the 
docstring might say is "xmtn's implementation of 
`revision-get-file-revision'", but this is implicitly understood anyway, 
since every function whose name has the prefix "xmtn-dvc-" is an 
implementation of the respective DVC API function.  So there's nothing 
to document.  Only deviations from or extensions of the generic contract 
should be documented.

In practice, however, the specification of this interface is missing in 
DVC-API, and the function name prefix is just "xmtn-" instead of 
"xmtn-dvc-", since DVC looks for the function under this wrong name due 
to an apparent typo in the DVC core.  These are bugs.


> to get the contents of a particular file revision
> into a buffer, and also into a file. Sometimes that file is a temp
> file (as in the diff case), sometimes a user-requested file (when
> retrieving an old revision for other reasons).

It always puts the file contents into a buffer, never into a file.

Christian.

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

Reply via email to