如何保持本地汞储存库的未提交更改,同时仍然推/拉?使用hgeclipse [英] How to keep uncommitted changes in a local mercurial repository, while still pushing/pulling? Using hgeclipse

查看:176
本文介绍了如何保持本地汞储存库的未提交更改,同时仍然推/拉?使用hgeclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到的最大的问题是,如果我正在处理一些我不想提交的文件,那么我只需要保存它们。然后我想要将其他文件推送到服务器,但是如果有人否则已经对存储库进行了更改,我把它们拉下来..它要求我合并或修改。这些选项之一会导致我丢失我没有提交的本地更改。



其他人还在做什么来解决这个问题?我发现搁置扩展的文档很难让我的头脑。..



我正在使用Mercurial Eclipse将文件推送到服务器/从服务器上拉。对此的任何解释将不胜感激!谢谢!



示例:



我正在Mercurial Eclipse的网站上工作..我有一个新的文件夹和新文件,我不想提交到服务器。我还修改了一些现有文件,我不想让这些更改生效。然后我的网站上的某些东西就会崩溃,我需要修复它,它不会让我修复它,而不需要重新添加或者与最近一次的repo合并,这将导致我丢失所有我未提交的更改。如果我不想失去,我应该怎么处理我的新文件夹和文件?重新克隆似乎乏味。将文件复制到新文件夹似乎很乏味。我确定Shelving或MQ会做我想要的,我只是不知道该怎么做。

解决方案

我相信有人会帮助你找到一个坏的解决方法,但最好的方法是改变你的目标 - 只是提交。未提交的代码尚未写入。如果您肯定不能在您的历史中频繁提交使用Mercurial Queues与队列存储库并提交。然后,您可以弹出更改集,推/拉/合并,然后重新启动,所有有价值的工作将在补丁队列中提交。


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.

What are other people doing to get around this? I find the documentation for the shelving extension hard to get my head around..

I'm using Mercurial Eclipse to push and pull files to/from the server. Any explanation of this would be greatly appreciated! Thanks!

Example:

I'm working on my website in Mercurial Eclipse.. I have a new folder and new files that I don't want to commit to the server just yet. I've also modified some existing files and I don't want to make those changes live just yet. Then something on my website breaks and I need to fix it, it won't let me fix it without rebasing or merging with the most recent tip of the repo and this will cause me to lose all my uncommitted changes. What should I do with my new folder and files i've edited if I don't want to lose it? Re-cloning seems tedious. Copying the files to a new folder seems tedious as well. I'm sure Shelving or MQ will do what I want, I just don't know how to go about it yet.

解决方案

I'm sure someone will help you find a bad workaround, but the best route is to change you goals -- just commit. Code that hasn't been committed hasn't been written. If you positively can't abide having frequent commits in your history use Mercurial Queues with a queue repository and commit that. You can then pop the changesets, push/pull/merge, and the push them back on, and all you valuable work will be committed in the patch queue.

这篇关于如何保持本地汞储存库的未提交更改,同时仍然推/拉?使用hgeclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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