如何在Mercurial中将文件从一个分支签出到另一个分支? [英] How to checkout a file from one branch to another in Mercurial?

查看:58
本文介绍了如何在Mercurial中将文件从一个分支签出到另一个分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Mercurial中将单个文件从一个分支签出到另一个分支?

How to checkout a single file from one branch to another in Mercurial?

基本上我想将单个文件从分支experimental复制到另一个分支production.

Basically I want to copy a single file from a branch experimental to another branch production.

推荐答案

您可以使用hg cat -r experimental filename显示任何版本的任何文件.但是这种行为看起来像是调试补丁,在这种情况下,我将考虑transplant ing(在其他DVCS中进行樱桃挑选).

You can show any file at any revision with hg cat -r experimental filename. But this kind of behavior looks like a debugging patch, in which case I would consider transplanting (cherry-picking in other DVCS).

hg revert -r experimental filename可以做到,未经测试.

hg revert -r experimental filename could do it, not tested.

这篇关于如何在Mercurial中将文件从一个分支签出到另一个分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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