Sending attachments in email using mailer.py script

2010-10-06 Thread Tech Geek
Let's say I have an exisiting repository at /var/lib/svn/projectA with
(tags, branches, trunk structure) on my Linux system.

I am using the mailer.py script and mailer.conf file [1] in my post-commit
hook for sending out emails whenever a new release tag (like
projectA/tags/REL-1.0) is created and that is working fine.

My quesiton:
Is there a way I can send a file whose location is
at projectA/tags/REL-1.0/source.zip as an attachment in the emails that get
sent (using mailer.py) whenever a new tag is created?

Thanks

[1]
https://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/mailer/


Re: Sending attachments in email using mailer.py script

2010-10-06 Thread Tech Geek
I guess my biggest hurdle at this time is how to extract the file from the
repository that I would like to send it as an attachment.

Most of the examples on the net simply specifies an explicit filename (to
show as an example) like this:
*
#!/usr/bin/python
import smtplib
..
filename = "/tmp/test.txt"
.
# Define the attachment section
part3 = """Content-Type: multipart/mixed; name=\"%s\"
Content-Transfer-Encoding:base64
Content-Disposition: attachment; filename=%s
...
%s
--%s--
""" %(filename, filename, encodedcontent, marker)
message = part1 + part2 + part3
try:
   smtpObj = smtplib.SMTP('localhost')
   smtpObj.sendmail(sender, reciever, message)
   print "Successfully sent email"
except Exception:
   print "Error: unable to send email"

*
So basically I would want the path
/var/lib/svn/projectA/tags/REL-1.0/source.zip in the filename variable.


Re: Sending attachments in email using mailer.py script

2010-10-06 Thread Tech Geek
>
> You can checkout the file to /tmp and include it from there. You
> cannot reference a file in your repository with a file path.


I had thought about that but it would mean that I will need to include a svn
checkout command to /tmp/ directory in my post-commit hook, right?

If that is the case indeed then I am not sure how to get the checkout path
of the latest tag commited in my post-commit hook.

As an example:
So the $REPOS in post-commit has path to the project -  for example:
/var/lib/svn/projectA. How do I get the path of the tag (so that I can
concatenate with $REPOS) that is just being commited - for examle:
tags/REL-1.00.


Re: Sending attachments in email using mailer.py script

2010-10-06 Thread Tech Geek
OK I have managed to get the name of the file (after checking out to the
/tmp directory) to be attached in the commit email in a variable called
$ATTACHFILE in my post-commit hook.

But here is another issue that I am now running into:
How do I pass the value of the variable $ATTACHFILE  to the mailer.py python
script without wrecking the order of the parameters it expects?

Thanks


Re: Importing Existing Repository into a New Repository

2010-10-06 Thread Tech Geek
>
> svnadmin dump -rHEAD /path/to/oldrepo > dump
> svnadmin load /path/to/newrepo < dump
>
Thanks Ryan! That worked!


Why doesn't 'svnadmin create' creates tags, branches, trunk?

2010-10-06 Thread Tech Geek
So I am relatively new to subversion as compared to most of the folks on
this mailing list. After seeing lot of examples over the web and reading
official subversion book it seems that almost every body creates their
repository in some or the other way with tags, branches and trunk structure
even though for Subvrsion itself these concepts do not exits.

So why don't we have (read as a feature) something like this:

# svnadmin create --tbt new_repo

and a repositroy with following strcuture is created (automatically)

# ls /var/lib/svn/new_repo
branches
tags
trunk

Basically the optional arugment "--tbt" in the above command creates the
sub-directories tags, branches, trunk automatically for you.

It would be a nice (raed useful) feature to have.

What do you guys think?

Thanks!


Re: Why doesn't 'svnadmin create' creates tags, branches, trunk?

2010-10-07 Thread Tech Geek
I  just noticed that the CollabNet's Subversion Edge has this feature when
you create the repository from the web browser interface.

I guess at least I am not the only one (perhaps) who thought about this.


Better way to get the full rule of the last commit?

2010-10-10 Thread Tech Geek
All my repositories live under /var/lib/svn/.

Let's the output of the following command (on the SVN server):
# svn changed /var/lib/svn/projectA/
is
A   PartA/tags/DEV-1.00_RC5/

Now in my post-commit hook I need the following value in a variable (say
EMAIL_URL):
EMAIL_URL=/var/lib/svn/projectA/PartA/tags/DEV-1.00_RC5

Right now the way I am getting this value in my post-commit hook is as
follow:

DIRCHANGE=`$SVNLOOK changed "$REPOS" | $GREP "^A\W.*" | cut -d' ' -f4`
SRC_CO_PATH="$REPOS/$DIRCHANGE"

Is there any command which will return the full path of the directory inside
that repository under which the changes were made by the last commit?


Re: Better way to get the full rule of the last commit?

2010-10-10 Thread Tech Geek
>
> I assume you mean to also pass "-t $TXN" to svnlook in there somewhere.
>
Yes. I just copied the command from the shell prompt although I noticed that
svnlook command works just fine without the "-t $TXN" argument inside the
post-commit hook.


