undo commit ???

Joshua Root jmr at macports.org
Fri Feb 20 05:19:30 PST 2015


I think you must have done this or the equivalent:
svn rm somefile
cp some/other/file somefile
svn add somefile

To avoid it happening in the first place, you would omit the svn
operations and just modify somefile. It doesn't matter if you edit it in
place or overwrite it with something else.

To fix it once you're in the state that svn thinks it's a new file being
added, you would do:

cp somefile somefile.backup
svn revert somefile
mv somefile.backup somefile

- Josh

On 2015-2-20 20:34 , petr wrote:
> 
> Hi Lawrence,
> 
> I saw that in r132950 and r132951 you corrected the error I introduced with r132349. Thanks for this and sorry for the extra effort!
> 
> However, I would like to better understand what went wrong and how am I supposed to act in such a situation. I guess, I introduced the issue with some inappropriate manipulation to my local sandbox, which than got committed. Is it possible to understand what exactly went wrong and how to avoid this? What are the correct steps to correct such a situation?
> 
> ~petr
> 
> 
> On 30 Jan 2015, at 01:45, petr <976F at ingv.it> wrote:
> 
>>
>> Hi list,
>>
>> I would need to undo a commit to the SVN. Apparently, I messed up my local repo while preparing a commit. After committing I realise the file I committed results as being added instead of being modified. Not sure how this happened, but I would like to revert the repo in the former state to conserve the history chain.
>>
>> What am I supposed to do? To correct this?
>>
>> The wrong commit is r132349 and I would need to get this back to r131849. The commit was supposed to do some format changes, but it seems to have replaced the file for some reason.
>>
>> Thanks!
>> ~petr
>>
> 



More information about the macports-dev mailing list