How to synchronise a SVN repository with a local one

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to synchronise a SVN repository with a local one

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 ?

Thanks for your support,

                                                 Eckard Klotz

Reply | Threaded
Open this post in threaded view
|

Re: How to synchronise a SVN repository with a local one

Daniel Shahaf-2
Eckard Klotz wrote on Tue, 31 Oct 2017 12:38 +0100:

> 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

> Thanks for your support,
>
>                                                   Eckard Klotz
>
Reply | Threaded
Open this post in threaded view
|

Re: How to synchronise a SVN repository with a local one

Eckard Klotz

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 documentation about sounds good):



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 '<a class="moz-txt-link-freetext" href="svn:sync-from-url">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.







Am 31.10.2017 um 13:01 schrieb Daniel Shahaf:
Eckard Klotz wrote on Tue, 31 Oct 2017 12:38 +0100:
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

Thanks for your support,

                                                  Eckard Klotz


Reply | Threaded
Open this post in threaded view
|

Re: How to synchronise a SVN repository with a local one

Paul Hammant-3
In reply to this post by Eckard Klotz
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
Reply | Threaded
Open this post in threaded view
|

Re: How to synchronise a SVN repository with a local one

Mark Phippard-3
On Tue, Oct 31, 2017 at 2:14 PM, Paul Hammant <[hidden email]> wrote:
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.


--
Reply | Threaded
Open this post in threaded view
|

Re: How to synchronise a SVN repository with a local one

Daniel Shahaf-2
In reply to this post by Eckard Klotz
Eckard Klotz wrote on Tue, 31 Oct 2017 18:56 +0100:

> > 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.)
Reply | Threaded
Open this post in threaded view
|

Re: How to synchronise a SVN repository with a local one

Robert Hickman
I second the advice to use git, unless you are working with a lot of
binary files.


On 01/11/17 14:38, Daniel Shahaf wrote:

> Eckard Klotz wrote on Tue, 31 Oct 2017 18:56 +0100:
>>> 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.)