You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ben Madin <be...@remoteinformation.com.au> on 2008/12/08 12:57:52 UTC

Restore repository from working copy

G'day all,

I have suffered a catastrophic failure of the old (2001) freebsd box  
on which my PhD thesis repository was served from.

Although I am obviously an idiot for not adequately backing up the  
repository, the reality was it was for my own benefit, and more of a  
convenient backup system, especially when travelling, so I'm happy to  
live with the loss of the versioning history.

But now I have set up a new (only 3 year old) box, with a shiny new  
hard drive and UPS, and want to populate it again from my working copy.

However the working copy is full of .svn directories etc, and I was  
wondering if there is any way to import it without causing confusion.

As it is (now) the only copy, I am reluctant to do a rm -r sweep  
through it to try to remove all the .svn directories, in case I  
accidently get everything.

Is there any alternatives for importing checked out copy. I have been  
through the book and the faq's, and looking the archive with little  
success, but I'm not sure that I haven't missed a key word.

Any help would be really appreciated.

cheers

Ben


-- 

Ben Madin
REMOTE INFORMATION

t : +61 8 9192 5455
f : +61 8 9192 5535
m : 0448 887 220
Broome   WA   6725

ben@remoteinformation.com.au



							Out here, it pays to know...

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981131

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Restore repository from working copy

Posted by Craig McQueen <mc...@edsrd1.yzk.co.jp>.
Ben Madin wrote:
> As it is (now) the only copy, I am reluctant to do a rm -r sweep  
> through it to try to remove all the .svn directories, in case I  
> accidently get everything.
>
>   

Ever thought of backing up your working copy?

Regards,
Craig McQueen

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981453

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Restore repository from working copy

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Dec 8, 2008, at 06:57, Ben Madin wrote:

> I have suffered a catastrophic failure of the old (2001) freebsd box
> on which my PhD thesis repository was served from.
>
> Although I am obviously an idiot for not adequately backing up the
> repository, the reality was it was for my own benefit, and more of a
> convenient backup system, especially when travelling, so I'm happy to
> live with the loss of the versioning history.
>
> But now I have set up a new (only 3 year old) box, with a shiny new
> hard drive and UPS, and want to populate it again from my working  
> copy.
>
> However the working copy is full of .svn directories etc, and I was
> wondering if there is any way to import it without causing confusion.
>
> As it is (now) the only copy, I am reluctant to do a rm -r sweep
> through it to try to remove all the .svn directories, in case I
> accidently get everything.
>
> Is there any alternatives for importing checked out copy. I have been
> through the book and the faq's, and looking the archive with little
> success, but I'm not sure that I haven't missed a key word.

"svn import" ignores the .svn directories. So you can safely create a  
new empty repository with "svnadmin create" and import your working  
copy into it with "svn import". The .svn directories will not be  
imported. Then you can check out from the new repository to a new  
location on your hard drive and verify everything looks ok.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981451

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=982398

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Restore repository from working copy

Posted by Dextrous <de...@gmail.com>.
You can check svn export

export: Create an unversioned copy of a tree.
usage: 1. export [-r REV] URL[@PEGREV] [PATH]
       2. export [-r REV] PATH1[@PEGREV] [PATH2]

  1. Exports a clean directory tree from the repository specified by
     URL, at revision REV if it is given, otherwise at HEAD, into
     PATH. If PATH is omitted, the last component of the URL is used
     for the local directory name.

  2. Exports a clean directory tree from the working copy specified by
     PATH1, at revision REV if it is given, otherwise at WORKING, into
     PATH2.  If PATH2 is omitted, the last component of the PATH1 is used
     for the local directory name. If REV is not specified, all local
     changes will be preserved.  Files not under version control will
     not be copied.

On Mon, Dec 8, 2008 at 6:27 PM, Ben Madin <be...@remoteinformation.com.au>wrote:

