Aborting commit: 'xxxxxxxx' remains in conflict error)

Source: Internet
Author: User
Tags svn update

The following error is prompted when submitting the project file to local SVN today:

Expiration: "Global. php" in transaction "21-1",
You have to update your working copy first.

The following error occurs when you submit the update statement again:

SVN: commit failed (details follow): SVN: Aborting commit: 'Global. php' remains in conflict check the svn manual to know that there is a conflict between multiple versions. In this case, you need to resolve the conflict (merge others' modifications ).
--------------------------------------------------------------------------------

As an example, sallymodified sandwich.txt. Harry just changed the file in his local copy and submitted it to the server. Sally updated its copy of work before submission:

$ SVN update C sandwich.txt updated to Revision 2. $ LS-1 sandwich.txt mine. sandwich.txt. R1 sandwich.txt. r2

In this situation, subversiondoes not allow you to submit sandwich.txt until the three temporary files are deleted.

$ SVN commit -- message "add a few more things" SVN: commit failed (details follow): SVN: Aborting commit: '/home/Sally/SVN-work/sandwich.txt' remains in conflict

If you encounter a conflict, you can choose:

"Manually" the conflict text (check and modify the conflict flag in the file ).

Use a temporary file to overwrite your work file.

Run SVN revert <FILENAME> to discard all modifications.

Once you have resolved the conflict, you need to run the svn resolved command to let subversion know. In this way, three temporary files will be deleted, and the subversion will not consider the file as being in conflict state.

$ SVN resolved sandwich.txt resolved conflicted state of 'sandwich.txt'

Manual merge conflicts
The first attempt to solve the conflict was frightening, but after some training, it was simply like riding a car downhill.

This is a simple example. You edited sandwich.txt at the same time with sally. Sallysubmitted the modification. When you updated your website and the conflict occurred, we had to modify sandwich.txt to solve the problem. First, take a look at this file:

$ Cat sandwich.txt top piece of breadmayonnaiselettucetomatoprovolone <. minesalamimortadellaprosciutto ===== sauerkrautgrilled chicken >>>>>>>. r2creole mustardbottom piece of bread is less than or equal to the number and greater than the number. It is not a conflicting data. You must confirm that the content will be deleted before the next submission, the content in the middle of the first two groups of logos is your modifications in the conflict zone:

<. Minesalamimortadellaprosciutto ===== the last two groups conflict with the changes submitted by Sally:

======= Sauerkrautgrilled chicken >>>>>>>. r2. You generally don't want to delete the conflicting logo or modify Sally-it's amazing when she receives a sandwich. So you should go to her office or pick up the phone and tell Sally that you cannot get the expected kimchi from the Italian deli. Once you confirm the submitted content, modify the file and delete the conflict flag.

Top piece of breadmayonnaiselettucetomatoprovolonesalamimortadellaprosciuttocreole mustardbottom piece of bread:

$ SVN resolved sandwich.txt $ SVN commit-M "Go ahead and use my sandwich, discarding Sally's edits. "Remember, if you are confused when modifying the conflict, you can refer to the three files generated by subversion-including the files you have not updated. You can also use a third-party merge tool to check the three files.

Copy and overwrite your work file
If you just want to cancel your modification, you can simply copy the Subversion to replace your work copy with the file generated by you:

$ SVN updatec sandwich.txt updated to Revision 2. $ ls sandwich. * sandwich.txt. mine placement. R2 placement. R1 $ CP sandwich.txt. R2 placement $ SVN resolved sandwich.txt bet: Use SVN revert
If you get a conflict, after checking that you decide to cancel your modifications and re-edit them, you can restore your modifications:

$ SVN revert sandwich.txt reverted 'sandwich.txt '$ ls sandwich. * sandwich.txt note that when you restore a conflicting file, you do not need to run SVN resolved again.

Now we are ready to submit the changes. Note that SVN resolved does not need parameters like other commands we have learned in this chapter. When you think that the conflict has been resolved, you only need to be careful when running SVN resolved, -Once a temporary file is deleted, subversion will allow you to submit the file, even if there is a conflict mark in the file.

Submit your changes
Last! Your modification is complete. You have merged all the modifications on the server. You are ready to submit the modifications to the version library.

The SVN commit Command sends all the modifications to the version library. When you submit the modifications, you need to provide some log information that describes the modifications. Your information will be attached to this version, if the information is short, you can use the -- message (-m) option in the command line:

$ SVN commit -- message "corrected number of cheese slices." sending sandwich.txt transmitting file data. Committed revision 3.

However, if you write log information as part of your work, you may want to get the log information by telling subversion a file name. Use the -- file option:

$ SVN commit -- file logmsg sending sandwich.txt transmitting file data. Committed Revision 4.

If you do not specify the -- message or -- file option, subversion automatically starts your favorite editor to edit log information.

The version library does not know whether your modifications make sense as a whole. It only checks whether other people have modified the same file. If others have already done so, your entire submission will fail and you will be prompted that one or more files are out of date:

$ SVN commit -- message "add another rule" sending rules.txt SVN: commit failed (details follow): SVN: out of date: 'rules.txt 'in transaction 'G'

At this moment, you need to run SVN update to handle all the merge and conflict operations, and then try to submit.

We have covered the basic working cycle of subversion. There are many other features that can be used to manage your version library and work copy. However, you can simply work with the commands described above.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.