svn revert after merge

前端 未结 2 420
感动是毒
感动是毒 2021-01-27 22:58

I\'ve done an svn merge between two branches -- not checked in -- and now I want to \"un-merge\" some of the files in my working copy. Something like the following:



        
2条回答
  •  别那么骄傲
    2021-01-27 23:26

    David, was using PEG-revision sensible and necessary decision? I just try to make merge as easy as possible, and ask you re-done merge from scratch with new clean Working Copy and show here all, full real commands and output (UUID isn't private data, URL of repo for test can be file:///).

    Results of my test (merging heads and reverting single file) show expected results (you can re-check it on my test-case - repository is open)

    • Repository Hello with some history: http://mayorat.ursinecorner.ru:8088/svn/Hello/
    • Target branch Leichtbau-Deutsch: http://mayorat.ursinecorner.ru:8088/svn/Hello/branches/Leichtbau-Deutsch/
    • Source branch branche-francaise: http://mayorat.ursinecorner.ru:8088/svn/Hello/branches/branche-francaise/

    Steps and operations

    >svn co http://mayorat.ursinecorner.ru:8088/svn/Hello/branches/Leichtbau-Deutsch/
    A    Leichtbau-Deutsch\Hello.en.txt
    A    Leichtbau-Deutsch\Hello.fr.txt
    A    Leichtbau-Deutsch\Hello.de.txt
     U   Leichtbau-Deutsch
    Checked out revision 37.
    
    >cd Leichtbau-Deutsch
    
    >svn merge http://mayorat.ursinecorner.ru:8088/svn/Hello/branches/branche-francaise/
    --- Merging r26 through r37 into '.':
    U    Hello.fr.txt
    Conflict discovered in 'Z:/Leichtbau-Deutsch/Hello.de.txt'.
    Select: (p) postpone, (df) diff-full, (e) edit,
            (mc) mine-conflict, (tc) theirs-conflict,
            (s) show all options: tc
    U    Hello.de.txt
    --- Recording mergeinfo for merge of r26 through r37 into '.':
     U   .
    
    >svn status
     M      .
    M       Hello.de.txt
    M       Hello.fr.txt
    
    >svn revert Hello.fr.txt
    Reverted 'Hello.fr.txt'
    
    >svn st
     M      .
    M       Hello.de.txt
    

    And expected result at the end

    PS: I can repeat this test with PEG-revisions, if you want. But - I'll prefer use real revisions from corresponding branches and (unrelated to merge-revert) I'll have to perform (if memory serves me well) svn up (and blindly merge) to branch HEAD before be able to commit merge-set, because your svn co svn://myserver/repo/branches/foo@1000 checkout not-HEAD revision and revision history in SVN must be linear

提交回复
热议问题