[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mercurial
Subject:    RE: do not abort with 'update -m',
From:       "Zakirov, Salikh" <salikh.zakirov () intel ! com>
Date:       2006-01-31 16:52:55
Message-ID: E124AAE027DA384D8B919F93E4D8C708011CADC1 () mssmsx402nb
[Download RAW message or body]

> > I would also like to have 'hg merge' support fully automated mode
> > for simple merges, i.e. perform simple merges directly in the
database,
> > without requiring working copy and commit operation.
> >
> > The background for this requirement is an intention to try Hg in
team
> > development, where most of the development is non-conflicting, and
> > lifting the merge responsibility from individual developers looks
> > reasonable.
> 
> I don't see what these things have to do with each other.  Merges are
> already non-interactive in the simple non-conflicting case; you just
> have to run a commit at the end.  Some other tools do away with the
need
> for a manual commit in such cases, and do the commit for you with an
> auto-generated message.  It doesn't affect usability much either way.

You are right, I should have thought about it before.
The script could make the commit automatically too.

I've just experimented a little bit.
Assuming that I'm developing the script which will sit on the central
repository,
do 'hg heads' every once in a while, and try to merge if the divergence
was detected.

1) I need to configure '[ui] merge=/bin/false' or '[ui]
merge=/usr/bin/merge' 
to prevent default editor popping up.

2) 'hg update -m' indeed returns status code 1 on failed merge. 
/bin/false does not touch files at all, and
/usr/bin/merge leaves the conflict files all around
Probably, I could write-up some smart script, that tries to merge the
temporary files, and move them in place only in the case of successful
merge.

3) After the failed merge, the workspace may have a bunch of conflict
files
and has two parents (intended for the manually merge).

Since the script isn't going to do any manual merge, then it will have
to
clean up with additional 'hg update -C <whatever>' command.

4) Then we have also do a 'find . -name \*.orig | xargs rm -f' to bring
the workspace into really clean state

Indeed, the problem is not that hard to solve, but if 'hg merge' 
supported automatic clean merge internally (without dealing with
workspace),
that would tremendously improve the usability of Hg *for this particular
purpose*.

Thanks a lot!

_______________________________________________
Mercurial mailing list
Mercurial@selenic.com
http://selenic.com/mailman/listinfo/mercurial
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic