简体   繁体   English

工作副本(分支)中的单个文件指向TortoiseSVN下的主干?

[英]Single file in a working copy (branch) pointing to trunk under TortoiseSVN?

Got a very strange problem. 有一个非常奇怪的问题。

I've got a working copy which is from a branch. 我有一个来自分支机构的工作副本。 When I commit any changes from this working copy, one single file in the working copy gets committed to the trunk. 当我提交对该工作副本的任何更改时,工作副本中的一个文件都会提交到主干。

If I right-click this single file and click Commit the SVN URL displayed points to the /trunk and not the branch. 如果我右键单击该单个文件,然后单击“提交”,则显示的SVN URL指向/ trunk而不是分支。

How on earth could this happen? 这怎么可能发生? I used TortoiseSVN to create the branch in the first place. 我首先使用TortoiseSVN创建分支。

How can I fix this? 我怎样才能解决这个问题?

With Tortoise, creating a branch does not switch your working copy to it - it will remain on the trunk. 使用Tortoise,创建分支不会将您的工作副本切换到该分支,而是保留在树干上。 To switch the working copy, use Switch... from the Tortoise context menu, or check out the branch as a different working copy. 要切换工作副本,请使用Tortoise上下文菜单中的“切换...”,或将分支作为其他工作副本签出。

I've managed to fix this by using the SVN switch command on the single file and correctly point it to the branch. 我设法通过在单个文件上使用SVN switch命令来解决此问题,并将其正确指向分支。

Not sure why this happened, it seems when TortoiseSVN created the branch and switched the working copy it did not switch this one single file. 不知道为什么会这样,似乎在TortoiseSVN创建分支并切换工作副本时,它并没有切换该单个文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM