You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by C M <cm...@gmail.com> on 2013/04/25 21:34:08 UTC

Files on trunk overwritten...

I am certain there is simple way out of this situation.

Some files were committed to trunk which have incorrect updates.

What's the easiest way to roll back to the previous versions (before the
erroneous changes were committed)?

Should I checkout the previous revision and commit them over the erroneous
changes? Or is there some way to handle this?

TIA,
Amad

Re: Files on trunk overwritten...

Posted by Andy Levy <an...@gmail.com>.
On Thu, Apr 25, 2013 at 3:34 PM, C M <cm...@gmail.com> wrote:
> I am certain there is simple way out of this situation.
>
> Some files were committed to trunk which have incorrect updates.
>
> What's the easiest way to roll back to the previous versions (before the
> erroneous changes were committed)?
>
> Should I checkout the previous revision and commit them over the erroneous
> changes? Or is there some way to handle this?

Perform a "reverse merge" to back out the change & keep your history
intact. http://svnbook.red-bean.com/en/1.7/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.undo

Re: Files on trunk overwritten...

Posted by C M <cm...@gmail.com>.
This syntax did the trick:

svn merge -r661:177 --dry-run https://XXX/trunk/directory_path

In preview mode, SVN showed me the files it was going to update. That list
matched the files we knew had been modified erroneously. There weren't any
changes to that particular directory contents since r177.

I re-ran it without the dry run, then ran diff after the update.

We are set. Thank you.

Amad



On Mon, Apr 29, 2013 at 1:41 PM, Les Mikesell <le...@gmail.com> wrote:

> On Mon, Apr 29, 2013 at 1:23 PM, C M <cm...@gmail.com> wrote:
> > The working copy (head revision) is at 661. 177 is what I want to go back
> > to.
> >
> > Is this the syntax to use (from within the working copy:
> >
> > svn merge -r661:177?
>
> Yes but that should undo all changes after 177 and you might only want
> the next commit or so if more changes were added later.   In any case
> it is fairly easy and safe to experiment - just use a working copy
> with no other changes and don't commit until you get what you want
> (and you can tell by diffing against the version where things were
> correct).  If you don't like the merge results, just revert to the
> unmodified checkout and try again.
>
> --
>    Les Mikesell
>      lesmikesell@gmail.com
>

Re: Files on trunk overwritten...

Posted by Les Mikesell <le...@gmail.com>.
On Mon, Apr 29, 2013 at 1:23 PM, C M <cm...@gmail.com> wrote:
> The working copy (head revision) is at 661. 177 is what I want to go back
> to.
>
> Is this the syntax to use (from within the working copy:
>
> svn merge -r661:177?

Yes but that should undo all changes after 177 and you might only want
the next commit or so if more changes were added later.   In any case
it is fairly easy and safe to experiment - just use a working copy
with no other changes and don't commit until you get what you want
(and you can tell by diffing against the version where things were
correct).  If you don't like the merge results, just revert to the
unmodified checkout and try again.

--
   Les Mikesell
     lesmikesell@gmail.com

Re: Files on trunk overwritten...

Posted by C M <cm...@gmail.com>.
The working copy (head revision) is at 661. 177 is what I want to go back
to.

Is this the syntax to use (from within the working copy:

svn merge -r661:177?




On Fri, Apr 26, 2013 at 8:53 PM, Les Mikesell <le...@gmail.com> wrote:

> On Fri, Apr 26, 2013 at 6:18 PM, C M <cm...@gmail.com> wrote:
> > Deleting the trunk is not an option.
> >
> > To do the reverse merge, I created a working copy (which includes the
> files
> > which are incorrect and I want to revert via the merge).
> > Within my working copy, I typed:
> >
> > svn merge -c -177 https://trunk/path_to_directory
> >
> > 177 being the revision I want to roll back to but nothing happens.
> >
> > svn status shows nothing. What am I missing?
>
> That's not saying you want to roll back from current to r177, it says
> undo the change in the rev 177 commit.  That is, -r177:176.  Is that
> exactly when the change you want to remove happened?
>
> --
>    Les Mikesell
>      lesmikesell@gmail.com
>

Re: Files on trunk overwritten...

Posted by Les Mikesell <le...@gmail.com>.
On Fri, Apr 26, 2013 at 6:18 PM, C M <cm...@gmail.com> wrote:
> Deleting the trunk is not an option.
>
> To do the reverse merge, I created a working copy (which includes the files
> which are incorrect and I want to revert via the merge).
> Within my working copy, I typed:
>
> svn merge -c -177 https://trunk/path_to_directory
>
> 177 being the revision I want to roll back to but nothing happens.
>
> svn status shows nothing. What am I missing?

That's not saying you want to roll back from current to r177, it says
undo the change in the rev 177 commit.  That is, -r177:176.  Is that
exactly when the change you want to remove happened?

--
   Les Mikesell
     lesmikesell@gmail.com

Re: Files on trunk overwritten...

Posted by C M <cm...@gmail.com>.
Deleting the trunk is not an option.

To do the reverse merge, I created a working copy (which includes the files
which are incorrect and I want to revert via the merge).
Within my working copy, I typed:

svn merge -c -177 https://trunk/path_to_directory

177 being the revision I want to roll back to but nothing happens.

svn status shows nothing. What am I missing?


On Fri, Apr 26, 2013 at 12:33 AM, Lorenz <lo...@yahoo.com> wrote:

> C M wrote:
> >Some files were committed to trunk which have incorrect updates.
> >
> >What's the easiest way to roll back to the previous versions (before the
> >erroneous changes were committed)?
>
> another way is to delete the trunk and reestablish it by copying the
> last correct trunk revision.
>
> This way a log of trunk head won't show the intermediate (between the
> revision of the copy source ad the copy itself)  commits to trunk.
> Only the copy of the earlier revision will show up.
>
> ---x--- .... ---y  z--- ...
>     \             /
>      -------------
>
> If there was only one objectionable commit I would go with the reverse
> merge though.
> --
>
> Lorenz
>
>

Re: Files on trunk overwritten...

Posted by Lorenz <lo...@yahoo.com>.
C M wrote:
>Some files were committed to trunk which have incorrect updates.
>
>What's the easiest way to roll back to the previous versions (before the
>erroneous changes were committed)?

another way is to delete the trunk and reestablish it by copying the
last correct trunk revision.

This way a log of trunk head won't show the intermediate (between the
revision of the copy source ad the copy itself)  commits to trunk.
Only the copy of the earlier revision will show up.
   
---x--- .... ---y  z--- ...
    \             /
     -------------

If there was only one objectionable commit I would go with the reverse
merge though.
-- 

Lorenz


Re: Files on trunk overwritten...

Posted by Les Mikesell <le...@gmail.com>.
On Thu, Apr 25, 2013 at 2:34 PM, C M <cm...@gmail.com> wrote:
> I am certain there is simple way out of this situation.
>
> Some files were committed to trunk which have incorrect updates.
>
> What's the easiest way to roll back to the previous versions (before the
> erroneous changes were committed)?
>
> Should I checkout the previous revision and commit them over the erroneous
> changes? Or is there some way to handle this?

Do a reverse-merge of the bad change and commit it back.
Look at the 'undoing changes' section here:
http://svnbook.red-bean.com/en/1.7/svn.branchmerge.basicmerging.html

--
   Les Mikesell
     lesmikesell@gmail.com