在主干中查找创建分支的修订版 [英] Find revision in trunk that a branch was created from

查看:16
本文介绍了在主干中查找创建分支的修订版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将主干中的最新更改合并到我的项目的一个分支中,但问题是我不知道我最终从哪个主干版本创建了分支.我认为 SVN 在某处记录了这个.有谁知道如何找到修订号?

I am trying to merge the latest changes from trunk into a branch of my project, but the problem is I don't know what revision of the trunk I checked out that I eventually created the branch from. I would think SVN logged this somewhere. Does anyone know how I can find the revision number?

(换句话说,Subversion 相当于 git merge-base master branch-name)

(In other words, the Subversion equivalent of git merge-base master branch-name)

推荐答案

在命令行中,--stop-on-copy 标志可用于帮助您显示从何处复制分支:

From the command line, the --stop-on-copy flag can be used to help show you where you copied a branch from:

svn log --stop-on-copy --verbose --limit 1 -r0:HEAD ^/branches/feature

(其中 feature 是您的分支名称)

(where feature is the name of your branch)

最后一行会这样说:

Changed paths:
   A /branches/feature (from /trunk:1234)

这篇关于在主干中查找创建分支的修订版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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