Hook to make Subversion Read Only for specific use

rajeshkumar created the topic: Hook to make Subversion Read Only for specific use
Hook to make Subversion Read Only for specific users

We have an existing Subversion repository that uses LDAP to manage users/passwords. There are some new users who we would like to provide read-only access to SVN. I did some Google searches and found a way to open up read-only access to anonymous users, but this is not what we want. We do not want to open up SVN to everyone. We still want to control login through LDAP, but we would like to prevent certain named users from being able to add/edit/delete.

I am assuming this can be done with a hook (pre-commit?), but I have no experience writing hooks. Can someone show me or point me to an example of how to do this?
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re:Hook to make Subversion Read Only for specific use
I use an LDAP setup with config similar to:

in /etc/apache2/sites-enabled/mysite


DAV svn
SVNParentPath /var/svn
SVNListParentPath on
AuthBasicProvider ldap
AuthType Basic
AuthzLDAPAuthoritative Off
AuthzSVNAccessFile “/var/svn/conf/svnaccess.conf”
AuthName “My SVN”
AuthLDAPBindDN “…..”
AuthLDAPBindPassword “…..”
AuthLDAPURL “…..”
Require valid-user

/var/svn/conf/svnaccess.conf
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re:Hook to make Subversion Read Only for specific use
I use an LDAP setup with config similar to:

in /etc/apache2/sites-enabled/mysite


DAV svn
SVNParentPath /var/svn
SVNListParentPath on
AuthBasicProvider ldap
AuthType Basic
AuthzLDAPAuthoritative Off
AuthzSVNAccessFile “/var/svn/conf/svnaccess.conf”
AuthName “My SVN”
AuthLDAPBindDN “…..”
AuthLDAPBindPassword “…..”
AuthLDAPURL “…..”
Require valid-user

/var/svn/conf/svnaccess.conf

[groups]
readonly = user1, user2

[/]
*=rw
@readonly=r
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Automatic backup all SVN repositories

rajeshkumar created the topic: Automatic backup all SVN repositories
Here’s a shell script I use to automatically backup all of my subversion (svn) repositories.
I use Dropbox to put my backups in – it gives you easy to manage backups in the cloud for free (Free account gives you up to 2GB of storage) and pushing all backups to any machines on which you have the Dropbox setup. It’s very simple to get it working as a linux daemon with CLI only too.

#!/bin/bash
for repos in `ls /var/opt/svn/` ; do
RESPOS_DIR=/var/opt/svn/$repos;
svnadmin dump -q $RESPOS_DIR | gzip > ~backup/Dropbox/backups/svn/$repos.dump.gz;
chgrp backup $RESPOS_DIR;
done
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Copy only certain SVN revisions from one repositor

rajeshkumar created the topic: Copy only certain SVN revisions from one repositor
To extract a set of revisions (nn to mm) from a repository:
svnadmin dump –incremental -r nn:mm /path/to/repository > /path/to/dumpfile.svn
The –incremental option allows you to merge this set of changes without bringing the entire baseline along with the import.

To apply those revisions to a repository:
svnadmin load –ignore-uuid /path/to/repository < /path/to/dumpfile.svn The --ignore-uuid option allows the import to strip out uuid information from the source repository. I would restrict this operation to repositories with a common revision heritage otherwise the load would probably fail. Regards, Rajesh Kumar Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Integrate Bugzilla with SVN

amitanand123 created the topic: Integrate Bugzilla with SVN
I need to integrate Bugzilla with SVN and for this i found a tool called SCMBUG.
I am facing problem while committing any code
Problem is
Command: Commit
Modified: D:\Tools\LogTablePurger\branches\abc\cm.txt
Sending content: D:\Tools\LogTablePurger\branches\abc\cm.txt
Completed: At revision: 1477
Error: post-commit hook failed (exit code 9) with output:
Error: Can’t call method “error” on an undefined value at /var/svn/repositories/LG/hooks/lib/scmbug/Scmbug/Common.pm line 221.

I have checked Common.pm and comment the code
# $logger->error( $error_string );
(which is not a right approach as we need to catch the error log message)

OR

Anyone suggest me any other tool to integrate Bugzilla with SVN

Thanks in advance

Tagged :

SVN query for auto merging!!!

vijayakumar.cm created the topic: SVN query for auto merging!!!
I need a solution for this auto merging strategy in SVN.

