Stephen Leake <[EMAIL PROTECTED]> writes:

>> [ Appart from that, versionning nested trees as part of the containing
>> tree is wrong in 99% of the cases. The subproject should be managed as
>> a separate project, and if you want traceability of the project as a
>> whole, most VCS have features to manage subtrees correctly (forest
>> extension for Mercurial, submodules for git, I think bzr has something
>> for this too, ...).
>
> That is a religious argument; we can't win it. We just have to live
> with it.

I was curious and digged a bit further on that point.

Out of the version controls I know :

* CVS/SVN wouldn't even think about managing a subtree as part of the
  containing tree. Each directory has its CVS/.svn directory, which
  tells it which repository it belongs to. So, a given directory only
  belongs to one repository.

* bzr can't deal with the setup you're describing :

/tmp$ mkdir bzr
/tmp$ cd bzr
/tmp/bzr$ bzr init
/tmp/bzr$ touch file
/tmp/bzr$ bzr add
added file
/tmp/bzr$ bzr commit -m superproject
added file
Committed revision 1.
/tmp/bzr$ mkdir subtree
/tmp/bzr$ cd subtree
/tmp/bzr/subtree$ bzr init
/tmp/bzr/subtree$ touch nested-file
/tmp/bzr/subtree$ bzr add nested-file
added nested-file
/tmp/bzr/subtree$ bzr commit -m nested-tree
added nested-file
Committed revision 1.
/tmp/bzr/subtree$ cd ../
/tmp/bzr$ bzr st
unknown:
  subtree
/tmp/bzr$ bzr add subtree/nested-file      # <-- here
/tmp/bzr$ bzr st
unknown:
  subtree

  See: bzr refused to add a file which belongs to the subtree. The
  subtree is a separate repository, you can't mix them.

* hg and git seem to be the only ones to accept to add a file
  belonging to a subtree. _But_, that will be quite painfull to use,
  the tools are really not designed to be used that way. For example,
  "hg status" doesn't list unknown files within nested trees, and the
  result of many commands are quite weird. For example, one can

  $ git diff ../path/to/file

  from a subdirectory, but not from a subtree.

So, regardless of what DVC does, managing nested trees the way you
suggest would really be painfull. It's not just a religious issue,
pretty much everybody in the world seem to agree that nested-trees
should be managed by reference, not by content, even if the points of
view about _how_ to manage by-reference subtrees diverge.

By-content subtrees double your disk space usage, double the amount of
commands to run, and more than double the pain when it comes to
merging.

-- 
Matthieu

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to