简体   繁体   中英

SVN Update Postpone --> How to resolve?

When I did svn update and SVN asked me about a few differences, I told it to postpone them.

Now I would like to resolve them, but svn update just tells me "up to date", even though svn diff shows me the differences.

How do I make svn update ask me about the conflicts again?

svn update won't ask about the conflicts again because it has dealt with them.

As for the meaning of svn status , The ? files are not managed by SVN, the M ones have been modified, and the C ones are the conflicted ones that you postponed. If you open one of the C files, and look through it you will see markers in your code showing you where the conflicts are. You need to edit each one of these, fix the conflicts and remove the markers. And then you need to run svn resolve to tell SVN that things are OK. Make sure to use the --help option and Google to learn how svn resolve works before you run it.

If you don't do all of this, svn commit will no longer work.

svn status is really important to understand, because svn diff only shows things that happened locally after svn update . But, svn status -u gives an overview after querying the repository. Most importantly, it clearly identifies files with conflicts ( C in column 1) which you have to open in an editor and check manually.

When you run svn commit , you will have a list of the files in conflict. You can then resolve the conflicts by issuing commands such as :

svn resolve --accept=theirs-full '/path/to/the/file'

Type svn resolve --help for a list of the available conflict resolution modes.

After postpone, you have to run svn resolve for each file in conflict.

If you want to see the conflicts, you can run :

svn resolve /path/to/file

select "m" for fusion

For each conflict, you see both versions. You can choose to use your version, theirs, a mix (your then theirs, their then yours) or to edit one or both version.

Exemple :

    Conflicting section found during merge:
        (1) their version (à la ligne 88)    |(2) your version (à la ligne 77)  
        -------------------------------------+----------------------------------
        text = new_box(name, column, option) |  text = new_box(name, column) 
        -------------------------------------+----------------------------------

        Select: (1) use their version, (2) use your version,
                (12) their version first, then yours,
                (21) your version first, then theirs,
                (e1) edit their version and use the result,
                (e2) edit your version and use the result,
                (eb) edit both versions and use the result,
                (p) postpone this conflicting section leaving conflict markers,
                (a) abort file merge and return to main menu: 2

then you choose "r" to mark the conflict resolved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM