[issue92] merge can capture uncommitted changes

Matt Mackall mpm at selenic.com
Thu Dec 15 04:13:43 UTC 2005


On Mon, Dec 12, 2005 at 07:15:22PM +0100, Benoit Boissinot wrote:
> On 12/12/05, Bryan O'Sullivan <mercurial-bugs at selenic.com> wrote:
> > New submission from Bryan O'Sullivan <bos at serpentine.com>:
> >
> > I ran into a situation last week that I think could do with some addressing.
> >
> > I made some changes in two different copies of a repository, remote and local.
> > Made some further changes in the local repo, but never committed them.
> > Pulled the changes from remote into local.
> > Forgot I had uncommitted changes in local, did an update -m.
> > The result was a merge of the remote repo contents, the local repo contents,
> > and the uncommitted stuff I hadn't intended to commit.
> >
> > This seems like it should be an easy situation to detect and abort on, with the
> > abort sowngradeable to a warning if it turns out to have been deliberate.
> >
> > This wasn't the first time I accidentally committed unintended changes by doing
> > a merge.
> >
> please try the following patch
> 
> thanks,
> 
> Benoit
> 
> # HG changeset patch
> # User Benoit Boissinot <benoit.boissinot at ens-lyon.org>
> # Node ID 85f252b9b2c7f2f51c2208564919365c7965e356
> # Parent  35ae4bf94129625adbecff6bfd71e22e456bce0a
> abort when merging two heads and repository has local changes

Looks good, thanks.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list