gpt4 book ai didi

eclipse - Mercurial 工作流程是否可以通过未提交的更改进行更新?

转载 作者:行者123 更新时间:2023-12-02 10:55:34 26 4
gpt4 key购买 nike

因此,我已将我的网站从 CVS 切换到 Mercurial。

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

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

有更好的解决方案吗?

我希望 Mercurial 能够看到我没有提交更改(即使我已经更改了服务器上的文件),因此它只会忽略该文件。

对此的任何意见将不胜感激。谢谢!

此外,我正在使用 hg eclipse 插件来处理我的文件并从服务器推送/拉取。

最佳答案

hg shelve 我想是你的 friend 。

来自shelve extention (也许 - 见下文)

从概述来看:

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.

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

或者可能是attic extension

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.

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

关于eclipse - Mercurial 工作流程是否可以通过未提交的更改进行更新?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6390436/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com