简体   繁体   中英

After svn merge, does the previous revision got mixed up

I have questions about the svn merge regarding to the following situation:

repo/A is trunk. It has two child branch call repo/B and repo/C

  1. let's say originally repo/B has revision 10.
  2. repo/C merge foo.c to repo/A, the revision becomes 11.
  3. repo/B 's working copy commit bar.c to repo/B, the revision becomes 12. Note at this time repo/B doesn't have foo.c. Let's call this "NO-FOO-STATE".
  4. Now repo/B got merged from repo/A and got the foo.c, the revision becomes 13 in repo/B.

My questions are:

  1. So now if I check out revision 12 from repo/B. I will also get the foo.c in my working directory, right? How do I (or am I able to) check out revision 12 with exactly same content as "NO-FOO-STATE"?

  2. If I use following command sudo code:

svn delete repo/B

svn copy repo/B@12 repo/B

I try to revert to revision 12 by deleting repo/B and svn copy repo/B@12. Does the new reverted repo/B still have foo.c? If yes, how can I revert to "NO-FOO-STATE".

Thanks a lot.

if I check out revision 12 from repo/B. I will also get the foo.c in my working directory, right?

No, you will not get foo.c in R12 from repo/B, only in R13

In order to checkout any non-HEAD revision of repo-tree, use PEG-revisions format:

svn co URL@REV

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