monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] CLI / path restrictions.


From: Nathaniel Smith
Subject: Re: [Monotone-devel] CLI / path restrictions.
Date: Fri, 6 May 2005 11:32:24 -0700
User-agent: Mutt/1.5.9i

On Fri, May 06, 2005 at 07:37:36PM +0200, Bruno Hertz wrote:
> while the user interface might currently not be top priority, are
> there still any plans to allow for non-recursive path restrictions,
> e.g. for list various ?

Hardest part is coming up with a sensible way for the user to express
this desire -- any suggestions?

> Also, remotely related and fyi, while diff takes a base name as an
> argument, log requires a path relative to MT, which some people might
> consider an inconsistency.

Yeah, that's a stupid bug in log.  It never got updated to use Derek's
no-longer-so-new "restrictions" stuff.  It'd be really nice if it
could interpret the pathname correctly (using the same code that, umm,
all the other commands that take pathnames use), and if it could take
multiple filenames/directories, like all the other commands that
restrict to part of the tree...

Though I guess the semantics of listing a directory are not totally
clear; if I say 'log foo/', and there's a file foo/bar that used to be
in some other dir, should the log include edits to foo/bar before it
was in this dir?  if there used to be a file called foo/bar but is no
longer, should the log include edits to foo/bar when it was in this
dir?

I guess my feeling is that log should do something like:
  for each rev in history:
    update list of explicitly mentioned files and directories
      according to any renames that happened on the edge just
      traversed
    if this revision has any changes that touch any file that matches
      anything in the updated list, output this revision

The idea being that anything the user explicitly mentioned on the
command line, we track its logical lifetime, over renames and all
that.  And for those which are directories, we reinterpret this
restriction again for each historical revision.  So the answers to the
questions above are that we don't include edits to baz/bar even though
it will later become foo/bar; and we do include edits to foo/bar even
though it will later become baz/bar.

> Generally, I'm wondering whether it's possible to get rid off the
> requirement the user entering MT relative paths at all, e.g. by taking
> pwd into account.

Yeah, that we haven't already is just a bug.  Do you know of any
commands besides log that do this?

-- Nathaniel

-- 
Sentience can be such a burden.




reply via email to

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