Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion: How do I commit a Update To Revision?

I have a situation where:

  • Developer is working on SVN project.
  • Person checks out SVN project, walks away, kid/cat/wife sits/dools/sleepwalks/whatever at computer and inserts gobbledygook asdfg-code. Person commits project.
  • Developer sees bad files and Update To Revision back to the last working version

All is well untill the developer wants to commit the project. If the developer has made changes to the file in question, it will be committed just fine. BUT if not - the dev only Update To Revision and made no further changes - that file will not be commited, and any updates to the project will render the gobbledygook asdfg-code file to you.

Question : If I only 'Update To Revision' a file, how do I commit it again without manually editing the file?

like image 247
rlb.usa Avatar asked May 25 '10 19:05

rlb.usa


People also ask

What is Update to revision in svn?

Description. svn update brings changes from the repository into your working copy. If no revision is given, it brings your working copy up to date with the HEAD revision. Otherwise, it synchronizes the working copy to the revision given by the --revision ( -r ) option.

Which command is used to update to the latest revision svn?

Simply type svn update [name-of-directory] , or cd to that directory and type svn update there.

What is Update to revision?

Revising an update means publishing a changed update with the same package ID. The method used for revising an update is slightly different from the methods for publishing the initial version of the update.


1 Answers

I think you have chosen the wrong route around the problem.

Rather than changing what revision you are looking at, you should have:

  1. Updated to latest revision including the rubbish
  2. found the rubbish commit on the revision log and chosen revert this change
  3. committed the cleanup with or without any other changes you had to your working copy

So what you would do now is to update to the latest version (applying the rubbish change) and revert their change which brings you back in line. Pretty much as if they made the change while you where working and didn't have the change in the first place.

You can only commit when your code is up to date with the head of the working branch/trunk.

SVN won't make a branch for you dynamically at this point of earlier revision, you have to choose to make a branch, or to update to the head.

like image 160
Greg Domjan Avatar answered Sep 24 '22 02:09

Greg Domjan