1

I know that there's a bunch of topics already, but I've really got hard times with svn in my situation. I have nested trunk directories all around, something like this:

product_name/trunk/product_module/trunk

this is annoying but this is not my choice, and migration to git will be possible only in 2 month, so I'm confused with dir path all the time.

question is: how can I merge product_name/trunk/product_module/trunk/ to product_name/trunk/product_module/branches/uat without transferring all previous commit messages, so that branch uat would only contain merge-commits messages. I'm actually don't want to deal with revision id's if possible. maybe svn copy can do this job?

EDIT: This is not duplicate, question is about merging branches, not moving repositories. The one who voted for closing obviously haven't worked with svn at all if they can't see difference between merging repos and branches. Different tools, different pattern and action and even scenario. And I want full command with all my quoted paths please.

holms
  • 9,112
  • 14
  • 65
  • 95
  • SVN doesn't move changes, it actually merges them producing single commit. Have you tried "svn merge .../trunk" in working copy of "branches/uat"? If yes, then what exactly is wrong? – maxim1000 Apr 16 '13 at 10:40
  • as far as I tried svn merge doesn't work without specifying revision id – holms Apr 16 '13 at 10:43
  • I'll admit some confusion about how you've worded this, but I'm guessing you want to create a fresh branch, with no previous commit history for the branch aside from a "Branch merged from X"? – Nicholas Smith Apr 16 '13 at 12:38
  • no, i need to merge trunk into existing branch. merge-commits are fine. if you'll merge `branch` to `master` in `git` for example, all your 200 commits from branch will be merged into master tree (even if you'll perform rebase.. ). in git this can be achieved with --no-ffs flag when merging branch to master. then you'll have on master main tree only merge-commit messages and nothing more. i want to do the same in svn. i want to see only merge-commit message, and not the whole history of every edit. this can be achieved just by replacing branch dir each file (running loop for now).. – holms Apr 16 '13 at 14:21
  • so I'm searching how to implement this using svn tool. `svn copy` probably can do this, but it's doesn't work on existing branch, that means you loose all merge-commits history.. doing this in normal way with `svn merge -rID trunk_path branch_path` it works, but it's hard to deploy this kind of thing.. i would like to merge without revision id. now i hope you understand. – holms Apr 16 '13 at 14:32

1 Answers1

1

I am not sure if I understand your question correctly. However, it sounds like a simple question.

You can merge all unmerged changed from trunk to branch with the following command, executed in the working directory of the branch, and without using rev ids:

svn merge ^/product_name/trunk/product_module/trunk

Subversion can distinguish between merge commits and regular commits. The following command only shows the merge commit:

svn log

If you want to see the merge history, you can use the option -g (same as --use-merge-history):

svn log -g
nosid
  • 48,932
  • 13
  • 112
  • 139