You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Kramer <da...@thekramers.net> on 2005/01/05 16:35:19 UTC
Can I access files by property?
One of the things CVS can do with its vcs.cfg file is group a list of
files together as an alias, such that those files can be extracted with
get '$(aliasformyfilelist)'
I'm trying to figure out how to do something similar in svn, and the
closest straw I can grasp onto is properties.
What I would like to do is to set a property on some directories in my
repository, and perform actions on directories that have that property, or
have a certain value for that property. The idea is to capture the
metadata from PVCS's vcs.cfg file into Subversion.
THis is the closest I've been able to come up with as a mechanism to list
directories that hold scripts to process specially:
svn propget isscriptdir `find . -type d | grep -v .svn` \
| awk '{print $1}'
This seems a little inefficient at best. There doesn't seem to be a way
to find files by property directly. Am I missing something, or asking too
much?
I tried "svn -R propget isscriptdir *", but that command produces an error
when it see the first unversioned file, producing the error message "svn:
'acrobat5' is not under version control". Since I am compiling programs
in my working copy, this is unavoidable. Is there a reason it can't just
ignore unversioned files and directories and continue on?
P.S. This list has been incredibly helpful. Thanks one and all for your
efforts, both on this list, and on subversion itself.
----------------------------------------------------------------------------
DDDD David Kramer david@thekramers.net http://thekramers.net
DK KD
DKK D "Questions are a burden to others,
DK KD Answers a prison for oneself."
DDDD -The Prisoner
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Help setting up Subversion..
Posted by Ni...@sybari.com.
I haven't used Perforce, but we had a similar situation w/ VSS.
When first migrating to SVN from VSS, we kept both VC systems updated
simultaneously. To do this:
To setup SVN:
1. Checkout the SVN tree to your desired working area (initially empty)
2. Checkout VSS to the same dir.
3. "svn add" and "svn commit" all the files/dirs.
At this point, SVN is synched w/ VSS.
Whenever making changes to a file, simply commit to SVN and check-in to
VSS.
Fortunately, we didn't have to do this for long--svn proved itself almost
immediately.
You can probably use a post-commit hook in SVN to automatically perform
the commit/check-in to the other VC system.
Good luck.
Regards,
Nick G.
Joseph Silverman <yo...@laszlosystems.com>
01/12/2005 11:40 AM
To: subversion <us...@subversion.tigris.org>
cc:
Subject: Help setting up Subversion..
So, here's my situation:
a) I have a large perforce depot PART of which I want to "mirror" in a
subversion repository. I would then like to keep the repository up to
date with the depot.
b) I don't want to "mirror" everything in the depot (perforce), just
parts of it (the "public" parts) - these parts are spread around in it
(differentiated by filename and location in the directory structure),
not in a single directory tree.
c) Ideally, I would like to initially import all the files in a single
"commit" so that the version number in subversion is 1 for these.
I have (perforce) synced down the whole depot into a local copy (we
have this for other purposes) and want to use it as my "working copy"
for subversion.
Initially, when I try to simply add a bunch of files out of this local
copy and then do a single commit I get a lot of errors about not having
a "working copy".
When I try to do a bunch of mkdir's on the depot, and then add's, I get
errors about the directories already existing!
I am stuck in this process.
As for keeping the depot and repository synchronized - the plan was to
analyze the perforce changes to figure out what might have changed and
for all files that are supposed to be in subversion.
This process would be applied to the local copy of the perforce depot
each time a perforce change was submitted (post submit) in perforce:
1) files that were edited in perforce will simply be added to a list to
be committed in subversion
2) if a file was added in perforce, I will simply "add" it in
subversion and add it to the commit list
3) if a file was deleted in perforce, I will "delete" it in subversion
and add it to the commit list
4) if a file was branched and then deleted in perforce, I will "rename"
it in subversion, and add it to the commit list
5) if a file was branched from a file that isn't supposed to be in
subversion, I'll simply "add" it to the commit list
6) if the file was branched from and to a file in subversion and not
deleted, I will "copy" it and add it to the commit list
7) the entire commit list will be committed in a single subversion
commit
Subversion has issues with deleting files that aren't in the "working
copy" (which is how it would be after the perforce submit was done), or
rename files after they have been branch/deleted in perforce, or add
new files in new directories, if they already exist (which they would,
post a perforce submit). There are other "error" conditions too.
Does anyone have any idea on how to, and/or code, to do the above?
THANKS - Yossie
---------------------------------------------------------------------
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
Help setting up Subversion..
Posted by Joseph Silverman <yo...@laszlosystems.com>.
So, here's my situation:
a) I have a large perforce depot PART of which I want to "mirror" in a
subversion repository. I would then like to keep the repository up to
date with the depot.
b) I don't want to "mirror" everything in the depot (perforce), just
parts of it (the "public" parts) - these parts are spread around in it
(differentiated by filename and location in the directory structure),
not in a single directory tree.
c) Ideally, I would like to initially import all the files in a single
"commit" so that the version number in subversion is 1 for these.
I have (perforce) synced down the whole depot into a local copy (we
have this for other purposes) and want to use it as my "working copy"
for subversion.
Initially, when I try to simply add a bunch of files out of this local
copy and then do a single commit I get a lot of errors about not having
a "working copy".
When I try to do a bunch of mkdir's on the depot, and then add's, I get
errors about the directories already existing!
I am stuck in this process.
As for keeping the depot and repository synchronized - the plan was to
analyze the perforce changes to figure out what might have changed and
for all files that are supposed to be in subversion.
This process would be applied to the local copy of the perforce depot
each time a perforce change was submitted (post submit) in perforce:
1) files that were edited in perforce will simply be added to a list to
be committed in subversion
2) if a file was added in perforce, I will simply "add" it in
subversion and add it to the commit list
3) if a file was deleted in perforce, I will "delete" it in subversion
and add it to the commit list
4) if a file was branched and then deleted in perforce, I will "rename"
it in subversion, and add it to the commit list
5) if a file was branched from a file that isn't supposed to be in
subversion, I'll simply "add" it to the commit list
6) if the file was branched from and to a file in subversion and not
deleted, I will "copy" it and add it to the commit list
7) the entire commit list will be committed in a single subversion
commit
Subversion has issues with deleting files that aren't in the "working
copy" (which is how it would be after the perforce submit was done), or
rename files after they have been branch/deleted in perforce, or add
new files in new directories, if they already exist (which they would,
post a perforce submit). There are other "error" conditions too.
Does anyone have any idea on how to, and/or code, to do the above?
THANKS - Yossie
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Can I access files by property?
Posted by David Kramer <da...@thekramers.net>.
On Wed, 5 Jan 2005, Max Bowsher wrote:
> David Kramer wrote:
> > One of the things CVS can do with its vcs.cfg file is group a list of
>
> *PVCS*. CVS's equivalent is called modules, not vcs.cfg.
yeah, sorry for that one. Half the posts on the list contain 'cvs', so I
slipped. We are moving from PVCS to svn.
> Indeed, as you surmise, custom properties aren't really going to help here.
> However, svn:externals might.
> Have a look at the svnbook, and tell us if they can model what you want to
> do.
It looks like I could set up an empty directory called "scripts", then add
external mappings to the other URLs in the same repository that contain
the actual scripts, and getting the scripts directory will get all the
other directories. That's not quite what I was looking for, but it is
promising. If I'm reading it right, though, the working copy files would
not be associated with their ofiginal directories anymore, so I would not
be able to commit changes to those files.
What I am really trying to do is get a subset of files from within a
directory, or across several directories, not get a group of directories together.
Sorry if that was not clear from my earlier post.
It sounds like what I need to do is maintain a metafile in the directory
that contains a list of files of that class. I hate to tack on stuff like
that, but it seems the best available way.
For instance, I have a /foo directory with all sorts of files. I put a
file in there called FILELIST_scripts, which contains a list of files that
are scripts. Then I can:
for file in `cat FILELIST_$FILETYPE` ; do processmyfiles ; done
or even
for file in `svn cat $REPOS/FILELIST_$FILETYPE` ; do processmyfiles ; done
I just wanted to verify that there really isn't a way of doing what I want
with subversion alone before I implement something like this. Thanks for
verifying it.
----
DDDD David Kramer http://thekramers.net
DK KD
DKK D "I know, I know. It's a russian thing. When we're about to
DK KD do something stupid, we like to catalog the full extent of
DDDD our stupidity for future reference" -Ivanova, Babylon 5
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Can I access files by property?
Posted by Max Bowsher <ma...@ukf.net>.
David Kramer wrote:
> One of the things CVS can do with its vcs.cfg file is group a list of
*PVCS*. CVS's equivalent is called modules, not vcs.cfg.
> files together as an alias, such that those files can be extracted with
> get '$(aliasformyfilelist)'
> I'm trying to figure out how to do something similar in svn, and the
> closest straw I can grasp onto is properties.
[snip stuff]
Indeed, as you surmise, custom properties aren't really going to help here.
However, svn:externals might.
Have a look at the svnbook, and tell us if they can model what you want to
do.
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org