You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mark Wagner <ca...@gmail.com> on 2007/03/30 19:59:05 UTC

svn revert not reverting

While making automated changes to the codebase I'm working on , I
accidentally deleted all newlines from some of the files.  The obvious
fix would be to use "svn revert" to roll back all the changes, but
it's not working: "svn revert borkedfile.cpp" does nothing.

Any idea on what could be causing this, and how to convince subversion
to revert these files?

-- 
Mark Wagner

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

Re: svn revert not reverting

Posted by Peter Samuelson <pe...@p12n.org>.
> On 3/30/07, Ryan Schmidt <su...@ryandesign.com> wrote:
> >Only other thing I could think of: are the timestamps of the
> >pristine file and the modified file the same? If so, Subversion may
> >not think they are different. Try "touch"ing the modified file
> >first. Then see if it will revert.

[Mark Wagner]
> That was it, thanks.  I don't suppose there's an undocumented
> "--force" option for "svn revert"?

Subversion, like the Unix 'make' command, assumes that if you modify a
file, you modify its "last modified" timestamp.  That is, after all,
why the "last modified" timestamp exists.  A few rare tools attempt to
hide the fact that they made modifications to a file by restoring the
file's original timestamp.  Don't use such tools with Subversion - or,
really, don't use them at all, unless your _intention_ is to fool your
software in this way.

Subversion 1.5, when released, will attempt to work around this broken
behavior in most cases, by noticing when a file's timestamp has not
changed but its size has changed.

Re: svn revert not reverting

Posted by Mark Wagner <ca...@gmail.com>.
On 3/30/07, Ryan Schmidt <su...@ryandesign.com> wrote:
> On Mar 30, 2007, at 15:37, Mark Wagner wrote:
>
> > On 3/30/07, Ryan Schmidt wrote:
> >
> >> On Mar 30, 2007, at 14:59, Mark Wagner wrote:
> >>
> >> > While making automated changes to the codebase I'm working on , I
> >> > accidentally deleted all newlines from some of the files.  The
> >> obvious
> >> > fix would be to use "svn revert" to roll back all the changes, but
> >> > it's not working: "svn revert borkedfile.cpp" does nothing.
> >> >
> >> > Any idea on what could be causing this, and how to convince
> >> subversion
> >> > to revert these files?
> >>
> >> Did your automated changes also bork the pristine copy of the same
> >> file in .svn/text-base? If so, you have ruined your working copy and
> >> should check out a new one.
> >
> > I was very careful about that.  The pristine copy is fine.
>
> Only other thing I could think of: are the timestamps of the pristine
> file and the modified file the same? If so, Subversion may not think
> they are different. Try "touch"ing the modified file first. Then see
> if it will revert.

That was it, thanks.  I don't suppose there's an undocumented
"--force" option for "svn revert"?

-- 
Mark

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

Re: svn revert not reverting

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 30, 2007, at 15:37, Mark Wagner wrote:

> On 3/30/07, Ryan Schmidt wrote:
>
>> On Mar 30, 2007, at 14:59, Mark Wagner wrote:
>>
>> > While making automated changes to the codebase I'm working on , I
>> > accidentally deleted all newlines from some of the files.  The  
>> obvious
>> > fix would be to use "svn revert" to roll back all the changes, but
>> > it's not working: "svn revert borkedfile.cpp" does nothing.
>> >
>> > Any idea on what could be causing this, and how to convince  
>> subversion
>> > to revert these files?
>>
>> Did your automated changes also bork the pristine copy of the same
>> file in .svn/text-base? If so, you have ruined your working copy and
>> should check out a new one.
>
> I was very careful about that.  The pristine copy is fine.

Only other thing I could think of: are the timestamps of the pristine  
file and the modified file the same? If so, Subversion may not think  
they are different. Try "touch"ing the modified file first. Then see  
if it will revert.


-- 

To reply to the mailing list, please use your mailer's Reply To All  
function


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

Re: svn revert not reverting

Posted by Mark Wagner <ca...@gmail.com>.
On 3/30/07, Ryan Schmidt <su...@ryandesign.com> wrote:
> On Mar 30, 2007, at 14:59, Mark Wagner wrote:
>
> > While making automated changes to the codebase I'm working on , I
> > accidentally deleted all newlines from some of the files.  The obvious
> > fix would be to use "svn revert" to roll back all the changes, but
> > it's not working: "svn revert borkedfile.cpp" does nothing.
> >
> > Any idea on what could be causing this, and how to convince subversion
> > to revert these files?
>
> Did your automated changes also bork the pristine copy of the same
> file in .svn/text-base? If so, you have ruined your working copy and
> should check out a new one.

I was very careful about that.  The pristine copy is fine.

-- 
Mark

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

Re: svn revert not reverting

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 30, 2007, at 14:59, Mark Wagner wrote:

> While making automated changes to the codebase I'm working on , I
> accidentally deleted all newlines from some of the files.  The obvious
> fix would be to use "svn revert" to roll back all the changes, but
> it's not working: "svn revert borkedfile.cpp" does nothing.
>
> Any idea on what could be causing this, and how to convince subversion
> to revert these files?

Did your automated changes also bork the pristine copy of the same  
file in .svn/text-base? If so, you have ruined your working copy and  
should check out a new one.


-- 

To reply to the mailing list, please use your mailer's Reply To All  
function


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

RE: svn revert not reverting

Posted by James Oltmans <jo...@bolosystems.com>.
Delete the file then svn update to restore it from the repository.


-----Original Message-----
From: Mark Wagner [mailto:carnildo@gmail.com] 
Sent: Friday, March 30, 2007 1:59 PM
To: users@subversion.tigris.org
Subject: svn revert not reverting

While making automated changes to the codebase I'm working on , I
accidentally deleted all newlines from some of the files.  The obvious
fix would be to use "svn revert" to roll back all the changes, but
it's not working: "svn revert borkedfile.cpp" does nothing.

Any idea on what could be causing this, and how to convince subversion
to revert these files?

-- 
Mark Wagner

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


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