> G'day all,
>
> I have suffered a catastrophic failure of the old (2001) freebsd box
> on which my PhD thesis repository was served from.
>
> Although I am obviously an idiot for not adequately backing up the
> repository, the reality was it was for my own benefit, and more of a
> convenient backup system, especially when travelling, so I'm happy to
> live with the loss of the versioning history.
>
> But now I have set up a new (only 3 year old) box, with a shiny new
> hard drive and UPS, and want to populate it again from my working copy.
>
> However the working copy is full of .svn directories etc, and I was
> wondering if there is any way to import it without causing confusion.
>
> As it is (now) the only copy, I am reluctant to do a rm -r sweep
> through it to try to remove all the .svn directories, in case I
> accidently get everything.
>
> Is there any alternatives for importing checked out copy. I have been
> through the book and the faq's, and looking the archive with little
> success, but I'm not sure that I haven't missed a key word.
>
> Any help would be really appreciated.
>
> cheers
>
> Ben
>
>
> --
>
> Ben Madin
> REMOTE INFORMATION
>
> t : +61 8 9192 5455
> f : +61 8 9192 5535
> m : 0448 887 220
> Broome   WA   6725
>
> ben@remoteinformation.com.au
>
>
>
>                                                        Out here, it pays to
> know...
>
> ------------------------------------------------------
>
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981131
>
> To unsubscribe from this discussion, e-mail: [
> users-unsubscribe@subversion.tigris.org].
>



-- 
Cheers,
Vishwajeet
http://www.singhvishwajeet.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981262

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Restore repository from working copy

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Dec 8, 2008, at 06:57, Ben Madin wrote:

> I have suffered a catastrophic failure of the old (2001) freebsd box
> on which my PhD thesis repository was served from.
>
> Although I am obviously an idiot for not adequately backing up the
> repository, the reality was it was for my own benefit, and more of a
> convenient backup system, especially when travelling, so I'm happy to
> live with the loss of the versioning history.
>
> But now I have set up a new (only 3 year old) box, with a shiny new
> hard drive and UPS, and want to populate it again from my working  
> copy.
>
> However the working copy is full of .svn directories etc, and I was
> wondering if there is any way to import it without causing confusion.
>
> As it is (now) the only copy, I am reluctant to do a rm -r sweep
> through it to try to remove all the .svn directories, in case I
> accidently get everything.
>
> Is there any alternatives for importing checked out copy. I have been
> through the book and the faq's, and looking the archive with little
> success, but I'm not sure that I haven't missed a key word.

"svn import" ignores the .svn directories. So you can safely create a  
new empty repository with "svnadmin create" and import your working  
copy into it with "svn import". The .svn directories will not be  
imported. Then you can check out from the new repository to a new  
location on your hard drive and verify everything looks ok.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981451

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Restore repository from working copy

Posted by Les Mikesell <le...@gmail.com>.
Hyrum K. Wright wrote:
>
>> However the working copy is full of .svn directories etc, and I was  
>> wondering if there is any way to import it without causing confusion.
>>
>> As it is (now) the only copy, I am reluctant to do a rm -r sweep  
>> through it to try to remove all the .svn directories, in case I  
>> accidentally get everything.
>>
>> Is there any alternatives for importing checked out copy. I have been  
>> through the book and the faq's, and looking the archive with little  
>> success, but I'm not sure that I haven't missed a key word.
>>
>> Any help would be really appreciated.
> 
> I think you're looking for 'svn export', which will strip the .svn directories
> from the source and put a copy of the contents in another locations.
> 

rsync with the -C option is yet another way to copy a workspace omitting 
the metadata.  Unlike svn export, it will take files that weren't under 
version control, though.

-- 
   Les Mikesell
    lesmikesell@gmail.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981276

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=982437

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Restore repository from working copy

Posted by Les Mikesell <le...@gmail.com>.
Hyrum K. Wright wrote:
>
>> However the working copy is full of .svn directories etc, and I was  
>> wondering if there is any way to import it without causing confusion.
>>
>> As it is (now) the only copy, I am reluctant to do a rm -r sweep  
>> through it to try to remove all the .svn directories, in case I  
>> accidentally get everything.
>>
>> Is there any alternatives for importing checked out copy. I have been  
>> through the book and the faq's, and looking the archive with little  
>> success, but I'm not sure that I haven't missed a key word.
>>
>> Any help would be really appreciated.
> 
> I think you're looking for 'svn export', which will strip the .svn directories
> from the source and put a copy of the contents in another locations.
> 

rsync with the -C option is yet another way to copy a workspace omitting 
the metadata.  Unlike svn export, it will take files that weren't under 
version control, though.

-- 
   Les Mikesell
    lesmikesell@gmail.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981276

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Restore repository from working copy

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Ben Madin wrote:
> G'day all,
> 
> I have suffered a catastrophic failure of the old (2001) freebsd box  
> on which my PhD thesis repository was served from.

Condolences on the loss of your data.

