Discussion:
How to synchronise a SVN repository with a local one
Eckard Klotz
2017-10-31 11:38:57 UTC
Permalink
Hello everybody.

My name is Eckard Klotz and I'm the owner of the project
"https://sourceforge.net/projects/moritz".

Some days ago I published my SVN repository at sourceforge.

Since parts of my development are done on a computer without internet
access I use local repositories for achieving my work by using the
svnadmin command hotcopy together with an archive on a usb stick  it is
no problem to synchronise both repositories. Actually I thought to do it
in the same way with my sourceforge archive. But since this is not a
local path hotcopy seem snot to work.

So I tried to use the commands dump and load but there I have the same
problems.

My goal is to synchronise the content of the sourceforge archive with my
local archive used to store my development history while keeping all
revisions, comments and time stamps.

Do you have a tip for me ?

Thanks for your support,

                                                 Eckard Klotz
Daniel Shahaf
2017-10-31 12:01:25 UTC
Permalink
Post by Eckard Klotz
Hello everybody.
My name is Eckard Klotz and I'm the owner of the project
"https://sourceforge.net/projects/moritz".
Some days ago I published my SVN repository at sourceforge.
Since parts of my development are done on a computer without internet
access I use local repositories for achieving my work by using the
svnadmin command hotcopy together with an archive on a usb stick  it is
no problem to synchronise both repositories. Actually I thought to do it
in the same way with my sourceforge archive. But since this is not a
local path hotcopy seem snot to work.
So I tried to use the commands dump and load but there I have the same
problems.
My goal is to synchronise the content of the sourceforge archive with my
local archive used to store my development history while keeping all
revisions, comments and time stamps.
Do you have a tip for me ?
Actually, I have two.

One, use standard terminology. What you call "archive" we'd call a
"repository". Therefore I'm not sure whether by "repository" you mean
"repository" or "working copy".

In any case, look into the 'svnsync' command for pushing changes from
one repository (in the standard sense of the term :-)) to another, into
'svnrdump load' for a one-off version of that, and into 'svn relocate'
for pointing a working copy to a different repository.

Feel free to clarify your question, then we might be able to provide
more accurate answers.

Cheers,

Daniel
Post by Eckard Klotz
Thanks for your support,
                                                 Eckard Klotz
Eckard Klotz
2017-10-31 17:56:42 UTC
Permalink
Hello Daniel.

Thanks for your reply.

You are right I'm talking about copying changes (new commits) from one
repository to an other one.

My "working" repository is a local one located on the computer where I
do the source development.

The "sourceforge" repository should be used to publish my work once I
have reached a stable point and a new feature or a bug-fix is
implemented. Very important for me is to publish all revisions with
their comments to keep the history of development. Thus after "copy"
from my "working" repository to the repository at sourceforge should
have exactly the same content.

I played around a little bit to figure out if svnsync may help me (the
C:\Project...>rem svnsync initialize MIRROR_URL SOURCE_URL
C:\Project...>*svnsync initialize https://.../p/moritz/Archive_SVN/
file:///C:/Project/.../Archiev  --disable-locking --allow-non-empty*
/svnsync: E175008: While handling the 'svn:sync-from-url' property on
'/p/moritz/Archive_SVN/!svn/bln/0'://
//svnsync: E175008: Repository has not been enabled to accept revision
propchanges;//
//ask the administrator to create a pre-revprop-change hook/
C:\Project...>rem svnsync synchronize DEST_URL [SOURCE_URL]
C:\Project...>*svnsync synchronize https://.../p/moritz/Archive_SVN/
file:///C:/Project.../Archiev  --disable-locking*
/svnsync: E000022: Destination repository has not been initialized/
C:\Project...>pause
DrÃŒcken Sie eine beliebige Taste . . .
I thing now I have as additional problem to set up the hook at
sourceforge. What do you think about?

Best regards,

                          Eckard.
Post by Eckard Klotz
Hello everybody.
My name is Eckard Klotz and I'm the owner of the project
"https://sourceforge.net/projects/moritz".
Some days ago I published my SVN repository at sourceforge.
Since parts of my development are done on a computer without internet
access I use local repositories for achieving my work by using the
svnadmin command hotcopy together with an archive on a usb stick  it is
no problem to synchronise both repositories. Actually I thought to do it
in the same way with my sourceforge archive. But since this is not a
local path hotcopy seem snot to work.
So I tried to use the commands dump and load but there I have the same
problems.
My goal is to synchronise the content of the sourceforge archive with my
local archive used to store my development history while keeping all
revisions, comments and time stamps.
Do you have a tip for me ?
Actually, I have two.
One, use standard terminology. What you call "archive" we'd call a
"repository". Therefore I'm not sure whether by "repository" you mean
"repository" or "working copy".
In any case, look into the 'svnsync' command for pushing changes from
one repository (in the standard sense of the term :-)) to another, into
'svnrdump load' for a one-off version of that, and into 'svn relocate'
for pointing a working copy to a different repository.
Feel free to clarify your question, then we might be able to provide
more accurate answers.
Cheers,
Daniel
Post by Eckard Klotz
Thanks for your support,
                                                 Eckard Klotz
