bugmonotone - Bugs: bug #12070, directory semantics currently...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #12070: directory semantics currently problematic

Submitted by:  Nathaniel Smith <njs>
Submitted on:  Mon 21 Feb 2005 08:35:37 AM UTC  
 
Category: NoneSeverity: 6 - Security
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed
mtn version --full: 

Mon 16 Jan 2006 01:40:33 AM UTC, comment #2:

Rosters fix this.

Nathaniel Smith <njs>
Project Member
Sat 05 Mar 2005 11:11:51 AM UTC, comment #1:

graydon points out the following case:
delete_file foo/bar
concatenated with
add_file foo/baz
the question is, are these the same "foo" directory, or two different "foo" directories. (this is important for merging with delete_dir, rename_dir.) in the solution I prefer above, this question cannot be answered without recourse to manifests. this makes me seriously question whether I actually prefer that solution...

(of course, perhaps there are other ways to handle this case? none that preserve our current mode of handling, where changesets are always concatenated one to another, but perhaps something where when we want changeset(rev1, rev2) we build a path_analysis for rev1, repeatedly concatenate on changesets until reaching rev2, and then extract that path_analysis as a changeset? this is a radically different model, though, and I do not know if it makes any sense.)

Nathaniel Smith <njs>
Project Member
Mon 21 Feb 2005 08:35:37 AM UTC, original submission:

Currently, it is not legal to concatenate the changesets 'delete_file "foo/bar"' and 'add_file "foo"', because the former implies the existence of a directory "foo", which conflicts with the existence of a file "foo".

Thus, the implicit semantics of monotone are currently: a directory D exists in revision A if some file in A has the form D/something, or if in some arbitrarily deep ancestor of A, there was such a file, and no "delete_dir D" appears on the changeset path between that ancestor and A.

This is pretty broken -- in particular, it makes the validity of history a decidedly non-local problem. (It's already a little bit non-local, because of the requirement that two arbitrarily long paths between the same two revisions must create the same changeset when concatenated along, but this is much worse.) We can never tell whether adding a file is valid without scanning the entire history.

I see two options (perhaps there are more):
-- decide that monotone supports empty directories. Add directories to manifests.
-- decide that monotone really means that emptying a directory implicitly deletes it, and somehow make concatenate("delete_file foo/bar", "add_file foo") work (without allowing any other badness that really is bad at the same time).

I kind of prefer the latter, as being the semantics I'm used to, and simpler to transition to; but I am cautious about how we can make that case legal without making truly broken cases legal as well.

Nathaniel Smith <njs>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 16 Jan 2006 01:40:33 AM UTCnjsStatusNone=>Fixed
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1