My directory structure:
Two branches:
/main_branch/sourcecodefiles
/build_branch à copy of a main branch

è Development happens only in main branch
è no one will commit in build_branch

My Requirement is: Whenever commit happens in main_branch , it should automatically merge the changes in to build branch (i.e it has to merge the changes and commit a new version of it)

There is no need for reverse merging since no changes will get committed in build branch, also it reduces the risk of merge conflicts.

Please let me know if anyone already has solution for this.

Regards,
Vijay

rajeshkumar replied the topic: Re:SVN query for auto merging!!!
SVN is not much smart enough in case of conflict.

if conflict arises you will have to do manually.

Refer more for
svnbook.red-bean.com/en/1.0/re16.html
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

mnanjala replied the topic: Re: SVN query for auto merging!!!
svnmerge.py will do it but you should write a shell script it will call that svnmerge.py tool once check in happened u can call this script by continuous integration server like Hudson

rajeshkumar replied the topic: Re: SVN query for auto merging!!!
Hi Praveen,

Can you please share the soruce link of svnmerge.py and implementation details.

Thanks in Advance?
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

mnanjala replied the topic: Re: SVN query for auto merging!!!
www.orcaware.com/svn/wiki/Svnmerge.py

Tagged :

Need to mirror SVN Repository from remote server to a WindowsDevServer

Sne created the topic: Need to mirror SVN Repository from remote server to a WindowsDevServer
I am trying to create a backup of SVN Repository which is remotely located.

