partial commits
Steve Borho
steve at borho.org
Thu Aug 6 21:49:16 CDT 2009
On Thu, Aug 6, 2009 at 4:51 PM, Edward Peschko<horos11 at gmail.com> wrote:
> All,
>
> I've been using mercurial for a month now, and there is one thing that
> I've noticed which is fairly annoying..
>
> That has to do with partial commits. Say I modify 3 files - totally
> unrelated changes, they so happen to work with each other but I want
> to track them separately, and then I get 1 file working (and want to
> commit and push it).
>
> As it stands, there is no easy way to do this. I can modify that one
> file, and commit it, but as it stands there is no good way to push it
> - that I can see - without committing the other two files. I can pull,
> and update, but when I try to push it says:
>
> - abort: push creates new remote branches! (did you forget to
> merge? use push -f to force)
>
> So, I try to merge. And when it does so, I get:
>
> - abort: outstanding uncommitted changes
>
> which means that I have to enter in all my changes into mercurial
> before I do a merge.
>
> Why? Couldn't mercurial do automatically what I need to do manually,
> namely make a patch based on the current branch, move it to a separate
> location, do the merge, and then apply the patch on top of it? If this
> functionality is already available, how do I do this?
You can do this textually with the attic extension, or graphically
with the shelve tool of TortoiseHg. Both allow you to pull changes
out of your working directory, store them in a patch, and re-apply
them later. MQ can also do this, but in a less straight-forward way.
--
Steve Borho
More information about the Mercurial
mailing list