> Or are you asking if there's a simpler way?

Yes because I think that the above method is not very flexible and scalable
and also error prone.


Re: Better way to get the full rule of the last commit?

2010-10-10 Thread Tech Geek
Daniel,
>That is not possible for SVN to determine, as it does not know *how* you
are serving the repository (HTTP, HTTPS, svn+ssh, svn, >etc). $REPOS will
give you the physical path to the repository, not necessarily the publicly
accessible path.
That not a problem. I can always prefix the protocol like file:///, http://,
https:// or svn:// to the full URL.

For example if somehow svnlook can somehow return this:
/var/lib/svn/projectA/PartA/tags/DEV-1.00_RC5
say in variable called URL then I do this:

URL="file:///$URL"


Permissions to create branches/tags to certain users only

2010-10-11 Thread Tech Geek
Our repositories lives in /var/lib/svn/ on a Linux server. We use the
following sturcture on per project per repository basis:

/var/lib/svn/projectA/tags/
 /var/lib/svn/projectA/trunk/
 /var/lib/svn/projectA/branches/

 /var/lib/svn/projectB/tags/
 /var/lib/svn/projectB/trunk/
 /var/lib/svn/projectB/branches/

and so on...

We used LDAP authentication method to authorize users.

My question:
We need to give permissions to only certain users to be able to create
branches and tags so that we can restrict all the developers to the trunk
itself.

Thanks.


Re: Permissions to create branches/tags to certain users only

2010-10-12 Thread Tech Geek
David:

The standard Python pre-commit hook that comes with Subversion's
> source tarball will do the job.

Are you referring to the files svnperms.conf.example and svnperms.py found
at [1].


> I have a Perl version that does the same thing.
>
Thanks for sharing your scripts. I will take a detailed look into it.

[1] https://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/


Having a path name after specifying repository location

2010-10-18 Thread Tech Geek
Hi,

My repository path is /var/lib/svn for the SVN server. However I encountered
a unique situation as follow:

The following works:
#svnadmin create  /var/lib/svn/projectA

>From a svn client:
#svn co http://svnserver/svn/projectA projectA


However the following does NOT work:
#mkdir /var/lib/svn/projectB/
#sudo svnadmin create  /var/lib/svn/projectB/partA
 #sudo svnadmin create  /var/lib/svn/projectB/partB

>From a svn client:
#svn co http://svnserver/svn/projectB/partA partB

Is it true that all the directories directly under /var/lib/svn/ should be
an *actual* repository? Can't we have some pathname like "ProjectB" under
/var/lib/svn/ and then have repositories (like PartA and PartB) under it
without changing the root path of the repository which is /var/lib/svn?

How do you overcome this situation? I want PartA and PartB to be separate
SVN repository but I do not want to place them under /var/lib/svn/ directory
because they beloing to ProjectB and in future other projects like ProjectD
could have PartA and PartB in the same manner.

Thanks.


Re: Having a path name after specifying repository location

2010-10-18 Thread Tech Geek
oops...I had a typo:


> However the following does NOT work:
> #mkdir /var/lib/svn/projectB/
> #sudo svnadmin create  /var/lib/svn/projectB/partA
>  #sudo svnadmin create  /var/lib/svn/projectB/partB
>
> From a svn client:
> #svn co http://svnserver/svn/projectB/partA partB
>

 However the following does NOT work:
#mkdir /var/lib/svn/projectB/
#sudo svnadmin create  /var/lib/svn/projectB/partA
 #sudo svnadmin create  /var/lib/svn/projectB/partB

>From a svn client:
#svn co http://svnserver/svn/projectB/partA partA

I get the error message: SVN: Could not open the requested filesystem.


Re: Having a path name after specifying repository location

2010-10-20 Thread Tech Geek
Sorry for bumping this one...We really need to find a solution/workaround
for this in order for our SVN implementation to be final.

Thanks in advance!

On Mon, Oct 18, 2010 at 6:00 PM, Tech Geek  wrote:

> oops...I had a typo:
>
>
>> However the following does NOT work:
>> #mkdir /var/lib/svn/projectB/
>> #sudo svnadmin create  /var/lib/svn/projectB/partA
>>  #sudo svnadmin create  /var/lib/svn/projectB/partB
>>
>> From a svn client:
>> #svn co http://svnserver/svn/projectB/partA partB
>>
>
>  However the following does NOT work:
> #mkdir /var/lib/svn/projectB/
> #sudo svnadmin create  /var/lib/svn/projectB/partA
>  #sudo svnadmin create  /var/lib/svn/projectB/partB
>
> From a svn client:
> #svn co http://svnserver/svn/projectB/partA partA
>
> I get the error message: SVN: Could not open the requested filesystem.
>
>


Re: Having a path name after specifying repository location

2010-10-20 Thread Tech Geek
>The other way you could do this, if you insist upon PartA & PartB  being
separate repositories, is to have a different  >block for each
project, and specify SVNParentPath as /var/lib/svn/ProjectB . Then you could
have PartA & PartB set up as separate >repositories - albeit with a lot more
management overhead as you add projects/repositories, and potentially more
confusion.

