How to rename an SVN branch and update references in an existing sandbox?

后端 未结 3 1359
自闭症患者
自闭症患者 2020-12-24 10:37

I needed to rename a SVN branch, so I did:

$ svn move https://server/repos/myrepo/branches/oldbranch \\
    https://server/repos/myrepo/branches/newbranch
<
相关标签:
3条回答
  • 2020-12-24 11:13

    Just do

    svn switch https://server/repos/myrepo/branches/newbranch
    

    from within your working copy.

    0 讨论(0)
  • 2020-12-24 11:16

    If you had simply wanted to rename a SVN branch in Eclipse, the easiest would have been to go into the SVN Repository Exploring Perspective, and then right click on your branch -> Refactor-> Rename

    0 讨论(0)
  • 2020-12-24 11:27

    For changing relative path you must to use pure svn switch (and anyway switch --relocate is deprecated), as written in svn help switch for 1-st form

    switch URL[@PEGREV] [PATH] Update the working copy to mirror a new URL within the repository.

     This behavior is similar to 'svn update', and is the way to
     move a working copy to a branch or tag within the same repository.
    

    I.e in the root of WC for oldbranch, which is now newbranch, you have to use

    svn switch ^/branches/newbranch

    0 讨论(0)
提交回复
热议问题