Re: Maintaining a SVN 1.7 mirror without network access

2023-06-03 Thread Nathan Hartman
On Sat, Jun 3, 2023 at 2:41 PM Andreas Stieger 
wrote:

> Hello,
>
> On 2023-06-03 00:25, Colcord, Scott via users wrote:
> >
> > [...] Subversion 1.7 [...] periodically mirror it to a location that
> > does not have direct net access
> > [...]
> >
> > the mirror needs to be able to receive one divergent commit after the
> > load (this commit alters svn:externals locations to be appropriate for
> > the mirror’s network).
> > [...]
> >
> > Is there a way to replace the mirror repo with the contents of the
> > dump, without needing to manually delete it first – and ideally
> > without needing local rights (perhaps using svnrdump)?  Essentially, I
> > want the revisions from the dump file to replace the same-number
> > revisions in the repo, rather than appending.
> >
> > Is this possible?
> >
>
> No you cannot do it in the way you described, and your approach is
> incorrect. Not for svn, but IT.
>
> For subversion: If you alter the history of the repository in any way,
> all working copies will be invalidated. So even if you repeat the steps
> described, you will need to get new working copies.
>
> Please separate immutable history from the location-specific
> configuration. Either have the network configuration represented in a
> location-specific source, such as local DNS or other
> network-discoverable data. Or simply do not version location-specific
> data that creates a need to change it. Or make the code discover it's
> own location and pick one of the versioned configurations. This isn't
> even working around a limitation of svn, but good system design.
>
> If you proceed like that, you can use the incremental dump feature which
> should make administration faster and more straightforward.



I'd like to add that since Subversion 1.5 you can use relative locations
for svn:externals properties as documented at [1], in case that's helpful.

[1]
https://svnbook.red-bean.com/en/1.7/svn.advanced.externals.html

Cheers
Nathan


Re: Maintaining a SVN 1.7 mirror without network access

2023-06-03 Thread Andreas Stieger

Hello,

On 2023-06-03 00:25, Colcord, Scott via users wrote:


[...] Subversion 1.7 [...] periodically mirror it to a location that
does not have direct net access
[...]

the mirror needs to be able to receive one divergent commit after the
load (this commit alters svn:externals locations to be appropriate for
the mirror’s network).
[...]

Is there a way to replace the mirror repo with the contents of the
dump, without needing to manually delete it first – and ideally
without needing local rights (perhaps using svnrdump)?  Essentially, I
want the revisions from the dump file to replace the same-number
revisions in the repo, rather than appending.

Is this possible?



No you cannot do it in the way you described, and your approach is
incorrect. Not for svn, but IT.

For subversion: If you alter the history of the repository in any way,
all working copies will be invalidated. So even if you repeat the steps
described, you will need to get new working copies.

Please separate immutable history from the location-specific
configuration. Either have the network configuration represented in a
location-specific source, such as local DNS or other
network-discoverable data. Or simply do not version location-specific
data that creates a need to change it. Or make the code discover it's
own location and pick one of the versioned configurations. This isn't
even working around a limitation of svn, but good system design.

If you proceed like that, you can use the incremental dump feature which
should make administration faster and more straightforward.

Andreas



Maintaining a SVN 1.7 mirror without network access

2023-06-03 Thread Colcord, Scott via users
I have a Subversion 1.7 repo.  I need to periodically mirror it to a location 
that does not have direct net access (I can transfer a .dump file to it).

One catch is that the mirror needs to be able to receive one divergent commit 
after the load (this commit alters svn:externals locations to be appropriate 
for the mirror's network).  I'm fine with manually reapplying this commit after 
each load.

Currently, when I want to refresh the mirror, I have a sysadmin log in to the 
mirror SVN server, delete and recreate the repo from scratch, and then load the 
dump into it and apply the single manual commit.  This works, but is pretty 
cumbersome, and requires an admin.

Is there a way to replace the mirror repo with the contents of the dump, 
without needing to manually delete it first - and ideally without needing local 
rights (perhaps using svnrdump)?  Essentially, I want the revisions from the 
dump file to replace the same-number revisions in the repo, rather than 
appending.

Is this possible?

   Thanks!


This electronic communication and any attachments may contain confidential and 
proprietary information of Maxar, Inc. If you are not the intended recipient, 
or an agent or employee responsible for delivering this communication to the 
intended recipient, or if you have received this communication in error, please 
do not print, copy, retransmit, disseminate or otherwise use the information. 
Please indicate to the sender that you have received this communication in 
error, and delete the copy you received.

Maxar reserves the right to monitor any electronic communication sent or 
received by its employees, agents or representatives.