You mean something like this?

DAV svn
SVNParentPath /var/lib/svn/projectA
SVNListParentPath On
AuthBasicProvider ldap
AuthType Basic
AuthzLDAPAuthoritative off
AuthName "Subversion Repositories"
..
..
require valid-user



DAV svn
SVNParentPath /var/lib/svn/projectB
SVNListParentPath On
AuthBasicProvider ldap
AuthType Basic
AuthzLDAPAuthoritative off
AuthName "Subversion Repositories"
..
..
require valid-user


and so on

Would be nice if someone already has a script (that excepts the name of the
repository) that does the job of entering the  block in the apache
configuration file.

Also why svn does not support nesting paths (logical empty folder) under
repository location. I am sure many people might have encountered simialar
issues especially if they have existing projects before they started using
subversion.

 Thanks for the help.


Re: Having a path name after specifying repository location

2010-10-20 Thread Tech Geek
 Andy:

>  As I asked earlier, why must PartA & PartB in a given project be
> separate repositories? Why is the more conventional approach not
> workable for you?
>
I understand what you are trying to say and I agree but let's just say that
my hands are tied without going into too much details. This is how the
stakeholders want it. You know how it is in organizations...


How to get svn-bisect?

2011-01-10 Thread Tech Geek
We are using svn, version 1.6.12 (r955767) on a Linux based machine (SVN
Server) and use TortoiseSVN as clients. However, I do not see command
svn-bisect on both of them. How can I get svn-bisect just like there is
git-bisect?


Re: How to get svn-bisect?

2011-01-12 Thread Tech Geek
I would like to point out to guys on this list who may be looking for the
svn-bisect tool (just like I was) that it is being included in the next
release of Debian [1] and in the backported version of Debian [2].

Also see [3] if you are using a Linux distribution that does not include the
svn-bisect by default.

[1] http://packages.debian.org/squeeze/subversion-tools

[2] http://packages.debian.org/lenny-backports/subversion-tools

[3] http://search.cpan.org/~infinoid/App-SVN-Bisect-1.1/bin/svn-bisect


Subversion server and client tools compatibility

2011-04-27 Thread Tech Geek
We have a SVN server running on a Debian Linux box. Running svn
--version returns:
svn, version 1.6.12 (r955767)
   compiled Jul 28 2010, 08:58:12

Users uses TortoiseSVN client to access repositories residing on the
SVN server. My question is it OK to use the latest TSVN client
"TortoiseSVN-1.6.15.21042-win32-svn-1.6.16.msi" or should be stick to
the older version of the TSVN client,
TortoiseSVN-1.6.12.20536-win32-svn-1.6.15.msi,  that we have been
using?

Although both the server and the client tools are 1.6.x based but i am
not sure if the ".x" makes a big difference or not?


Moving an existing Repository to a newly created repository

2011-06-24 Thread Tech Geek
All our SVN repositories are stored at /var/lib/svn.

Let's say we have an existing repository called "ProjectA" i.e.
/var/lib/svn/ProjectA. We created a brand new fresh repository called
"Projects" like this /var/lib/svn/Projects.

Now we would like to rename our existing repository "ProjectA" to
simply "A" and then move it (maintaining all the revisions,
prop-changes, etc.) under /var/lib/svn/Projects repository.

So before:
/var/lib/svn/
/var/lib/svn/ProjectA

After:
/var/lib/svn/
/var/lib/svn/Projects/A

I tried using export/import command and also SVN move command from
TSVN client but I am not able to figure out what's is the correct way
to do this.


Re: Moving an existing Repository to a newly created repository

2011-06-24 Thread Tech Geek
> You should be able to use regular old mv on the command line for this.
So,
svadmin create /var/lib/svn/Projects # Create new repo Projects
mv /var/lib/svn/ProjectA A   # Rename ProjectA to A
and then?
how do I move repository "A" under "Projects" repository?


Re: Moving an existing Repository to a newly created repository

2011-06-25 Thread Tech Geek
We are trying to reorganize some our projects and hence repositories
so that it makes some kind of logical sense (naming wise). Our
existing repository that we want to move i.e. ProjectA has very few
commits (4 to 5) in it and we do not care if the revision numbers
change as long as we have commit log history (even with new revision
number).

In any case, this is what has worked for me:
svadmin create /var/lib/svn/Projects # Create new repo Projects
svn mkdir /var/lib/svn/Projects/A -m "Creating home for Project A"
svnadmin dump /var/lib/svn/ProjectA > ProjectA.dump #Dump ProjectA
that we want to move
svnadmin load --parent-dir A /var/lib/svn/Projects < ProjectA.dump

Thank you all for your help!


Hook to check for a presence of file before committing

2010-08-30 Thread Tech Geek
Hi,

I am just getting started with SVN and I am running the latest version of
subversion on a Windows Server. I am looking for a pre-commit.bat hook that
will check for presence of a particular file (say project.xml) before
commiting to the repository. If the working copy that is about to be
committed does not have that file then the commits are rejected else the
commits are accepted.

