Bruce Stephens <[EMAIL PROTECTED]> writes: > Wim Oudshoorn <[EMAIL PROTECTED]> writes: > >> I was trying to extend my emacs mode for monotone >> and for this I wanted to know if a certain file >> is tracked by monotone. >> To my surprise, I couldn't easily figure out an efficient way >> to do this. > > Can't you just use "monotone ls known"? > > "monotone ls known <file>" will either print out just <file>, or print > nothing (if the file exists but isn't tracked), or print an error (I > presume using cerr) and return an error status. So that's not very > clean, but it seems OK to me.
As described somewhere else that is not really ideal, and very slow. > I guess in automate you'd have to use "automate inventory", or > something, which doesn't seem ideal. Would be OK if you did it > occasionally, though, say on startup or when you expected that it > might have changed. No not really. It works for my emacs monotone mode that is similar to pcl-cvs, there I just grab the whole project and show the information. However, now I want to add a vc-mtn backend. And this backend works on a file by file basis. One of the things to implement is a call that given a filename needs to check if it is tracked by the versioning system. Now this call is used everytime the user opens a file in emacs. So it is not acceptable to be slow and you can't at startup just check the whole harddrive for all the monotone project. Also because I do not know at all what files I am talking about I just have to asume I have a random absolute path to begin with. Wim Oudshoorn. _______________________________________________ Monotone-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/monotone-devel
