6

Which one do you recommend for a commercial project with developers that need to have access to a particular part of repository only?

Development IDE is Eclipse

and Programming language is C/C++

Key features of the requirement is: Authoritative and ACL hierarchical access to repository

Matthew Flaschen
  • 278,309
  • 50
  • 514
  • 539
kay
  • 117
  • 1
  • 6

4 Answers4

2

Git, combined with a "central" server managed with Gitolite, can provide all the fine-grained control you need (per user/per group, with access to all or only some part of the repo, even to only some branches).

That being said, if your developers are more familiar with a CVCS like SVN, it might be wiser to use that knowledge at least to start the project (and uses Authentication method in your apache server configuration): a CVCS can be quite different from a DVCS.
(plus you still can later convert a SVN repo into a Git one)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • However I chose Git, with Git it is easier to achieve any model, its distributed Version Control System allows achieving Hierarchical Access Control much easier, It is clear we have to let developers to work on their particular projects so why don't they have a copy of the repository branch or module they are working on, anyway they have to know what they are working on to develop it, thus they need that part, what I found very interesting regarding Git is we can achieve this hierarchy structure by establishing different Git repositories then merge their result into an upstream one, – kay Jan 08 '11 at 18:43
  • I accept with SVN it is also possible to achieve such tasks with much more pain of course, I personally have been using SVN, but I found Git easier and faster with unlimited options and Eclipse support as EGit and JGit are acceptable enough to get along with Git, without necessity of teaching developers how to work with underlying Git, other concepts are the same as SVN actually by the way it is version control – kay Jan 08 '11 at 18:44
2

Git is much more modular and flexible than SVN. If some developers only need access to a part of the repository, you can make it a submodule (i.e. a independent repository which is aggregated by your main repository). It is much easier to grant access to a different repository than to a single directory inside a filesystem.

It is a common practice for APIs or plugins to be separated from the main repository. For more information, have a look there.

Last point, software like Gitolite (the one I use for my own projects) and Gitosis (the one we use at work) make the administration of git repositories very easy.

Opera
  • 983
  • 1
  • 6
  • 17
  • I also Agree with you, what I found easier is it is possible to have multiple Git Repositories and simply push them to main Git Repository, It is easier to achieve Hierarchical Access Control and also Have Quality Control This Way, somehow like FreeBSD project but they use CVS – kay Jan 08 '11 at 18:46
2

Using Apache or svnserve as server, fine grained Per-directory access control is available. Path-Based Authorization grants users or groups defined access to your repository. The same applies to websvn, if a web interface should be available as well.

zellus
  • 9,617
  • 5
  • 39
  • 56
  • It is possible to achieve the same thing with SVN, but as a long time SVN user, I found Git much easier to achieve this, since I can establish hierarchical Repositories as well, I see it is possible on SVN but with much more pain – kay Jan 08 '11 at 18:52
  • @kay: What is *"much more pain"*? Setting up *gitolite* or *authz* won't be a big difference. Regarding **merging strategies** DVCS like *GIT* have advantages, but not concerning access management. – zellus Jan 08 '11 at 19:31
  • yes the problem is you do not get the point, it is sep, not just access contraration, with Git it is possible to have repositories of repositories, and committing (pushing) repositories upward (this is not available in SVN. – kay Jan 08 '11 at 22:47
  • @kay: Can you provide some example, tutorial on the web demonstrating your repositories of repositories approach. – zellus Jan 09 '11 at 01:03
  • with Git, create an original repository with everything, then create a branch that lower hierarchy should work on, then push that branch to another repository give access to the Users when they commit, a quality control personnel can merge their branch to original repo, the nice part is it preserves the original developers, but in SVN the last commit done by a the last user overrides all, just check the sub-team model it is actually hierarchical model, (this is not available in SVN) http://nvie.com/posts/a-successful-git-branching-model/ – kay Jan 09 '11 at 21:19
1

You should use SVN. Reasons:
- For a commercial project, more developers familiar with SVN. And SVN have powerful GUI tools. I guess you don't want to hear complains about "git is hard to use". (I like both git and svn)
- Git maintain too much version info locally, that's not what you want for a commercial project generally.

Huang F. Lei
  • 1,835
  • 15
  • 23
  • 2
    Why exactly shouldn't a commercial project store version info locally? It allows developers to work efficiently locally, then push to the central company server at the appropriate time. If your developers don't follow company policy, then they can use `svnsync` then do whatever nefarious deeds you're afraid of. – Matthew Flaschen Jan 08 '11 at 09:21
  • 1
    Don't ask me the question. Not matter what I replay, the truth is that some people think so in the world. – Huang F. Lei Jan 08 '11 at 09:51
  • There is absolutely no reason to hide branch or trees, the concept behind hierarchical Access to the sources is much easier to achieve with Git and multiple repositories, in a way that do not include those parts that the Developer should not be aware or working on, in example a GUI developer should not deal with Digital Signal Processor and thus DSP code is not available to him, simply taking it off from his Git repository or replacing object files rather than sources, – kay Jan 08 '11 at 18:49