I tried looking into svnlook command but not sure how to that command to
look for a particular file.

I am using TortoiseSVN client.

Thanks


Re: Hook to check for a presence of file before committing

2010-08-30 Thread Tech Geek
>Perhaps if you explain why you want to check for the existence of this file
in the working copy we can help you find a different way of >going about it.
OK. Let me try to explain this.
The code that we are trying to commit is generated by an IDE - a software
development tool. The particular file (project.xml) is usually an optional
file that is up to the developers/user to generate. However we would like to
enforce a policy where all the developers before they commit their changes
make sure that the project.xml is also generated and then only a successful
commit occurs.

Does this help?


Re: Hook to check for a presence of file before committing

2010-08-31 Thread Tech Geek
>It is possible to verify that a project.xml is one of the files being
>committed because you can use "svn changed" at the time of the
>transaction to see what files are being added or modified. It would be
>possible to fail the transaction if svnlook changed doesn't have a
>project.xml file in the list.

Yes that's exactly what I was hoping for. Do you happen to know any
template/example in perl/python that would give me some hint on how to
achieve this? I do not have much experience with either of the language but
can easily learn if I look at some examples.

And yes I am looking to implement on server side only.

Thanks!


Re: Hook to check for a presence of file before committing

2010-08-31 Thread Tech Geek
>You want to enforce that the developer cannot commit unless they have this
project.xml in >their working copy, though it will never be sent to the
repository.
That's not true. The project.xml (or whatever file that particular file is)
should also be a part of commit.

I will again repeat my question again since there is so much confusion:

Can we have a pre-commit (preferred) or post-commit server hook that can
check for the presence of a particular file (say project.xml) when the users
send their working copy to the server to commit? If the file is present
accept the commit (along with that file) else reject the commit.

I would prefer not to implement this on client side.

I never thought this would be so complicated.


Re: Hook to check for a presence of file before committing

2010-08-31 Thread Tech Geek
>Is it a requirement that the file be changed each time (and thus part of a
commit), or just that it exists somewhere on the client side >(versioned or
unversioned)?  The server will only know about it when it changes since the
svn client is smart enough to only send >differences.
Great question. Let me walk through a scenario.

Let's say if somehow we do manage to implement this hook before the
development/project begins then after the first revision/commit the
project.xml file will also be committed (because we reject any commit if
that file is not there). Now let's say the development further goes on and
now it is time to commit second time. At this time our hook script again
will check for the presence of project.xml file and will also check if the
project.xml got changed or not. If it got changed that means the developer
did produce a new version of this file and we accept the commit. If the
version of the file did not change then we reject it.


Re: Hook to check for a presence of file before committing

2010-08-31 Thread Tech Geek
 Ryan - Thanks for the sample script. As mentioned before the SVN server
is on a Windows server. I will convert it to a Windows environment and give
it a shot.


Multiple Repositories under one subversion daemon

2010-09-01 Thread Tech Geek
I am running subversion server on a Windows machine. Right now I am in the
process of converting my exisiting projects to start using subversion and my
projects are located at different paths/locations. For example:
C:\data\project1
C:\project\bluecat
C:\software\abc

Now it seems that wehn we start svnserver executable it accepts the root
path of the repositories like this:

svnserve.exe --daemon --root drive:\path\to\repository\root

However in my case all my projects are under different locations and
unfortunately I cannot move them under one location because lot of other
systems are expecting those projects to be at that location. So I would
rather change the new system (svnserver) to adopt to the exisiting layout.

Is there any way to get around this?

Thanks.


Re: Multiple Repositories under one subversion daemon

2010-09-01 Thread Tech Geek
>I may have totally misunderstood you. Are the above paths you show working
copy paths, or are they existing svn repositories?
Those are not existing svn repositories yet. Let's just say that those
project folders should be at those locations only and I want to create SVN
repositories at each of those locations.

I am using a Windows XP Pro machine. Also by symlink do you mean Windows
shortcuts?


Re: Multiple Repositories under one subversion daemon

2010-09-01 Thread Tech Geek
If I understand you correctly this would mean that somebody (user/developer)
has to checkout the code for each of the projects from the repository
location (say C:\svn\data\repositories) to:

C:\data\project1
C:\project\bluecat
C:\software\abc

so that the above locations reflect the latest code?


Two trunks in one repository?

2010-09-09 Thread Tech Geek
So the concepts of trunks, branches, tags are transparent to SVN. We are in
a situation where we might need to have two trunks in one SVN repository.
The reason is that we have a family of projects - say ProjectA, ProjectB,
ProjectC and so on, each one has it's own repository and have just one trunk
(normal setup) since the each of these project has just one part.

But now let's say we have a ProjectD which has two sub-systems - PartA and
PartB whose code is 95% different. So we are thinking to have two trunks
inside the ProjectD repository. We would prefer not to create an individual
repository for PartA and PartB because we have decided to categorize each of
the repository based on the family of Projects - ProjectA, ProjectB,
ProjectC, ProjectD.

