How to configure and use the version control module?

stodge - September 5, 2008 - 13:38
Project:Subversion
Version:5.x-2.x-dev
Component:Code
Category:support request
Priority:minor
Assigned:Unassigned
Status:active
Description

Not sure if I should be raising this here or in the Subversion specific project. I'm investigating http://drupal.org/project/project and implicitly the version control API and subversion modules but the documentation for configuring and using the VC module is lacking in useful information. My questions are:

1) Do I have to manually create a repository (assume SVN for now) for each project?
2) How do I create version control accounts for registered users?
3) I've configured everything as best I can, but the "Get commit access" page says "Create user account in:" and shows my repository, but there's nothing else on the page; no buttons or links etc. (bug?)
4) Can I configure version control/project/drupal to link repository commits to a ticket/issue? I.e. is there a svn/cvs hook I can install?

I'm completely confused - I've tried asking questions elsewhere but noone can answer my questions. Thanks!

#1

jpetso - September 5, 2008 - 20:01
Status:active» fixed

Ok, not sure how far I can be helpful, but let's try a brief attempt...

1) No, you could also get by with just one repository for each project (that's how drupal.org also does it). You create your repository, both on disk and as corresponding entry in your Drupal installation. When the versioncontrol_project module is enabled, users with an authorized VCS-account/Drupal-user mapping and "use version control systems" permission (as well as the appropriate project creation/editing permissions) can then create a project and link it to a directory in that repository. In current versions of versioncontrol_project, there is then a "Commit access" tab on the top of the project page, the commits for this project can be accessed at http:///node//commitlog and the hook scripts allow the project maintainer to commit to that location. Of course, the commit restrictions thing will only work if the VCS backend comes with hook scripts at all, which is not currently the case with the SVN backend.

2) Define "version control accounts", there are two possible meanings for that (yeah, I'm responsible for that confusion):
- a) The mapping of Drupal users to real VCS accounts. You can create those with the "Get commit access" link, users need the "use version control systems" permission to do so. (Yeah, misnomer due to original misconceptions about account management.)
- b) The real VCS (e.g. SVN) accounts. For CVS, you can export the above mappings into a passwd file, but the SVN doesn't have such a feature at this time - you need to create real VCS accounts manually. Once they're created, you can create the Drupal/SVN account association on the "Get commit access" page, and commits will be linked to the respective users (in the Commit Log and on the "Track Code" page in the Drupal user account pages).

3) Might be a bug, or some configuration issues (permissions, repository settings for registering accounts, ...). I have no idea.

4) You can refer to issues by specifying numbers prefixed by a hash sign, i.e. #12345. Then you find out the URL of your ticketing system / issue tracker / whatever, and enter it in the repository settings -> Repository browser URLs -> Issue tracker URL, replacing the issue number with a "%d" placeholder. The commit log will then link commit messages with issue numbers like the above-mentioned #12345 to the corresponding issue.

Not sure if I should recommend Version Control API for production usage in its current state, but that's approximately the way it would work.

#2

Anonymous (not verified) - September 19, 2008 - 20:02
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#3

stodge - January 28, 2009 - 18:43

Sorry to dig this up again.

I have an SVN repo at:

http://localhost/repos/support

I've added an SVN repository in Drupal with an svn root of:

http://localhost/repos/support

In this particular repository I have the paths:

http://localhost/repos/support/trunk
http://localhost/repos/support/tags
http://localhost/repos/support/branches

So I configured the subversion integration trunk, tag and branch paths as:

/trunk
/tags
/branches

However, when I save it and review the trunk, tag and branch paths, they have been incorrectly saved as:

/trunk/support
/tags/support
/branches/support

Which obviously points to the wrong location at:

http://localhost/repos/support/trunk/support

Is this intentional/expected?

Thanks

#4

stodge - February 6, 2009 - 17:39
Status:closed» active

Sorry, needed to reopen this to find out if I've found a bug or not.

#5

stodge - February 9, 2009 - 13:31

Ok I think I understand. You're making the assumption that one (SVN) repository will be used for multiple projects. Not quite what I expected but somewhat understandable.

#6

jpetso - February 9, 2009 - 14:04
Category:support request» bug report
Status:active» postponed (maintainer needs more info)

Ah, I see. Sorry, it seems I didn't anticipate that use case.

This will make a "won't fix" status for the 5.x branches, but I might get around to fix at least the incorrect link that you're pointing out - where do you find the wrong links? (Did I actually make any use of them already?)

#7

stodge - February 9, 2009 - 14:14

When I view the project that has Subversion support:

URL is http://localhost/drupal/project/support, which is the project view.

Part of the page contents includes this text:

Releases
View all releases
Add new release
Administer releases
Subversion
Trunk: http://localhost/repos/support/trunk/support
Tags: http://localhost/repos/support/tags/support
Branches: http://localhost/repos/support/branches/support
View SVN messages (RSS)
Developers

Is it a problem in the Version Control API or the Subversion backend? Not sure if I reported it to the correct place.

Edit: Note sure exactly what you mean, but I think the links are correct when one repository is used for multiple projects. It's only when I want to host one project in a repository that a problem arises. So it's more a feature request/enhancement than anything I think.

#8

jpetso - February 9, 2009 - 14:24
Project:Version Control API» Subversion
Version:5.x-1.2» 5.x-2.x-dev
Component:Documentation» Code
Category:bug report» support request
Status:postponed (maintainer needs more info)» active

Er, ouch. If I'm not completely mistaken, you're using the Subversion module, which does not integrate with Version Control API but provides all functionality by itself (including the SVN links). Version Control API's Subversion backend is called versioncontrol_svn, and does not (yet) provide those links.

Therefore, you reported a bug in functionality that is not even implemented by Version Control API or its Subversion backend. Please open an issue in the versioncontrol_svn issue queue if you want the SVN links from the backend as well. Anyways, I'm reassigning this to the Subversion project (which I'm not maintaining, not sure if halkeye still takes bug reports) because this specific issue belongs there.

#9

stodge - February 9, 2009 - 15:59

Oops, I'm sorry - now I'm completely confused. So your module (version control api) is available under the admin page as "VCS accounts" and "VCS repositories"?

#10

jpetso - February 9, 2009 - 16:03

Right, and "Version control settings". (You can also tell by the "versioncontrol" parts in the URL. If it contains "subversion", it's not from Version Control API.)

#11

stodge - February 9, 2009 - 16:05

OOps - guess I was using one module while thinking I was using another! I noticed this module is now superceded; time to download the correct module!

Sorry for the confusion!

 
 

Drupal is a registered trademark of Dries Buytaert.