monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Re: listing unknown directories


From: Derek Scherger
Subject: Re: [Monotone-devel] Re: listing unknown directories
Date: Thu, 30 Nov 2006 21:00:41 -0700
User-agent: Thunderbird 1.5.0.8 (X11/20061111)

Nathaniel Smith wrote:
I see your point, but I am _really_ dubious about the idea that
'diff', 'status', and 'commit' should by default be restricted to the
current directory.  Like, just speaking as a user, I suspect that
would personally frustrate me :-).  Note also the desiderata that
these commands should have identical processing of restrictions etc.,
so that you can diff and status and then commit.

Also, to just remind everyone who hasn't been lurking for the last n
years, the other traditional argument for mtn commands being
unrestricted by default is that in this model both common use cases
are very natural:
   current dir: mtn commit .
  unrestricted: mtn commit
but in the other model, one is not natural at all:
   current dir: mtn commit
  unrestricted: mtn commit ../../.. # or was that ../../../..? ../..?

When I originally wrote the restrictions code (unrecognizable from what's there today) it was relative to the current directory. The status, diff, commit and other commands operated as in option two above. The above argument was the winner at the time though and we changed it to work the way it does today.

3 or 4 years later, I'm still not convinced that what we have now is right though. I suspect that in this regard monotone is not only different from all unix commands but quite likely from all (or most) version control systems as well. At least sccs, rcs, subversion, cvs and perforce work this way iirc. I'm not sure about darcs, git, hg, etc. but I'm curious so if anyone knows off hand I'd be interested to know.

Another thought, to help clear up the ../../../.. (how many of these do I need again) case. Would it be useful to have some sort of 'mtn root' command that spits out the location of the workspace root perhaps in either --relative or --absolute path terms? Then something like cd $(mtn root) would be at least possible, if not still somewhat ugly.

Or, another option (pardon the pun) would be to have an --unrestricted or --all option to be used in place of some random number of ../../..'s i.e. 'mtn status' et. al. would be restricted to the current directory of the workspace while 'mtn status --unrestricted' would be unrestricted.

Cheers,
Derek




reply via email to

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