SVN issue when committing and updating from branch
I'm fairly new to SVN and I have a weird behavior issue.
I'm working in a branch of code and when I commit code, it says it is commiting to: "https://10.1.1.3:8443/svn/ProjectName" and shows the files that have changes made as "branches/branchName/src/fileName.cs". Works just fine, shows modified content in "c:\projects\ProjectName\branches\branchName\src\fileName.cs", sends content, done.
Now when I update from the root, it comes back with "Updated c:\Projects\ProjectName\trunk\src\fileName.cs".
How do I prevent my branch code from getting updated into the trunk? I'm guessing the he开发者_JS百科ad is pointing to the wrong place, but like I said, I'm new to this.
Many thanks!
It sounds like your c:\Projects\ProjectName\trunk\src and c:\Projects\ProjectName\branchName\src might actually be pointing to the same repository location.
To check this, right-click on c:\Projects\ProjectName\trunk\src and c:\Projects\ProjectName\branchName\src, choose Properties, go under the Subversion tab, and check the URL.
If they do point to the same repository location, then you'll need to fix it. One way to fix it is to simply delete everything (after committing any changes, of course) and check it out again. Another fix is to right-click on the directory, choose TortoiseSVN Switch, and enter the correct URL.
If you are properly switched into your branch, then SVN updates will NOT be grabbed from any updates made into the trunk.
First check the SVN URL of what you have checked out is. You can do this by right clicking and selecting TortoiseSVN->Switch...
. It will list the SVN path of the repository that you're switched into. Make sure c:\Projects\ProjectName\trunk
and c:\Projects\ProjectName\branches\branchName
have different URLs.
Also make sure your branch directory is fully switched into the branch URL. Go to your base directory that you checked out for your branch and do an svn switch and ensure that your entire tree is switched into your branch.
If you do Properties of the C:\Projects\ProjectName\trunk folder, and select the Subversion tab, where does it say in the repository that is pointing to?
My guess is that it's also pointing to /branches/branchName in your repository, as Subversion doesn't automatically update the trunk from a branch (and there's no way to make it short of making a hook script.)
精彩评论