通过推送抽象频繁的本地提交? [英] Abstracting frequent local commits with a push?

查看:57
本文介绍了通过推送抽象频繁的本地提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我从Subversion切换到Mercurial,并很高兴了解local commits.

Recently I switched to Mercurial from Subversion and was excited to learn about local commits.

但是,我的工作流程与当前的工作流程不同.

However I had a different workflow in mind than how it currently works.

我经常执行 次提交,即我到中央存储库的单个push涉及5-6个本地commit changesets,每个本地都有commit log.但是,我以后不在乎看到/还原到这些单独的commits,而是在我的单个push上.我希望将此push操作看作是对具有单个push log的多个本地commits的抽象,并且所有变更集都合并为一个changeset.

I perform very frequent commits, ie. my one single push to a central repository involves 5-6 local commit changesets each with their commit log. However I wouldn't care to see/revert to these individual commits later in the future but to my single push. I was hoping to see this push operation as an abstraction for my multiple local commits with a single push log and all changesets merged into one changeset.

推荐答案

它高度取决于您要实现的目标,但是您可以使用MQ扩展来修改您在第一名.

It highly depends on what you want to achieve, but you can use the MQ extension to modify the local commits (which MQ convert into patches) you do in the first place.

您可以将两个补丁折叠为一个,或刷新现有补丁,添加更多更改.

You can fold two patches into one, or refresh an existing patch, adding more changes.

关于什么是理想的历史,有两种哲学:

There are two philosophies about what history is ideal:

  • 提交应保持原样,完好无损或
  • 历史记录应该包含无所不知的开发人员所做的提交,就好像它们是在理想的世界中所做的一样.

如果您喜欢后一种方法,MQ效果最好.

MQ works best if you like the latter approach.

这篇关于通过推送抽象频繁的本地提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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