Just wanted to know to get some thoughts from the experts on this mailing
list regarding this setup. Any gotachs I need to watch out for?

Thanks!


Re: Two trunks in one repository?

2010-09-09 Thread Tech Geek
I am thinking something like this:

ProjectD
ProjectD/PartA/trunk
ProjectD/PartA/tags
ProjectD/PartA/branches
ProjectD/PartB/trunk
ProjectD/PartB/tags
ProjectD/PartB/branches

Beleive me or not in our scenario the code of Part A and Part B never gets
merged at any point. The only common part is that at the end of each release
of Part A and Part B their output file is concetenated into a one single
file which is then programmed on a hardware part by an external tool.

So for a scenario like that I would like to keep it very simple. Any
feedback or comments regarding the above structure?

Thanks!


Re: Two trunks in one repository?

2010-09-09 Thread Tech Geek
Itamar O, yes you are almost there, I have to say very intelligent guess. I
am indeed talking about FPGA development. The only difference is we have a 2
part FPGA on our embedded board. PartA and PartB are both FPGA codes which
are developed separately for their respective chips and then later they are
concatenated into one single file which is then programmed by the vendor
tool on our boards.

Concatenation is also not a problem since that is done externally. The only
major issue is how do we store (keep in mind SVN principles of trunk,
branches, tags) the concatenated file (yes we need to store binary objects
too) in my proposed repostiroy structure?

I would like this to be as simple as it can be because the developers/users
of this system are not very SVN savvy.

Thanks!

On Thu, Sep 9, 2010 at 1:43 PM, Itamar O  wrote:

>   On Thu, Sep 9, 2010 at 11:23 PM, Tech Geek wrote:
>
>> I am thinking something like this:
>>
>> ProjectD
>> ProjectD/PartA/trunk
>> ProjectD/PartA/tags
>> ProjectD/PartA/branches
>> ProjectD/PartB/trunk
>> ProjectD/PartB/tags
>> ProjectD/PartB/branches
>>
>> Beleive me or not in our scenario the code of Part A and Part B never gets
>> merged at any point. The only common part is that at the end of each release
>> of Part A and Part B their output file is concetenated into a one single
>> file which is then programmed on a hardware part by an external tool.
>>
>> So for a scenario like that I would like to keep it very simple. Any
>> feedback or comments regarding the above structure?
>>
>> Thanks!
>>
>
> That actually sounds extremely similar to the way I set up repositories for
> projects in my organization.
> Different projects are unrelated, so they reside in separate repositories,
> but every project (which is an embedded-device) has software development
> and FPGA development,
> so the layout within the project is exactly what you described:
> proj/Software/[trunk,branches,tags]
> proj/FPGA/[trunk,branches,tags]
>
> If you case is similar, I recommend using the layout you described, and
> considering the following points:
> * Add proj/Tools (or something like that) to manage the scripts that
> concatenate the final image etc.
> * If you also use SVN to store the resulting images (we do, although it is
> usually not recommended to keep binary outputs in source control), consider
> adding proj/Releases for those.
> * If you have code-reuse between projects (we have reusable software
> modules and IP cores) - look into svn:externals and decide how to manage it
> in your set up. I haven't completed handling this in my set up (still in the
> process of migrating from VSS..), but I plan to have a dedicated repository
> for "shared assets" and have specific projects define the assets they use
> based on absolute svn:externals.
>


Re: Two trunks in one repository?

2010-09-09 Thread Tech Geek
Geoff,

I think I am beginning to undestand what you are suggesting.

Right now I am in process of implementing this setup. At this point nothing
exits - no ProjectD, no PartA and no PartB. So I will try to summarize what
I have undestood so far:

1. All our SVN repositories lives under the following location:
\\myserver\SVN_Repositories\ProjectA
 \\myserver\SVN_Repositories\ProjectB
 \\myserver\SVN_Repositories\ProjectC

2. Now each of the Project directories - Project A, Project B and Project C
are SVN repositories of their own (TortoiseSVN->Create Repository here)

3. Now Mr. ProjectD comes along with has two sub-parts - PartA and PartB.
So I create a new repository ProjectD (TortoiseSVN->Create Repository here)
under this (correct?):
 \\myserver\SVN_Repositories\ProjectD
and then create two directories (with their own tags, branches and
trunk) underneath ProjectD (all using SVN commands) like this:
 
\\myserver\SVN_Repositories\ProjectD\PartA\trunk
 
\\myserver\SVN_Repositories\ProjectD\PartA\tags
 
\\myserver\SVN_Repositories\ProjectD\PartA\branches
 
\\myserver\SVN_Repositories\ProjectD\PartB\trunk
 
\\myserver\SVN_Repositories\ProjectD\PartB\tags
 
\\myserver\SVN_Repositories\ProjectD\PartB\branches

Note that Part A and Part B are not their individual repositories. They are
just directories that live under ProjectD which is a repository.

4. Let's say now PartA and PartB code development begings and at some point
a tag is created for each of their release:
 
