Pergunta

We have multiple developers working on a single Web Application/Project. For that purposes we use AnkhSVN.

One of the developers made some changes and committed the project. Few days later another developed in the team made some changes and made a commit also.

After that, the first developer's changes disappeared. The second developer's changes overridden the first developer's changes.

How to restore? How to keep both updates?

Please be specific. The resolution of this topic is very important.

Foi útil?

Solução

Actually you cannot commit changes when you are not up to date. I would guess that the second committer did something bad... So the problem is now to get the two changes to merge "posthumously".

To recover I would try (assuming that I correctly understood what you did; and it is educated speculation, because I havent tried it):

  1. copy the current state (without the .svn-folders!) into a temporary folder - this should be the changes of committer 2 to the initial state
  2. roll back to the revision before the first one committed ("update to revision") - i.e. to the version they both have (probably) started from
  3. copy over the changes from the temporary folder
  4. Update to the revision after the first one committed. This should try to merge the changes, and will possibly bring up some conflicts which you will need to resolve manually (this is probably where number 2 made a mistake). After this you should have both changes in the working copy.
  5. clear the temporary folder and copy the current state (without .svn folders again)
  6. now we are getting ugly: update to HEAD revision and copy back the changes
  7. Check that you have something that makes sense (compile) and commit.

Remember that you cannot really loose anything unless you corrupt the repo - this is version control after all... :-)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top