topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 8:44 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Svn Conflicts Backup - Redo your subversion conflict resolves  (Read 8364 times)

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
After wasting my morning wrestling with subversion, in particularly this question:
Subversion reverting resolved file
If I was to make an error in a file that I have marked resolved is there a way to go back to having the file in it's original conflicted state without reverting all changes and reattempting the merge?
No, there is no automatic way to do that. If you want to be able to do that, you'll have to manually back up the .mine file ahead of time so that you can get it back if needed.
Spoiler
I'm doing a merge. After merging I commit all files without conflicts. Then I resolve single files and commit them. If I make a mistake how do I redo the resolving (even if I haven't committed the resolved file yet)?

Contrary to expectation I cannot revert the file. When reverting back to any step after the merge none of the files become conflicted again. This means I have one chance to resolve correctly or having to revert the wc to a point before the merge and reattempt the merge - which takes a long time.

It seems when doing a merge the act of merging is applied as a property on the working copy root folder, and then the wc is considered merged, whether or not there are conflicts outstanding. Is it right that none of the conflicts are marked as such in the repository?

Deleting the file and doing an svn update did not succeed as I retrieve the file as if it wasn't merged and attempting to merge again does not find any changesets.


Well now you don't have you waste your time, you can redo your conflict resolves using the enclosed script. (included is the .ahk and .exe file). It's a bit spartan but the GUI will guide you throughu the process:

* Select working copy root
* Find all .working files
* For each .working file find all other extensions with the same filename (.merge-left.rXXXX  and .merge-right.rXXXX files and the actual file)
* copy these into a SvnConflictsBackup\<date>\<directory_structure>\file on your desktop
* Show Finished(remove) and Restore button
* Finish: exit and open backup folder for deletion by user
*: choose from all .working files and restore it and related files

When you are resolving conflicts, think of this utility and use it to back them up!
« Last Edit: February 07, 2012, 09:31 AM by justice »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: Svn Conflicts Backup - Redo your subversion conflict resolves
« Reply #1 on: February 07, 2012, 12:11 PM »
Thanks, sounds useful to me :Thmbsup: (yes we do use SVN every day, about 40 projects/repos)

But the biggest drawback is I'd need to be reminded in time to make the backup :-[

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: Svn Conflicts Backup - Redo your subversion conflict resolves
« Reply #2 on: February 07, 2012, 02:19 PM »
hehe anything you can think I can do to help with that? :)

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: Svn Conflicts Backup - Redo your subversion conflict resolves
« Reply #3 on: February 07, 2012, 02:31 PM »
hehe anything you can think I can do to help with that? :)
Nope.
I'll probably have to put a big warning sticker on the monitor instead of the brand-logo, that says "BACKUP THE BACKUP" in red on white, hopefully that's enough :tellme:

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: Svn Conflicts Backup - Redo your subversion conflict resolves
« Reply #4 on: February 15, 2012, 02:55 AM »
If you want to play with the latest source, you can now fork from Bitbucket:
https://bitbucket.or...t/svnconflictsbackup

I'll keep posting executable releases in this topic when they're available.