Andy Stocks wrote:
>
> Hi all,
>
> I have as part of a build process a requirement to check the results
> of a build (jars, wars etc) into a staging repository (i.e. not the
> same repository as the source code) - our deployment tool will then
> pull a particular revision of these files from the staging repository
> to deploy to test and live networks.
> As the result of the build is not under svn control as far as the
> source repository is concerned, I'd ideally like to do an "svn import"
> of the result into a predefined location in the staging repository,
> along with various bits of build related meta-data in the comment.
> This would be performed on a reasonably regular basis, when a
> particular build is deemed suitable for test/release. It's not
> important for the revision number of the staging repository to match
> that of the source repositories.
>
> However, "svn import" baulks if the target file exists in the
> repository being imported to - so this only works the first time. I
> need something that will allow me to "put this arbitrary file at this
> location in the repository, creating a new revision if it already
> exists".
>
Rename, and re-create the staging area.
eg.
svn rename url://stage url://stage-n
svn mkdir url://stage
svn import
just keep incrementing n
> I have seen a couple of posts regarding an extension to "svn import"
> of an "--overwrite" parameter to do precisely this; from what I see
> this hasn't been implemented (e.g.
> http://svn.haxx.se/users/archive-2003-12/0317.shtml ).
>
> The only way I see to do this is have the build system maintain a WC
> of the staging repository, copy the results files to it and perform
> commits - which in this case is a bit messy when it seems a single
> issue of an "svn import" command is 99% there for what I need.
>
> Is the working copy route the only way to go, or have I missed
> something in the docs? Whilst I appreciate it's not a normal way of
> using SVN, I'd appreciate any suggestions.
>
> (svn 1.4.6)
>
> Cheers,
> Andy
>
> The contents of this message and any attachments are confidential and are
> intended for the use of the persons to whom it is addressed.
> If you are not the intended recipient, you should not copy, forward,
> use or
> alter the message in any way, nor disclose its contents to any other
> person.
> Please notify the sender immediately and delete the e-mail from your
> system,
> if you so wish you can contact us on +44 1624 688000. The sender is not
> responsible for any alterations that may have occurred without
> authorisation.
> Any files attached to this email will have been checked by us with virus
> detection software before transmission. You should carry out your own
> virus
> checks before opening any attachments, as we do not accept any
> liability for
> loss or damage which may be caused by viruses.
>
> For information regarding company registration please visit the
> contact page at www.hansard.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-11-07 16:36:28 CET