James
James

Reputation: 3752

SVN out of date error

I had a problem in one of my projects, I decided to checkout an older revision and do a few modifications to it. I am now trying to commit this older modified revision and any contained changes to HEAD.

When I do the svn ci -m "reverting with some changes" it gives me:

svn: File '/trunk/main.c' is out of date

I tried doing an update answering mine-conflict when prompted but it broke some other changed files.

Is there a way to commit my modified version to HEAD?

Thanks

Upvotes: 0

Views: 1520

Answers (2)

Dmitry Brant
Dmitry Brant

Reputation: 7719

You can't check out an older revision, then commit it to the HEAD. That wouldn't really make sense. The order of steps should be: 1) check out old revision, 2) make changes, 3) update to current revision (merge), and 4) resolve conflicts. It sounds like you're at step 4.

Upvotes: 3

Aaron Digulla
Aaron Digulla

Reputation: 328760

  1. Use svn st to get a list of files that you modified
  2. Save those files somewhere or, even better, checkout head in a different place
  3. Merge the changes
  4. Commit.

Upvotes: 0

Related Questions