将TFS 2010中的源,标签和历史记录从根文件夹移动到分支中 [英] Moving source, labels, and history in TFS 2010 from root folder into a branch

查看:48
本文介绍了将TFS 2010中的源,标签和历史记录从根文件夹移动到分支中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定我是否可以解决这个问题。

I've got a situation that I'm not sure if I can work around.

我最近开始组建一个从未使用过任何新产品的团队版本控制系统的类型,并且我们的组织使用TFS作为标准(我以前从未使用过)。

I've recently started on a new team that had never used any type of Version Control system, and our organization uses TFS as a standard (which I'd never used before).

经过很多辩护,我让管理员在服务器上为我现有的代码创建一个TFS项目,并且由于没有任何项目代码被检入(存在多年后),因此我希望尽快在版本控制中进行检入,因此我将项目检入到以下目录的根文件夹中该项目。尚未阅读 http://tfsbranchingguideiii.codeplex.com/ 上的分支策略,我没有设置主

After a lot of pleadind, I got the admins to creat a TFS project for my existing code on our server, and since none of my project's code had ever been checked in (after many years of existence), I wanted it in version control asap, so I checked my project into the root folder of the project. Not having read the Branching Strategy at http://tfsbranchingguideiii.codeplex.com/ I hadn't setup "Main" and "Release" folders in my main project.

当时,我在本地工作站上有单独的文件夹,其中包含我们制作的不同版本。我签入了每个版本,并用发行号标记了它,然后在其上签入了下一个版本。

At the time, I had separate folders on my local workstation containing the different releases we had made. I checked each version in, labeled it with the release number, and then checked the next version in on top of that.

我现在遇到了问题/错误我以前的发行版中的一个,而我正尝试分拆标签,以便对其中一个发行版进行一些更改。 TFS引发错误,我无法在该位置创建分支(因为所有源都在主项目文件夹下)。

I'm now running into an issue/bug with one of my previous releases and I'm trying to branch off a label in order to make some changes in one of my releases. TFS throws an error that I can't create a branch in that location (because all of the source in under the main project folder).

我尝试创建一个分支主和发布文件夹,然后将所有源移动到主文件夹下,但麻烦的是,历史记录和标签固定在原始位置,即根文件夹。如果我尝试分支标签,则该标签在将代码移至的主文件夹中不存在,而是在其创建位置(根目录中)存在。

I've tried creating a "Main" and "Releases" folder, and then moving all the source under the Main folder, but the trouble is that the history and labels are pinned to the original location which is the root folder. If I try to branch off a label, the label doesn't exist in the "Main" folder that I moved the code to, but rather where it was created (in the root).

这样,当我尝试从标签进行分支时,TFS仍在尝试从根文件夹分支。

As such, TFS is still trying to branch from the root folder when I attempt a branch from the label.

我的问题是:作为管理员对于服务器,是否有办法将所有(来源,历史记录和标签)从其原始位置移出?

My question is this: As an administrator for the server, is there a way to move everything (source, history, and labels) from their original location?

谢谢!

推荐答案

我认为您无法移动历史记录和标签。如您所说,它们绑定到原始源位置。搬家实际上是重命名。

I don't think you can "move" the history and the labels. As you say, they're bound to the original source location. A move is effectively a rename.

根据我的经验,即使将文件夹重命名为已删除的文件夹,也导致这些新文件夹获得了已删除文件夹的历史记录。

In my experience, even renames of folders to folders that were deleted have caused those new folders to acquire the deleted folder's history.

您是否考虑过将当前团队项目分支到另一个团队项目,同时观察新团队项目中所需的文件夹结构。

Have you considered branching your current team project into another team project while observing the folder structure that you want in the new team project.

使用所需的文件夹结构创建一个新的团队项目。例如:

Create a new team project with the folder structure you want. E.g.:


  • / NewTeamProject

    • / Main(分支到此处)

      • / Src(或任何根源文件夹)

      • / Doc

      然后您可以保留老团队围绕保险​​项目。

      You can then keep the old team project around for "insurance".

      它显示了具有合理考虑的文件夹结构的实用性。

      It shows how helpful it is to have a reasonably thought-out folder structure.

      这篇关于将TFS 2010中的源,标签和历史记录从根文件夹移动到分支中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