Mercurial工作流程是否可以进行未提交的更改进行更新? [英] Mercurial workflow for updating with uncommitted changes?

查看:122
本文介绍了Mercurial工作流程是否可以进行未提交的更改进行更新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我已经将我的网站从CVS转换为Mercurial.

So i've made the switch from CVS to mercurial for my website.

我遇到的最大问题是,如果我正在处理一些我不想提交的文件,我只保存它们即可.然后我还有其他文件要推送到服务器,但是如果有人否则,我对存储库进行了更改.我要求将它们合并..这些选项中的任何一个都会导致我丢失尚未提交的本地更改.

The biggest issue I am having is that if i'm working on some files that I don't want to commit, I just save them.. I then have other files I want to push to the server, however if someone else has made changes to the repository, and I pull them down.. It asks me to merge or rebase.. either of these options will cause me to lose my local changes that I have not committed.

我读到我应该在本地主机上为每个项目克隆存储库,并在准备好将其合并到实时环境中时将其合并.这不仅看起来很乏味,而且由于它是一个大型存储库,还需要很长时间.

I've read that I should clone the repository for each project on my local host and merge it into the live when it's ready to do so. This not only seems tedious, but also takes a long time as it's a large repository.

是否有更好的解决方案?

Are there better solutions to this?

我希望Mercurial能够看到我尚未提交更改(即使我已经从服务器上的文件中更改了文件),所以它只会忽略该文件.

I would have hoped that Mercurial would see that I haven't committed my changes (even though I have changed the file from what's on the server) so it'd just overlook the file.

任何对此的投入将不胜感激.谢谢!

Any input on this would be greatly appreciated. Thank you!

此外,我正在使用hg eclipse插件处理我的文件,并从服务器进行推/拉.

Also, i'm using the hg eclipse plugin to work on my files and push/pull from the server.

推荐答案

hg shelve是您的朋友.

来自货架扩展(也许-见下文)

从概述:

货架扩展提供了 搁置命令让您选择 哪些部分发生了变化 您要设置的工作目录 暂时放在细微的位置 补丁大块头.以后可以还原 搁置的补丁块使用 取消搁置命令.

The shelve extension provides the shelve command to lets you choose which parts of the changes in a working directory you'd like to set aside temporarily, at the granularity of patch hunks. You can later restore the shelved patch hunks using the unshelve command.

搁置扩展名已改编 来自Mercurial的RecordExtension.

The shelve extension has been adapted from Mercurial's RecordExtension.

或其阁楼扩展名

此模块处理一组 在.hg/attic文件夹中打补丁.在 任何时候只要搁置当前 工作副本在那里更改或搁置 文件夹中的补丁.

This module deals with a set of patches in the folder .hg/attic. At any time you can shelve your current working copy changes there or unshelve a patch from the folder.

它似乎与扩展名具有相同的语法,所以我不确定我使用的是哪一个

it seems to have the same syntax as the shelve extension, so I'm not certain which one I've used

这篇关于Mercurial工作流程是否可以进行未提交的更改进行更新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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