> Although I am obviously an idiot for not adequately backing up the  
> repository, the reality was it was for my own benefit, and more of a  
> convenient backup system, especially when traveling, so I'm happy to  
> live with the loss of the versioning history.
> 
> But now I have set up a new (only 3 year old) box, with a shiny new  
> hard drive and UPS, and want to populate it again from my working copy.
> 
> However the working copy is full of .svn directories etc, and I was  
> wondering if there is any way to import it without causing confusion.
> 
> As it is (now) the only copy, I am reluctant to do a rm -r sweep  
> through it to try to remove all the .svn directories, in case I  
> accidentally get everything.
> 
> Is there any alternatives for importing checked out copy. I have been  
> through the book and the faq's, and looking the archive with little  
> success, but I'm not sure that I haven't missed a key word.
> 
> Any help would be really appreciated.

I think you're looking for 'svn export', which will strip the .svn directories
from the source and put a copy of the contents in another locations.

Btw, if you were to try using 'rm -r', I'd suggest creating a backup of the
working copy first.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981263

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Restore repository from working copy

Posted by Dextrous <de...@gmail.com>.
You can check svn export

export: Create an unversioned copy of a tree.
usage: 1. export [-r REV] URL[@PEGREV] [PATH]
       2. export [-r REV] PATH1[@PEGREV] [PATH2]

  1. Exports a clean directory tree from the repository specified by
     URL, at revision REV if it is given, otherwise at HEAD, into
     PATH. If PATH is omitted, the last component of the URL is used
     for the local directory name.

  2. Exports a clean directory tree from the working copy specified by
     PATH1, at revision REV if it is given, otherwise at WORKING, into
     PATH2.  If PATH2 is omitted, the last component of the PATH1 is used
     for the local directory name. If REV is not specified, all local
     changes will be preserved.  Files not under version control will
     not be copied.

On Mon, Dec 8, 2008 at 6:27 PM, Ben Madin <be...@remoteinformation.com.au>wrote:

> G'day all,
>
> I have suffered a catastrophic failure of the old (2001) freebsd box
> on which my PhD thesis repository was served from.
>
> Although I am obviously an idiot for not adequately backing up the
> repository, the reality was it was for my own benefit, and more of a
> convenient backup system, especially when travelling, so I'm happy to
> live with the loss of the versioning history.
>
> But now I have set up a new (only 3 year old) box, with a shiny new
> hard drive and UPS, and want to populate it again from my working copy.
>
> However the working copy is full of .svn directories etc, and I was
> wondering if there is any way to import it without causing confusion.
>
> As it is (now) the only copy, I am reluctant to do a rm -r sweep
> through it to try to remove all the .svn directories, in case I
> accidently get everything.
>
> Is there any alternatives for importing checked out copy. I have been
> through the book and the faq's, and looking the archive with little
> success, but I'm not sure that I haven't missed a key word.
>
> Any help would be really appreciated.
>
> cheers
>
> Ben
>
>
> --
>
> Ben Madin
> REMOTE INFORMATION
>
> t : +61 8 9192 5455
> f : +61 8 9192 5535
> m : 0448 887 220
> Broome   WA   6725
>
> ben@remoteinformation.com.au
>
>
>
>                                                        Out here, it pays to
> know...
>
> ------------------------------------------------------
>
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981131
>
> To unsubscribe from this discussion, e-mail: [
> users-unsubscribe@subversion.tigris.org].
>



-- 
Cheers,
Vishwajeet
http://www.singhvishwajeet.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981262

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=982488

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Restore repository from working copy

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Ben Madin wrote:
> G'day all,
> 
> I have suffered a catastrophic failure of the old (2001) freebsd box  
> on which my PhD thesis repository was served from.

Condolences on the loss of your data.

> Although I am obviously an idiot for not adequately backing up the  
> repository, the reality was it was for my own benefit, and more of a  
> convenient backup system, especially when traveling, so I'm happy to  
> live with the loss of the versioning history.
> 
> But now I have set up a new (only 3 year old) box, with a shiny new  
> hard drive and UPS, and want to populate it again from my working copy.
> 
> However the working copy is full of .svn directories etc, and I was  
> wondering if there is any way to import it without causing confusion.
> 
> As it is (now) the only copy, I am reluctant to do a rm -r sweep  
> through it to try to remove all the .svn directories, in case I  
> accidentally get everything.
> 
> Is there any alternatives for importing checked out copy. I have been  
> through the book and the faq's, and looking the archive with little  
> success, but I'm not sure that I haven't missed a key word.
> 
> Any help would be really appreciated.

I think you're looking for 'svn export', which will strip the .svn directories
from the source and put a copy of the contents in another locations.

Btw, if you were to try using 'rm -r', I'd suggest creating a backup of the
working copy first.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981263

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=982533

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].