You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Wadsworth, Eric (Contractor)" <wa...@fhu.disa.mil> on 2003/08/13 20:58:51 UTC

restore repository - repository version?

Question: My box has a bad day, and my subversion repository dies. I restore
from a backup of a couple of days ago (version 220). But a bunch of working
copies are at 229. Now nobody can do anything, because all the working
copies are out of sync with the newly restored (older) repository. What do I
do?

Thanks! --- Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: restore repository - repository version?

Posted by cm...@collab.net.
Jani Averbach <ja...@cc.jyu.fi> writes:

> One dump question:
> >
> >   $ cd working_copy
> >   $ svn diff > ~/my-changes
> 
> Is this comparing last pristine copy against local modifications,
> isn't?

Yep.  So folks don't lose their local mods.

> What about if the pristine copy is from version 229 and the repository
> head is at 220.  

That's why I have the folks simple move their old working copy out of
the way before checking out a new one, instead of destroying the old
working copy.

Surely, if someone has a revision-229 working copy, that person can
save the day by importing their working copy into a temporary location
of the new repository, then merging the diffs between the new HEAD of
trunk (which is basically revision 220) and their temp-repos-dir
(which is the no-longer-existant revision 229) into their new working
copy.  You lose the individual changes between revisions 220 and 229
-- that is, they will all look like one big change in revision 221 --
but you don't lose the net change.

   $ svn import old_working_copy http://repos_url/temp_dir -m "Temp dir"
   $ svn merge http://repos_url/trunk http://repos_url/temp_dir working_copy
   $ svn ci -m "Changes from old repository revisions 221-229"
   $ svn rm http://repos_url/temp_dir -m "Remove the temp dir"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: restore repository - repository version?

Posted by Jani Averbach <ja...@cc.jyu.fi>.
On 13 Aug 2003 cmpilato@collab.net wrote:
> "Wadsworth, Eric (Contractor)" <wa...@fhu.disa.mil> writes:
>
> > Question: My box has a bad day, and my subversion repository dies. I restore
> > from a backup of a couple of days ago (version 220). But a bunch of working
> > copies are at 229. Now nobody can do anything, because all the working
> > copies are out of sync with the newly restored (older) repository. What do I
> > do?
>
> Have everyone do this:

One dump question:
>
>   $ cd working_copy
>   $ svn diff > ~/my-changes

Is this comparing last pristine copy against local modifications, isn't?
What about if the pristine copy is from version 229 and the repository
head is at 220.  Is there change to lose some modifications with that diff
(specifically from 221 to 228?) or will svn diff found somehow that it
has to contact to repository, and therefore it will produce diff against
r220 vs. local mods?

(Just wondering, haven't use subversion over a month, shamefully forget a
lot, and I don't have any dev-machine at the moment...)

BR, Jani

-- 
Jani Averbach


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: restore repository - repository version?

Posted by cm...@collab.net.
"Wadsworth, Eric (Contractor)" <wa...@fhu.disa.mil> writes:

> Question: My box has a bad day, and my subversion repository dies. I restore
> from a backup of a couple of days ago (version 220). But a bunch of working
> copies are at 229. Now nobody can do anything, because all the working
> copies are out of sync with the newly restored (older) repository. What do I
> do?

Have everyone do this:

  $ cd working_copy
  $ svn diff > ~/my-changes
  $ cd ..
  $ mv working_copy working_copy.busted
  $ svn co http://repos_url working_copy
  $ cd working_copy
  $ patch -p0 < ~/my-changes

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org