我如何知道一个分支是否已经被合并到SVN / Mercurial / Git中? [英] How do I know if a branch has already been merged in SVN/Mercurial/Git?

查看:228
本文介绍了我如何知道一个分支是否已经被合并到SVN / Mercurial / Git中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何方法可以轻易破译(即一目了然)分支是否已经先前与另一分支或中继合并?我已经能够找出最近的是通过查看提交说明并显示合并的提交说明。这样做的缺点似乎是,除非您知道从哪个分支导入了提交注释,否则无法解密哪些分支已被合并或不合并。



Edit :是Mercurial还是Git比SVN更直观? 解决方案

  svn help mergeinfo 

您得到:

  mergeinfo:显示合并相关信息。 
usage:mergeinfo SOURCE [@REV] [TARGET [@REV]]

显示与
SOURCE和TARGET(默认值:')之间的合并(或潜在合并)相关的信息。 )。如果未提供--show-revs选项
,则显示已从
SOURCE合并到TARGET的修订版本;否则,显示由--show-revs选项指定的信息
的类型。

有效的选项:
-r [--revision] ARG:ARG(某些命令也采用ARG1:ARG2范围)
修订参数可以是下列之一:
NUMBER版本号
'{'DATE'}'在日期开始时修订
'HEAD'存储库中的最新版本
'BASE'项目工作副本的基本版本
'COMMITTED '最后在BASE
'PREV'修订版之前或之前在COMMITTED之前提交
--show-revs ARG:指定显示哪些修订集合
('merged','eligible')


Is there any way of easily deciphering (i.e. at a glance) whether or not a branch has already previously been merged with the another branch or the trunk? The nearest I've been able to figure out is by looking at the commit notes and displaying the merged commit notes. The disadvantage with this seems to be that unless you know which branch the commit notes are imported from, there's no way to decipher which branches have already been merged or not.

Edit: Is Mercurial or Git any more intuitive than SVN for this?

解决方案

Type:

svn help mergeinfo

And you get:

mergeinfo: Display merge-related information.
usage: mergeinfo SOURCE[@REV] [TARGET[@REV]]

  Display information related to merges (or potential merges) between
  SOURCE and TARGET (default: '.').  If the --show-revs option
  is not provided, display revisions which have been merged from
  SOURCE to TARGET; otherwise, display the type of information
  specified by the --show-revs option.

Valid options:
  -r [--revision] ARG      : ARG (some commands also take ARG1:ARG2 range)
                             A revision argument can be one of:
                                NUMBER       revision number
                                '{' DATE '}' revision at start of the date
                                'HEAD'       latest in repository
                                'BASE'       base rev of item's working copy
                                'COMMITTED'  last commit at or before BASE
                                'PREV'       revision just before COMMITTED
  --show-revs ARG          : specify which collection of revisions to display
                             ('merged', 'eligible')

这篇关于我如何知道一个分支是否已经被合并到SVN / Mercurial / Git中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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