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

Re: default version control for all adds/deletes/renames in working copies

From: Ryan Schmidt <subversion-2006q2_at_ryandesign.com>
Date: 2006-05-05 00:19:30 CEST

On May 4, 2006, at 18:07, Gillis, Paul wrote:

>>> Is there a setting or any easy way to do this? I don't want to
>>> write scripts that have to do diffs and then parse the output to do
>>> svn adds, deletes, renames like I saw discussed in an earlier
>>> thread.
>>
>> Such a script has already been written for you, works great, is
>> called svn-load-dirs.pl and is available with the Subversion source
>> distribution.
>
> Thank you for the suggestion. So I downloaded and installed PERL
> on my
> WindowsXP machine to try out this script.
>
> I have a working copy checked out called SVN_6-7 that is at version 6
> and I want to update it to version 7. I have a non version controlled
> directory called V7 that contains the software the way it needs to
> look
> at revision 7.
>
> I want the tool you recommended to do what I was doing with
> WinMerge and
> svn add, rm, & mv... figure out the differences between SVN_6-7
> and V7,
> and do the necessary SVN renames, adds, and deletes to my SVN_6-7
> working copy so it has the same contents as V7. Then I can commit the
> changes as rev 7 into my repository.
>
> I give the script 2 arguments... -wc SVN_6-7 and V7. It tells me
> too few
> arguments. So I assume in the usage statement that [dir_v1
> [dir_v2[..]]] is not optional and I have to tell it what specific
> directories inside the svn_import_dir to examine. I tried passing it
> the relative and explicit path to the parent directory and it tells me
> to use -no_user_input if I'm not specifying directories. So I did, and
> now it tells me too few arguments again!!! I don't think this tool
> does what I was looking for after all. Care to clue me in?
>
> U:\ITP>svn_load_dirs.pl -wc SVN_6-7 V7
> U:\svn_load_dirs.pl: too few arguments
> usage: svn_load_dirs.pl [options] svn_url svn_import_dir [dir_v1
> [dir_v2[..]]]
> svn_url is the file:// or http:// URL of the svn repository
> svn_import_dir is the path relative to svn_url where to load dirs
> dir_v1 .. list dirs to import otherwise read from stdin options
> are
> -no_user_input don't ask yes/no questions and assume yes answer
> -p filename table listing properties to apply to matching files
> -svn_username username to perform commits as
> -svn_password password to supply to svn commit
> -t tag_dir create a tag copy in tag_dir, relative to svn_url
> -v increase program verbosity, multiple -v's allowed
> -wc path use the already checked-out working copy at path
> instead of checkout out a fresh working copy

Please remember to keep replies on the mailing list so others can
benefit from the discussion, by using the Reply To All feature in
your email program.

I've never attempted to have svn_load_dirs update an already-existing
working copy as you're trying; I've just told it that I have, from
your example, a repository which contains version 6 of whatever, and
here's a directory containing version 7 of whatever, and please do
what's necessary to convert the one to the other.

I use the following command:

svn_load_dirs.pl -t <tag-name> <repo-url> <trunk-path> <local-directory>

where:

- <tag-name> is the name of the tag that will be created in the
repository for the version you're importing,
- <repo-url> is the repository URL to the project's base directory,
- <trunk-path> is the path after the <repo-url> to the trunk of the
project, and
- <local-directory> is the local path to the version you're importing.

For example, I keep a copy of phpMyAdmin in my repository. Following
the Vendor Branches section of the Subversion book, I have the
current version (let's call it 2.8.0.2) in my repository at $REPO/
vendor/pma/current and its tag at $REPO/vendor/pma/2.8.0.2. Now
2.8.0.3 is released and I want to import it. I download
phpMyAdmin-2.8.0.3.tar.bz2 from their web site into my tmp directory,
decompress and extract it, and call:

svn_load_dirs.pl -t 2.8.0.3 $REPO/vendor/pma current /tmp/
phpMyAdmin-2.8.0.3

The script checks out a working copy, does all the changes it can,
prompts me to clarify the changes it can't automatically identify,
commits them, makes the tag, and removes the working copy.

I never remember the syntax either; too many arguments. I have it
written down in my internal wiki though so I don't forget.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 5 00:21:03 2006

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.