\\myserver\SVN_Repositories\ProjectD\PartA\tags\REL-1.0
 
\\myserver\SVN_Repositories\ProjectD\PartB\tags\REL-1.0

Now let's say the output of Part A - PartA.xcf and output of Part B -
PartB.xcf are concatenated into a file called PartAB-R1.xcf.

My questions:
Q1. At this point I would somehow like to store this file
(PartAB-R1.xcf) into my SVN repository (ProjectD). What would be an ideal
location (logically) to store such a file. Should I be doing any kind of
merging from tags (REL1.0) of PartA and PartB to create another node called
"Combined-REL-1.0" or something like that. I would like to avoid this if
possible.

Q2. Also when somebody checks out ProjectD I would like that it pulls the
PartA and PartB revision history also so that users cab see the "Revision
Graph" of PartA and PartB together using the TortoiseSVN client.

I hope I am able to describe the whole scenario to you all.


Re: Two trunks in one repository?

2010-09-09 Thread Tech Geek
>In SVN a working copy does not include the revision history, which remains
on the server (as opposed to Git or Hg).
Yes. I am aware of that.

> In order to see a revision graph (TortoiseSVN feature), you need to
communicate with the repository.
Yes. True.

>In fact, you don't even need a working copy in order to enter the
TortoiseSVN "Repo browser" and view the revision graph.
In this case I have to view the "Revision Graph" individually for PartA and
PartB. In fact I just tried creating the setup (not using externals so far)
that I described in my last post and I do not get the "Revision Graph"
option when I right click on "ProjectD" repository under the
TortoiseSVN->Repo-Browser. However I do get the "Revision Graph" option when
I right-click on PartA and PartB individually. I would like to see the
"Revision Graph" of both the PartA and PartB together so that the one can
get an overview of the entire project in just one snapshot. Is this
possible?


Re: Two trunks in one repository?

2010-09-09 Thread Tech Geek
For some reasons this message was returned to me by the mailer daemon. So
resending it again.

>In SVN a working copy does not include the revision history, which remains
on the server (as opposed to Git or Hg).
Yes. I am aware of that.

> In order to see a revision graph (TortoiseSVN feature), you need to
communicate with the repository.
Yes. True.

>In fact, you don't even need a working copy in order to enter the
TortoiseSVN "Repo browser" and view the revision graph.
In this case I have to view the "Revision Graph" individually for PartA and
PartB. In fact I just tried creating the setup (not using externals so far)
that I described in my last post and I do not get the "Revision Graph"
option when I right click on "ProjectD" repository under the
TortoiseSVN->Repo-Browser. However I do get the "Revision Graph" option when
I right-click on PartA and PartB individually. I would like to see the
"Revision Graph" of both the PartA and PartB together so that the one can
get an overview of the entire project in just one snapshot. Is this
possible?


Wrong value in db/format when creating from TortoiseSVN

2010-09-27 Thread Tech Geek
I have the subversion server running on a Debian Linux machine. The
repositories are residing on a Windows domain shared network drive on the
network which is mapped on the Linux machine as:
mount -t cifs //software/svn_repositories /var/lib/svn/ -o
username=mynet/techgeek,password=**,uid=www-data,gid=subversion,iocharset=utf8

All the developers/users access the repositories using TortoiseSVN client
from Windows machine.

