[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: copying versioned files between dirs within a repository

From: bruce <bedouglas_at_earthlink.net>
Date: 2004-08-27 16:57:09 CEST

geoff...

thanks for the reply... the following explanation should give an idea of
what i'm shooting for...

the overall goal of the app is to create a mini-parsing app. the app will
consist of a number of different scripts, each one used to parse a given web
site. i need an underlying repository/structure/process that will allow
developers/testers to be able to work/test a given parse script, and then
move the parse script to another area/dir once the script gets to a working
state. this is critical, as i want to be able to quickly/automatically be
able to extract all working scripts from the repository as of date x.

these scripts then get fed into a distributed engine that does the actual
crawling of the web...

what i have started to create is a repository structure that has a separate
directory for each website. a major issue that i need is the ability to
restrict access/usage to the developer/tester(s) who are working on the
given dir. svnserve/svn doesn't easily allow this on a dir/file level in a
dynamic environment.

my solution is to dynamically 'copy' the dir information to another separate
repository that consists of only the script(s) for the given website. this
gives me the ability to control access for these 'child' repositories rather
easily for the users (svnserve.conf), limiting access to the overall system.
once the developer/user creates the parsing script, the repository
information is then copied/merged back into the main repository, and the
'child' repository deleted. this process basically gives me file/dir level
access for the users.

the end result, is that the main repository will have scripts in various
directories in various states of completion. once a file/script is
copied/merged from the child repository to the main repository, it's
complete, and i'd like to be able to copy the file into a 'tag' dir that
will contain all the files that are valid.

eg:
    may 1
          /u1
            /trunk
               foo1.pl:2 <<< valid
          /u2
            /trunk
               foo2.pl:2
          /u3
            /trunk
               foo3.pl:2

    may 2
          /u1
            /trunk
               foo1.pl:3
          /u2
            /trunk
               foo2.pl:3
          /u3
            /trunk
               foo3.pl:3 <<< valid

    may 3
          /u1
            /trunk
               foo1.pl:4
          /u2
            /trunk
               foo2.pl:4 <<< valid
          /u3
            /trunk
               foo3.pl:4

given that the state of the files change over time, i'd like to have a way
to actually bundle up the 'valid' files and move them to a 'valid' tag/dir
as required... so on one day, i might have 10 files that are 'valid', the
next day i might have 20 files, etc...

so my question/issue. if i have a list of valid files:revisions, how can i
easily move them to a 'tag'/dir...

hope this clarifies what i'm doing...

thanks for any assistance/pointers/comments/etc...

-bruce

-----Original Message-----
From: Geoff Krapf [mailto:geoffk@softartisans.com]
Sent: Friday, August 27, 2004 6:10 AM
To: bedouglas@earthlink.net; users@subversion.tigris.org
Subject: RE: copying versioned files between dirs within a repository

Bruce,

I'm unclear on what you're really trying to accomplish.

In general, you want to tag your entire source tree. Tagging is simply
making a copy of the tree and agreeing by convention that the copy will
not be edited. You want to tag the entire tree so that you can build it
again with the exact same code as you had before. Your developers (in
general) will be working on the trunk, and when you tag you tag the
entire trunk (or a subtree).

If you want to mix revisions of files inside a tag (I don't really know
why you'd want to do that) you can copy specific revisions into the tag
with "svn cp -rXX ...".

Your SVN revisions won't have a whole lot to do with the version of the
file; the revision is just a unique integer that captures the state of
the entire repository at a specific point in time. When you say that
you want to find the "number of different versions of a given file",
it's not clear what you want; "svn log <file>" will give you all of the
revisions in which the file was modified. If you want to see what tags
that file was in, there isn't really a good way to do that with SVN; the
best is probably to look at the latest tag, do a log on that file, and
see where else you branched it. (Thus leading to the rule "always use
good comments" :) )

To copy a file from one place in the repository to another, just use svn
copy. If you want to copy a specific revision, use the "-r" switch.
"svn help copy" will list all the switches available to you.

- Geoff

-----Original Message-----
From: bruce [mailto:bedouglas@earthlink.net]
Sent: Friday, August 27, 2004 12:18 AM
To: users@subversion.tigris.org
Subject: copying versioned files between dirs within a repository

hi...

after reading the docs/reviewing google... i'm still confused as to how
to 'grab' a number of files within my repository/dirs and to place them
into a 'tag' dir....

i also don't know how to find the number of different versions of a
given file, or how to display the different versions, short of doing a
'svn log --versions svn://foo....'

but for the sake of argument, what's the best method for getting
different files/different versions from different dirs within a trunk,
and putting them in a 'tag'?

also, can/how can you do a copy of a file from one dir to another, based
upon the version of the file??

these seem to be pretty basic issues, so i must be missing something
subtle!

thanks for any help/assistance/pointers/examples...

-bruce

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Received on Fri Aug 27 16:53:54 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.