Daniel Shahaf
2017-11-01 14:38:04 UTC
Permalink
Post by Eckard Klotz
C:\Project...>*svnsync initialize https://.../p/moritz/Archive_SVN/
file:///C:/Project/.../Archiev  --disable-locking --allow-non-empty*
/svnsync: E175008: While handling the 'svn:sync-from-url' property on
'/p/moritz/Archive_SVN/!svn/bln/0'://
//svnsync: E175008: Repository has not been enabled to accept revision
propchanges;//
//ask the administrator to create a pre-revprop-change hook/
C:\Project...>rem svnsync synchronize DEST_URL [SOURCE_URL]
C:\Project...>*svnsync synchronize https://.../p/moritz/Archive_SVN/
file:///C:/Project.../Archiev  --disable-locking*
/svnsync: E000022: Destination repository has not been initialized/
C:\Project...>pause
Drücken Sie eine beliebige Taste . . .
I thing now I have as additional problem to set up the hook at
sourceforge. What do you think about?
Ask sourceforge to enable the pre-revprop-change hook or use --disable-
locking. In the latter case you have to ensure that no two instances
of svnsync run concurrently, and additionally, svn:author & svn:date
would not be set correctly. (Other revision properties are set as part
of the commit, but these two are changed by svnsync using the revprop
change API.)
Robert Hickman
2017-11-01 22:06:14 UTC
Permalink
I second the advice to use git, unless you are working with a lot of
binary files.
Post by Daniel Shahaf
Post by Eckard Klotz
C:\Project...>*svnsync initialize https://.../p/moritz/Archive_SVN/
file:///C:/Project/.../Archiev  --disable-locking --allow-non-empty*
/svnsync: E175008: While handling the 'svn:sync-from-url' property on
'/p/moritz/Archive_SVN/!svn/bln/0'://
//svnsync: E175008: Repository has not been enabled to accept revision
propchanges;//
//ask the administrator to create a pre-revprop-change hook/
C:\Project...>rem svnsync synchronize DEST_URL [SOURCE_URL]
C:\Project...>*svnsync synchronize https://.../p/moritz/Archive_SVN/
file:///C:/Project.../Archiev  --disable-locking*
/svnsync: E000022: Destination repository has not been initialized/
C:\Project...>pause
Drücken Sie eine beliebige Taste . . .
I thing now I have as additional problem to set up the hook at
sourceforge. What do you think about?
Ask sourceforge to enable the pre-revprop-change hook or use --disable-
locking. In the latter case you have to ensure that no two instances
of svnsync run concurrently, and additionally, svn:author & svn:date
would not be set correctly. (Other revision properties are set as part
of the commit, but these two are changed by svnsync using the revprop
change API.)
Paul Hammant
2017-10-31 18:14:35 UTC
Permalink
Consider using Git-subversion.

1. git svn clone https://svn.code.sf.net/p/moritz/Archive_SVN/ myGitSvnClone

2. edits, git-add, git-commit (all offine) as usual

3. git svn dcommit # does the push back to subversion (must be online)

4. git svn rebase # is effectively the checkout you're more familar with,
BUT brings all history so that you can see it while you're offline with
git-log (etc) operations.

There are better tutorial elsewhere, but this is a super solid workflow for
your use case I think.

-ph
Mark Phippard
2017-10-31 18:58:44 UTC
Permalink
Post by Paul Hammant
Consider using Git-subversion.
1. git svn clone https://svn.code.sf.net/p/moritz/Archive_SVN/
myGitSvnClone
2. edits, git-add, git-commit (all offine) as usual
3. git svn dcommit # does the push back to subversion (must be online)
4. git svn rebase # is effectively the checkout you're more familar with,
BUT brings all history so that you can see it while you're offline with
git-log (etc) operations.
There are better tutorial elsewhere, but this is a super solid workflow
for your use case I think.
I was going to suggest the same thing, though given the desired workflow
and the need to work offline it really seems like you ought to just be
using Git. Is there a reason you are hosting a new open source project at
SourceForge as opposed to GitHub? It really is not clear why you want to
use SVN as it is not a good fit for the needs you have described.
--
Thanks

Mark Phippard
http://markphip.blogspot.com/
Loading...