AM trying to have the backup on Windows Dev Server. (Am not used to Windows 🙁

I have created a new repository on Windows Server.
Updated the required hooks
and using svnsync for the backup operation.

It worked fine till
committed revision 1.
copied properties for revision 1

…..

committed revision 1.
copied properties for revision 1

…..

Transmitting file data…….
……

And its stuck.
The Repo size is approx 1.2GB

I need to even automate this on Windows server.

Can anybody share inputs who is an expert on Windows or have done this before.

Thanks

Tagged :

ClearCase to SVN migration

vijayakumar.cm created the topic: ClearCase to SVN migration
Hi,

I have done the successful migration form CVS to SVN,now i need to migrate few projects from Clearcase to SVN. Could anyone please give some ideas on this?

Thanks,
Vijay

rajeshkumar replied the topic: Re:ClearCase to SVN migration
There were a couple of relevant talks at SubConf:

MM4: Lutz Dornbusch, Polarion: Zero Downtime Migration to Subversion
www.subconf.de/fileadmin/PDF_Dateien/Sub…onf_2008/Vortraege/L
utz_Dornbusch-Zero_Downtime_Migration.pdf

MM5: Robert Cowham and Neal Firth, Vizim: Migrating ClearCase to Subversion
www.subconf.de/fileadmin/PDF_Dateien/Sub…onf_2008/Vortraege/R
obert_Cowham_and_Neal_Firth__Madrid_.pdf

www.unix-girl.com/cc2svn/

Both were well received from what I saw, but I think our approach covers
more options – but then I would say that 🙂
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Button replied the topic: Re: ClearCase to SVN migration
Hi Vjay,

Been looking to do something similar myself (migrate from clearcase to subversion that is), and I’ve evaluated a number of tools out there, but all of them appear to have their gaps. The best one I’ve seen so far is www.clearvision-cm.com/clearcase-subversion-migration.html but before purchasing it, I thought I’d check to see which one you used (seeing as this is a fairly old topic now) incase there are any I havn’t seen yet. That one seems pretty complete from what I can tell, but what with it being all our company data I want to make sure I haven’t missed anything

Tagged :

Branch Managment in Subversion

mnanjala created the topic: Branch Managment in Subversion
How do you manage Subversion Branching and the per user role management?

rajeshkumar replied the topic: Re:Branch Managment in Subversion
Hi,

Can you redefine the questions. I may be able to help you out on this?

Regards,
Rajesh
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

mnanjala replied the topic: Re:Branch Managment in Subversion
Sure, what is the best way of branching in Subversion,

-Pravin

rajeshkumar replied the topic: Re:Branch Managment in Subversion
Hi praveen,
you can find SVN (Subversion) Branching Strategy information in url below…

community.scmgalaxy.com/pg/blog/rajeshku…n-branching-strategy
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

mnanjala replied the topic: Re:Branch Managment in Subversion
Thats Awsome and thanks Rajesh

-Pravin

Button replied the topic: Re:Branch Managment in Subversion
The problem with any branching approach, is how do you track what exactly has been merged into trunk, and what activity branches are contained in which tag etc. Check out agilescm, product from clearvision-cm, its pretty amazing and makes all of these tasks seemless, and its free for 10 or below users, see the link below

www.clearvision-cm.com/agilescm/overview

rajeshkumar replied the topic: Re:Branch Managment in Subversion
right now i am on Git. Will try soon 🙂
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

SCMBUG Integration

venkata created the topic: SCMBUG Integration
Hi All,

I’m in phase of implementing SVN1.7.7 and Bugzilaa 3.6.2 versions using SCMBUG. I’ve done all the configuration changes in Daemon.conf and glue.conf according to our project requirement.

When i try to commit any file against the bug num assigned to me,getting following error.

Error: Scmbug ERROR> Connection.pm:371:Scmbug::Connection::submit_request –

Error: ** Scmbug error 24: The daemon-spawned connection handler exited abnormally. Please check the daemon error logs.

Below are the errors in log files which i got.

2012/04/16 14:49:55 Scmbug WARN> Daemon.pm:582:Scmbug::Daemon::Daemon::spawn_child – 127.0.0.1:56483 Connection from SVN.BASE processed
2012/04/16 14:49:56 Scmbug WARN> Daemon.pm:568:Scmbug::Daemon::Daemon::spawn_child – 127.0.0.1:56484 Processing connection from SVN.BASE
2012/04/16 14:49:56 Scmbug WARN> Process.pm:866:Scmbug::Daemon::Process::process_activity_commit – 127.0.0.1:56484 Processing an ‘activity_commit’ for bug id ‘25007’ from SCM user ‘pramod.ashrith’
2012/04/16 14:49:56 Scmbug ERROR> Error.pm:103:Bugzilla::Error::_throw_error – You are not authorized to access bug #25007. To see this bug, you must
first log in to an account with the appropriate permissions.

I’ve access to the following bug in Bugzilla. Do we need to change anything in any Perl Module files..

Regards,
Pramod

rajeshkumar replied the topic: Re: SCMBUG Integration
I guess there are some issues with Permission. Have you re-verified all of your access such as Bugzilaa + SVN + USER?
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

venkata replied the topic: Re: SCMBUG Integration
Hi Rajesh,

Here are my below cridentials of SVN and Bugzilla.

SVN : pramod.ashrith
Bugzilla: pramod.ashrith@wipro.com

when i try to commit anything against the bug it says you don’t have the permission,i’m not understanding what permission is required, since the bug is assigned against me..please can you help me regarding this..if you share ur contact num i’l try to explain it in detail..you can text me or call me on this num ..

9591300221.

Regards,
Pramod

rajeshkumar replied the topic: Re: SCMBUG Integration
Hi Pramod,

I do not encourage sharing id/password info on public portal. Please try to find answer for following..
1. Do You have access on source code?
2. The web server can Bugzilla/Template.pm?
3. See whats the access level has been used to setup Bugzill/SBN integration.

if you can post error message, that might more helpful for you.

Also, you may want to to free support www.bugzilla.org/support/
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

venkata replied the topic: Re: SCMBUG Integration
Rajesh,

1. I’ve access at source code level.
2. The web server can Bugzilla/Template.pm? I din’t get this point what exactly you mean..
3.we are using email id and username.
exle SVN Usernme: pramod.ashrith
Bugzilla username: pramod.ashrith@abc.com

Scenario 1: When the bug is not assigned against my name when i try to commit i’m getting the proper message saying the bug id is not assigned to you, and it is assigned to some x person.Exle shown below.

Error: ** Scmbug error 7: Bug ‘20902’ does not belong to the product ‘BCG’. It belongs
Error: to product ‘xyz’.
Error: Bug ‘20902’ is not assigned to ‘pramod.ashrith’. It is assigned to ‘sangamesh.halidoddi@xyz.com’.

Scenario 2: when i try to commit any bug which is assigned to me in bugzilla,i’m getting the error in Daemon error logs.

Error: ** Scmbug error 7: Bug ‘25007’ is not assigned to ‘pramod.ashrith’. It is
Error: assigned to ‘pramod.ashrith@abc.com’.

Rajesh,if you observe in scenario 2 Error mesg..pramod.ashrith is SVN username and pramod.ashrith@abc.com is bugzilla username..

Pre-commit is blocking for the commit to happen.

If i use same username in SVN and Bugzilla i.e pramod.ashrith@abc.com
I’m getting below error..

Here Post-commit is blocking and the messages are not getting updated in bugzilla.

Error: ** Scmbug error 24: The daemon-spawned connection handler exited abnormally. Please check the daemon error logs.
Daemon Error log says..

2012/04/27 10:53:19 Scmbug WARN> Daemon.pm:582:Scmbug::Daemon::Daemon::spawn_child – 127.0.0.1:54909 Connection from SVN.BASE processed
2012/04/27 10:53:19 Scmbug WARN> Daemon.pm:568:Scmbug::Daemon::Daemon::spawn_child – 127.0.0.1:54910 Processing connection from SVN.BASE
2012/04/27 10:53:19 Scmbug WARN> Process.pm:866:Scmbug::Daemon::Process::process_activity_commit – 127.0.0.1:54910 Processing an ‘activity_commit’ for bug id ‘25007’ from SCM user ‘pramod.ashrith@abc.com’
2012/04/27 10:53:20 Scmbug ERROR> Error.pm:103:Bugzilla::Error::_throw_error – You are not authorized to access bug #25007. To see this bug, you must
first log in to an account with the appropriate permissions.

If i check Error.pm in the line num 103 it says $DAEMON_ERROR_DAEMON_MODE_MISSING
i’m not getting what exactly it means..

I’ve used DAEMON_MODE has ‘auto’ in daemon.conf file which chooses b/w threaded and forked mode depending on the OS.

Rajesh,i’m stuck in the middle of integration..
1. whether we need to change anything for regulgar expression matching for SVN/Bugzilla in Daemon.conf and glue.conf?
please help me to solve this issue..I hope you have got my issues clearly..If you need any more clarrification from my end..please revert back.

I would like to hear from you soon.

Regards,
Ashrith

venkata replied the topic: Re: SCMBUG Integration
Rajesh,

Any update about the below topic.Please do let me know if you get any idea.

Regards,
Pramod

rajeshkumar replied the topic: Re: SCMBUG Integration
Hi,

I posted same questions in mailing list and found that following answer. Hope this is helpful for you.

> I am just trying to help my friends but finding difficulty. Group members
> would like to take this issues up?

The SCMBug mailing list may be of help, as your problems are really
SCMBug specific. The last post on the list was almost one year ago,
the latest release of SCMBug in February last year and has known
compatibility issues with current versions of Bugzilla. It seems to me
that the author of SCMBug is really busy with his other projects now
and there’s a new extension for Bugzilla available which integrates it
with Subversion. You or your friends therefore may consider not using
SCMBug at all, unless you really need the features it provides.

scmbug-users@net.mkgnu.net
code.google.com/p/bugzilla-vcs/

> If i use same username in SVN and Bugzilla i.e pramod.ashrith@abc.com
> I’m getting below error..

SCMBug provides mechanisms in the configuration file to map SVN- with
Bugzilla-usernames, but in my opinion it is easier to use the same
für both systems.

> 2012/04/27 10:53:20 Scmbug ERROR>
> Error.pm:103:Bugzilla::Error::_throw_error – You are not authorized to
> access bug #25007. To see this bug, you must
> first log in to an account with the appropriate permissions.

I may be wrong but from my understanding SCMBug never needed to
authenticate to Bugzilla because even while it used some of
Bugzilla’s classes, it always was low level underneath authentication
and some things were directly added using the database. The error
message looks to me as if the account used to commit is even not able
to add a comment to the bug using the webinterface and therefore
SCMBug can’t do it, too.

I would check if the account is really able to see and change the bug
using the normal web interface after login to Bugzilla. I would doubt
it can, so change this and SCMBug should work, too.

> If i check Error.pm in the line num 103 it says
> $DAEMON_ERROR_DAEMON_MODE_MISSING
> i’m not getting what exactly it means..

I don’t think 103 is really the line were the error occurs, maybe it’s
some bug in using Log4perl or else.

Mit freundlichen Grüßen,

Thorsten Schöning

For more support, i suggest you to report here…

support-bugzilla@lists.mozilla.org
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :