Tortoise SVN 合并“@### 必须与@### 有祖先相关";错误 [英] Tortoise SVN Merge "@### must be ancestrally related to @###" Error

查看:31
本文介绍了Tortoise SVN 合并“@### 必须与@### 有祖先相关";错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景故事:获得了一份入门级 Web 开发人员的工作.当我开始时,首席开发人员就离开了.一切责任在我.没用过SVN.盲目进入.

Backstory: Got a job as an entry level web developer. Head developer leaves right when I start. All responsibility on me. Never used SVN. Going in blind.

问题:
我不断收到像

Problem:
I keep getting errors like

'svn://svn/svn/xxx/project_name/branches/dev@330' must be
ancestrally related to 'svn://svn/svn/xxx/project_name/trunk@326'

我开始新项目的过程是:

The process by which I am starting the new project is:

  1. 在我的计算机上为项目创建一个包含子文件夹的目录:
    project_name/branches
    project_name/branches/dev
    project_name/tags
    project_name/trunk

右击项目根目录,选择我的项目根目录,添加到仓库

Right click the project root, select my project root, and Add it to the repository

(以下是我必须为当前项目做的事情,这对它们没有问题,但在合并时会中断新项目)

(All that follows are what I have to do for current projects, and this works no problem in them, but breaks for new projects at the merge)

Commit "dev" 分支

不熟悉 SVN,我对此感到非常困难.正如我所说,在现有项目上做 3-6 行是可行的,但在新项目上,我得到 must be ancestrally related to 合并错误.那么,我做错了什么?非常感谢所有任何帮助.

Not being familiar with SVN, I am having a really tough time with this. As I said, doing 3-6 on existing projects works, but on new ones, I get the must be ancestrally related to error on merge. So, what am I doing wrong? All and any help is greatly appreciated.

推荐答案

[thatidiotguy][1] 关于不通过主干副本创建的观点可能是正确的.

[thatidiotguy][1] is probably right about not creating via a copy from trunk.

如果您在 dev 分支上使用 svn log --verbose --stop-on-copy,则最早的条目应显示您从何处复制该分支.

If you use svn log --verbose --stop-on-copy on the dev branch, the earliest entry should show where you copied the branch from.

TortoiseSVN 的 svn log 功能也是一样的;复制时停止是日志窗口中的一个复选框.

TortoiseSVN's svn log function works the same way; stop on copy is a checkbox in the log window.

如果不是从副本创建的,则无法合并回来.

If you didn't create it from a copy, then it can't be merged back.

您需要重新创建 dev 分支并重新应用您的更改.

You'd need to recreate the dev branch and reapply your changes.

更新:通过重新创建开发分支",我的意思是为开发创建一个新分支,它是主干上的实际 svn 副本(分支).如果使用 svn copy trunk/[application subfolder] branch/[application subfolder - name of branch] 创建分支,svn 将记录原始源版本.这允许将主干/基础版本中的更改智能合并到分支中(以修复缺陷、添加功能等)复制完成后,您可以从原始源复制更改的文件,并将它们作为对代码的正常更改提交.

Update: By "recreate the dev branch", I mean make a new branch for development, which is an actual svn copy (branch) off of the trunk. If you create the branch using svn copy trunk/[application subfolder] branch/[application subfolder - name of branch], svn will record the original source version. This permits intelligent merging of changes in the trunk/base version into the branch (to fix defects, add features, etc.) Once the copy is made, you can copy over the changed files from the original source, and commit them as normal changes to the code.

如何在 subversion 中替换分支?

https://stackoverflow.com/users/821722/thatidiotguy

这篇关于Tortoise SVN 合并“@### 必须与@### 有祖先相关";错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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