niwadhwa / bugzilla-vcs

Automatically exported from code.google.com/p/bugzilla-vcs
0 stars 0 forks source link

hook.pl assumes multiple projects in one svn repository #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
hook.pl has a parameter, --project, that is mandatory but is not relevant with 
the subversion repositories I'm using.  My subversion repositories have 
directories trunk, branches and tags at the top of the repository.  There is no 
project designation.  It seems like hook.pl assumes a repository like:

project1
    trunk
    branches
    tags
project2
    trunk
    branches
    tags

The reason this is an issue for me is that the hook.pl script is called from a 
subversion hook (post-commit) and the parameters to the hook are repo and 
revision.  To satisfy the requirement of the --project parameter I tried hard 
coding it to trunk.  If I do that, any checkins on the branches get rejected by 
the script with an error:

Bugzilla Error: (32000) There is no commit with the id "13225" for "trunk" in 
the "file:///home/svn/repo/myrepo/" repository.

I could work around this by adding:

svnlook --dirs-changed /home/svn/repo/myrepo in my hook.

This would give me a list of directories and I could determine if they were in 
trunk, branches or tags.  I could then adjust the --project parameter 
accordingly. 

But this doesn't seem right.  A checkin to "branches" really doesn't mean much 
unless you specify the directory in branches, and this won't provide that.  

What I would really like is the --project parameter to be optional.  Possible?

Original issue reported on code.google.com by kro...@gmail.com on 21 Feb 2011 at 3:53

GoogleCodeExporter commented 9 years ago
Using Bugzilla 4.0
1. Using http:// or https:// in vcs_repos does not work.
vcs_repos: Svn http://192.168.2.9/svn/project_name

vcs_web: http://192.168.2.9/svn/project_name 
http://192.168.2.9/viewvc/project_name?view=revision&revision=%revno%

Tried all possible permutations and combinations; file:// and svn:// works.
Linkification to viewvc also doesn't work.

Original comment by indivarn...@gmail.com on 10 Mar 2011 at 10:29

GoogleCodeExporter commented 9 years ago
Hey hey. Yeah, I suppose it does assume a system like that. You could try 
making "/" the project; I don't know if that would work though. This is 
something I can look into and consider in my next release of the VCS extension. 
Thanks for the report, for sure, it's important and good to know that there are 
some repos set up like this.

Original comment by avatrax...@gmail.com on 14 Mar 2011 at 9:57

GoogleCodeExporter commented 9 years ago
Using "/" as the project does not work.  I don't remember the error reported 
but I'm positive it didn't work.

Original comment by kro...@gmail.com on 15 Mar 2011 at 2:03

GoogleCodeExporter commented 9 years ago
I'm making this note to indicate that I still have an interest in resolving 
this issue some day.  I'm still lacking any subversion <-> bugzilla integration.
Is there any chance this will be addressed in the near future?

Original comment by kro...@gmail.com on 16 Oct 2011 at 4:10

GoogleCodeExporter commented 9 years ago
I certainly hope so. I haven't been doing much work on the VCS extension 
lately, though.

Original comment by avatrax...@gmail.com on 20 Oct 2011 at 10:40