Thanks everybody for their input. I would never have guessed that such a
simple post will generate so much debate. As usual, it's a pleasure to
read this ML and always a way to learn more about Subversion.
In the end I went for the reverse merge method. The reasons being it's
easier to understand (I have a couple of other guys willing to become
SvnAdmin), it's one command rather than a copy for each file (and we did
want to re-instate all files previously deleted) and it's a cheap copy
preserving history (the same as svn copy, I know).
Thanks again to everybody
Giulio
>
Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447
-----Original Message-----
> From: Blair Zajac [mailto:blair_at_orcaware.com]
> Sent: 07 February 2008 06:19
> To: Giulio Troccoli
> Cc: users_at_subversion.tigris.org
> Subject: Re: Reverting a delete
>
> Giulio Troccoli wrote:
> > One developer deleted a file (with svn delete) and committed. Now we
> > want that file back. I can think of two ways to do that:
> >
> > 1. update to the revision before the deletion, make a copy of the
file,
> > update to HEAD, move back the file, svn add and svn commit
> > 2. update to HEAD, reverse merge the revison that deleted the file
(svn
> > merge -c-<rev>), svn commit
> >
> > The end result is obviously the same: I will have my file back.
However:
> > - the first method does not preserve the history of the file
> > - none of the methods is a cheap copy
>
> That's not true. The second method is still a cheap copy. You'll see
> that the
> file is a copy of an existing file. Doing the status should show
>
> A + filename
>
> svn info will show the file as a copy:
>
> $ svn info filename
>
> Copied From URL: file:///tmp/repos/filename
> Copied From Rev: 1
>
> So doing the reverse merge is the easiest way.
>
> Regards,
> Blair
>
> --
> Blair Zajac, Ph.D.
> CTO, OrcaWare Technologies
> <blair_at_orcaware.com>
> Subversion training, consulting and support
> http://www.orcaware.com/svn/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-02-07 10:01:12 CET