简体   繁体   中英

Why doesn't svn merge do anything?

I am trying to understand in detail how svn merge works.

I have a file test committed in two revisions:

in revision 230553, it has one character / (and the newline)

in revision 235554, it has one character $ (and the newline):

svn diff -r 230553:230554 test
Index: test
===================================================================
--- test        (revision 230553)
+++ test        (revision 230554)
@@ -1 +1 @@
-/
+$

The current local version, is changed back to / . Now, I expect that if do this:

svn merge test@230553 test@230554

the local copy will change to $ . But no, nothing happens, the command succeeds, does not complain, but the file test is not even touched.

What am I not understanding here?

In fact, when you run the command line svn merge test@230553 test@230554 , you are trying to apply to your local file the modifications that you have already done on revision 230554. Your problem here is that, by default, SVN does not perform the merge if the same modifications had already been done on the ancestry. So you have to ask it in a more kindly manner with the option --ignore-ancestry . This line should work:

svn merge test@230553 test@230554 --ignore-ancestry

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