我有一个修订版58092,我想把它修改为HEAD。在58092修订后,我在trunk文件夹中有4个提交。我试过svn merge -r 58092:HEAD但我收到错误
svn: E205001: Try 'svn help merge' for more information
svn: E205001: Merge source required
答案 0 :(得分:2)
您在merge命令中缺少SOURCE参数。这是命令的签名:merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [TARGET_WCPATH]
。
您不想将rev 58092-HEAD应用于您的工作副本,您要删除它。因此,请尝试-r HEAD:58092。
总之,我认为这应该有用(假设你在你的分支的根目录。
svn merge -r HEAD:58092 .
以下是SOURCE
的更多信息:
SOURCE specifies the branch from where the changes will be pulled, and
TARGET_WCPATH specifies a working copy of the target branch to which
the changes will be applied. Normally SOURCE and TARGET_WCPATH should
each correspond to the root of a branch. (If you want to merge only a
subtree, then the subtree path must be included in both SOURCE and
TARGET_WCPATH; this is discouraged, to avoid subtree mergeinfo.)
SOURCE is usually a URL. The optional '@REV' specifies both the peg
revision of the URL and the latest revision that will be considered
for merging; if REV is not specified, the HEAD revision is assumed. If
SOURCE is a working copy path, the corresponding URL of the path is
used, and the default value of 'REV' is the base revision (usually the
revision last updated to).
TARGET_WCPATH is a working copy path; if omitted, '.' is generally
assumed. There are some special cases:
- If SOURCE is a URL:
- If the basename of the URL and the basename of '.' are the
same, then the differences are applied to '.'. Otherwise,
if a file with the same basename as that of the URL is found
within '.', then the differences are applied to that file.
In all other cases, the target defaults to '.'.
- If SOURCE is a working copy path:
- If the source is a file, then differences are applied to that
file (useful for reverse-merging earlier changes). Otherwise,
if the source is a directory, then the target defaults to '.'.