The problem is that if the repositories were created from TortoiseSVN then
upon accessing the repositories (For example http://svnserver/svnrepos) I
get:
human-readable errcode="160043": Could not open the requested SVN filesystem

However, if I create new repositories from the Linux machine (on which
subversion is running), then everything works fine.

I noticed when creating repositories from TortoiseSVN the value in db/format
is "4" (non-working) and while creating repositories from Linux the value is
"3" (working). If I change the vaule from "4" to "3" for the repositories
that were created by TortoiseSVN then I do not longer get the above error
message.

Sounds like there is some incompatibility between the subversion engine (on
linux) and the TortoirseSVN.

I would like to enable developers/users to create repositories using
TortoiseSVN client. Do I have to live with this situation or is there a more
elegant workaround rather than changing the value of db/format file manually
everytime a new repository is created?

Thanks


Re: Wrong value in db/format when creating from TortoiseSVN

2010-09-27 Thread Tech Geek
>I don't know what the repository version numbers are that correspond to
each svn/TSVN version (and you didn't mention which >versions you have
installed).
Linux SVN Server version 1.5.1 (r32289)
TSVN - 1.6.10 (32-bit)


Re: Wrong value in db/format when creating from TortoiseSVN

2010-09-28 Thread Tech Geek
 Daniel,

>  Or do (the Tortoise equivalent of) 'svnadmin create --pre-1.6-compatible'
>
Actually I would prefer to do the other way around. Can we tell TSVN to
create repositories which are compatible with Subversion Engine 1.5 because
we would be usually creating repositories using the TSVN.

AFAIU, what you suggested is to be executed on the Linux machine, right?

Thanks!


Re: Wrong value in db/format when creating from TortoiseSVN

2010-09-28 Thread Tech Geek
>
>  Do not put your repository on a shared drive. Do not use file:
>> protocol to access it. It is not designed to work in such way. Read
>> the documentation (aka svnbook) and configure a proper server.
>
>

> This should be emphasized more.  Although the OP said he wanted the users
> to be able to create new repositories, it is really a bad idea to be able to
> do this through mapped file access (aside from that being a bad idea in
> general for multiuser use) because it also means that anyone can delete or
> overwrite your entire history with an inadvertent typo or mouse wiggle.


Once the repository is created the users will be accessing it either through
svn:// or http:// and NOT with file:///  Although I still want the users to
be able to create repository using TSVN because they are not familiar with
Linux at all and also that they won't have to wait for some admin person
(let's say myself) to just create a repository for them.


Re: Wrong value in db/format when creating from TortoiseSVN

2010-09-28 Thread Tech Geek
Les,


>  The point remains that if they have write access through mapped files,
>> they have the capability of destroying everything there.
>>
>> You could probably whip up a cgi script to create new repositories from a
>> web request form if something like that doesn't already exist.  Or you could
>> put more than one project inside a single repository so all you have to do
>> is create a new top level directory with the trunk/branches/tags structure
>> under it. There are some downsides, but it is not an unreasonable approach
>> and it lets users do everything remotely.
>
>
I do undestand your concern but in our case we don't have any option other
than putting repositories on the network drives. Let's just say our hands
are tied.

Having just a top level repository is also not viable in our case. We need
one repository per project.

My only other option now is to try upgrading the SVN server on the Linux
machine...


Re: Wrong value in db/format when creating from TortoiseSVN

2010-09-29 Thread Tech Geek
OK guys so I ended up upgrading the subversion server to 1.6.12 the same as
TortoiseSVN is built against.

Now I am able to checkout the repositories through TSVN but whenever I try
to commit I get the following error message:
$Commit failed (details follow):
$Couldn't perform atomic initialization
$database is locked

This is what I did:

1. I mounted the windows shared network location like this:
mount -t cifs //software/svn_repositories /var/lib/svn/ -o
username=mynet/techgeek,password=**,uid=www-data,gid=subversion,iocharset=utf8

2. Created a repository:
cd /var/lib/svn
svnadmin create projectA
Edited the svnserve.conf and passwd file to enable authentication for
svnserve.

3. svnserve -d -r /var/lib/svn

4. Checked out the repo from TSVN which worked fine

5. On committing from TSVN I get the above error message.

6. I also tried mounting as:
 mount -t cifs //software/svn_repositories /var/lib/svn/ -o
username=mynet/techgeek,password=**,iocharset=utf8,file_mode=0777,dir_mode=0777

but I get the same error message.
However if I create the repository on the local Linux filesystem instead of
shared network drive, then everything works fine from TSVN.

Note: I am using svn:// protocol to checkout and commit.

Any ideas?


Re: Wrong value in db/format when creating from TortoiseSVN

2010-09-29 Thread Tech Geek
I also experimented with http:// protocol and the same error message. I have
spent last 2 days just working on these issues and here is what I would like
to summarize:

1. Repositories created on shared network drive with 1.6.12 subversion
engine (svnadmin) or 1.6.10 TSVN, will not commit through TSVN or even
through a Linux svn client. The error message is:
svn: Commit failed (details follow):
svn: Couldn't perform atomic initialization
2. Repositories created on shared network drive with 1.5 subversion engine
(svnadmin) will work fine including committing.

So the question is why would repositories on shared network drive will work
if they are created with 1.5 subversion engine and will not work if they are
created with 1.6?

Is this a bug?


Re: Wrong value in db/format when creating from TortoiseSVN

2010-09-30 Thread Tech Geek
Neil,


> Not that I can help, but I wanted to clarify:  you have a repo on a
> CIFS-mounted shared drive, and are then using a Linux SVN server?
>
Yes that is correct.

Although I admit that may not always be practical, esp. in an enterprise (we
> plan to move to using NFS-mapped repos. when our Solaris server's main drive
> fills up;  some basic trials worked OK, albeit more slowly).
>
Yes, I have no other option than to put repositories on network drive. From
what I have read in the docs it seems that it is not encouraged to use
file:/// protocol to access network repositories. I think as long as you use
svn:///, http(s):///, etc. protocols to access repos on network share it
should be fine.


> It could be that some new function or sequence of 1.6 repos fails across
> CIFS mounts, maybe something file-locking related.
>
What would be a good place to report this to SVN folks?


Re: Wrong value in db/format when creating from TortoiseSVN

2010-09-30 Thread Tech Geek
>
>  Can you actually use a new repository created by svnadmin 1.5 with your
> 1.6.12 server install? Or is it just previous repositories that are working?
>
>
Yes. With my 1.6.12 server install, if I create a new repository like this:

#svnadmin create --pre-1.6-compatible myproject

then it works fine. But if I create simply like this:

#svnadmin create myproject

then I get those atomic transaction error message.

Any previous repositories that were created with 1.5 (1.5.1 to be
exact) engine works fine with 1.6.12 server install.


>  could you possible try to downgrade? It seems to have to do with using
> NFS shares.
>
My Linux distribution (Debian) right now either offers 1.5.1 or 1.6.12 as
binary packages. Getting a 1.6.11 to install will take some additional work
to install because of integrated dependencies and all.

I can see easily tell whether the repository is 1.5 based or 1.6 based as
follow:
For 1.5 the contents of projectA/db/format:
3
layout sharded 1000

For 1.6 the contents of projectA/db/format will be:
4
layout sharded 1000
I guess until somebody finds a workaround I will have to live with creating
1.5 compatible repositories from my Linux machine only.


dumping non-continuous ranges using svnadmin dump

2010-10-01 Thread Tech Geek
I have a repository called "sandbox" whose HEAD is at revision 20. I would
like to dump revisions 1 to15 and then from 18 to19. Basically I want to
skip revision 16,17 and 20.
The command:

# svnadmin dump -r 1:15 -r 18:19 sandbox > sanbox-dumpfile

gives error message:
svnadmin: Multiple revision arguments encountered; try '-r N:M' instead of
'-r N -r M'
and the command:
#svnadmin dump -r 1:15,18:19 sandbox > sanbox-dumpfile

gives error message:
svnadmin: Syntax error in revision argument '1:15,18:19'
How can I do this?

Thanks.


Copying hooks automatically upon repository creation

2010-10-04 Thread Tech Geek
We use one repository per project. All repository lives in /var/lib/svn/.

Also we use the hooks post-commit and pre-commit for every repository. Right
now we have to manually copy these two hooks whenever a new repository is
created.
For example:
cd /var/lib/svn/
cp /path-to-my-hooks/* projectA/hooks
 cp /path-to-my-hooks/* projectB/hooks
 cp /path-to-my-hooks/* projectC/hooks

Is there any way to automate this process?


Re: Copying hooks automatically upon repository creation

2010-10-04 Thread Tech Geek
Thank you all for sharing the information. Really appreciate it.


Re: Copying hooks automatically upon repository creation

2010-10-04 Thread Tech Geek
Ryan,


> sudo -u "$USER" ln -s ../../conf "$REPO" || exit $?
> sudo -u "$USER" ln -s ../../hooks "$REPO" || exit $?
>
I just realized that the above two commands will fail, if the repositories
are on a SMB/CIFS mounted share on the Linux system, with the following
message:
ln: creating symbolic link conf: Operation not supported

How do we get around in this situation?


Re: Setting "tags" to read only ?

2010-10-04 Thread Tech Geek
>$SVNLOOK changed -t $2 $1 | grep "/tags/" && /bin/echo "Cannot commit to
tags" 1>&2 && exit 1
I had a question regarding the above command. How do we know what value is
going to be passed in $2 i.e. the name of the transaction so that we can
test/debug our script. Can we somehow simulate the above command without
actually trying to run it during svn commit?

Thanks


Re: dumping non-continuous ranges using svnadmin dump

2010-10-05 Thread Tech Geek
>
> svnadmin dump -r 1:15 sandbox > sandbox-dumpfile
> svnadmin dump -r 18:19 sandbox > sandbox-dumpfile2
>
> Then when it comes time to load, load the first file, then the second

Tried but does not work...

# svnadmin load sandbox-restore < sandbox-dumpfile
The above command restored it up to 15 revision as expected:

<<< Started new transaction, based on original revision 15
 * editing path : PartA/trunk/source/README.txt ... done.

--- Committed revision 15 >>>


and then the following command:
# svnadmin load sandbox-restore < sandbox-dump2

gave the error message:


<<< Started new transaction, based on original revision 18
svnadmin: File already exists: filesystem 'sandbox-restore/db', transaction
'18-a', path 'PartA'
 * adding path : PartA ...


The first method also ended up with the same error message.

Any more ideas?

Thanks.


Importing Existing Repository into a New Repository

2010-10-05 Thread Tech Geek
I have an exisiting repository at /var/lib/svn/projectA with (tags,
branches, trunk structure) whose HEAD is at Revision 25

I just created a new/fresh repository at /var/lib/svn/projectB with (tags,
branches, trunk structure) whose HEAD is at Revision 1 (because of importing
the tags, branches and trunk structure). Now I would like to import the
projectA repository into projectB with increasing HEAD of projectB up to
revision 25.

svn import commands is only for unversioned files. svn dump and svn load
will increase the revision number.

How can I do this? Should I just checkout a WC of projectA and then delete
the .svn folder from it and then import it into projectB increasing revision
of projectB to 2 which is fine?

Is there a better way?

Thanks.


Re: Importing Existing Repository into a New Repository

2010-10-05 Thread Tech Geek
>
> and load project a as project b and take all the history with you.
> Just create a new project b without adding trunk etc. in revision 1.
>
I do not want all the revision history of projectA into projectB. I just
need to start projectB with the latest code (trunk HEAD of) projectA.

May be I am missing something very obvious here...