monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] revert --missing misbehaves in 0.26


From: Derek Scherger
Subject: Re: [Monotone-devel] revert --missing misbehaves in 0.26
Date: Sun, 04 Jun 2006 18:18:22 -0600
User-agent: Mozilla Thunderbird 1.0.8 (X11/20060430)

Jack Lloyd wrote:
Montone's revert --missing seems to base paths off the current
directory, rather than the base directory of the workspace. I think
most people seeing this would realize the problem and self-correct,
but it is strange (drop --missing seems to do the right thing and work
no matter what the cwd is). I suppose in some extremely contorted case
this could cause Monotone to revert the wrong file, as well. Based on
the documentation this behaviour seems unintentional, and performing
revert --missing from a subdirectory of a workspace should revert all
missing files in or below that subdir.

Three things come to mind:

1. I think that 'revert --missing' currently has different behaviour than 'drop --missing' and 'add --unknown' and I'm curious as to what people's expectations are. What 'revert --missing' does when it has a restriction (i.e. 'revert --missing path ...') is essentially to run 'ls missing path ...' and then revert the missing paths that match the restriction. The restriction applies to missing things. Conversely, 'add --unknown path ...' and 'drop --missing ...' add or drop *all* missing paths in *addition* to those that match the restriction. So in revert's case, the --missing set is intersected with the restricted set. While in the add/drop cases the --missing set is unioned with the restricted set. I haven't checked but it would probably be good if someone can confirm this actually is the current behaviour. The question I have is, is this behaviour "correct" or perhaps intuitive?

2. All of the ls commands that list paths do so relative to the workspace root rather than the current directory. I'm not sure what the general expectation is here but it seems somewhat odd to me. If my workspace dir is W, and I'm in W/a/b/c and say 'ls foo' I see paths like a/b/c/1 a/b/c/2 etc. The wikie page http://venge.net/monotone/wiki/RelativePathnames makes me wonder if the ls commands really should list paths relative to the currrent directory.

3. The reason that revert --missing was screwing up in the case above was pretty much that it too was expecting paths to be relative to the current directory, rather than the workspace root. It's literally using the paths from ls missing.

Lots of fun UI issues still to work out! Any opinions on any of the above?

Cheers,
Derek




reply via email to

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