Steve Borho wrote: > Wagner Bruna wrote: >> I tried to use a backward update to transfer a change between >> named branches, but thg doesn't allow a merge on update if >> the destination is on another named branch - even if it's an >> ancestor of the current revision. >> >> I see there's an explicit test for that at: >> >> http://bitbucket.org/tortoisehg/stable/src/319fa452b1f4/tortoisehg/hgtk/update.py#cl-212 > > I can't speak to the exact logic, but the intent was to mirror > Mercurial's internal logic and disallow any backwards merge that would > cause Mercurial to abort. Did you try the update from the command > line to see if hg was ok with it?
Yes, the merge on update (on both directions) works fine from the command line. According to "hg help update", the restrictions for updating between branches only apply if the destination is not explicitely given; if it is, a merge will always be attempted if the current/requested revision is an ancestor of the requested/current one, regardless of named branches. And since the update dialog always give an explicit target revision, simply removing the named branch test would match better Mercurial's logic. I'm attaching a simple patch for that. Thanks! Wagner # HG changeset patch # User Wagner Bruna <wbr...@yahoo.com> # Date 1264447558 7200 # Branch stable # Node ID 3be4d5da2a2da20bf024c4f688e897f78589a9ff # Parent d6881c0e32d28706cb2cdf9afe9c397d9f6c1274 update: do not restrict merging across named branches diff --git a/tortoisehg/hgtk/update.py b/tortoisehg/hgtk/update.py --- a/tortoisehg/hgtk/update.py +++ b/tortoisehg/hgtk/update.py @@ -213,8 +213,7 @@ if clean is None: clean = isclean() pa = p1.ancestor(p2) - return not clean and p1.branch() == p2.branch() and \ - (p1 == pa or p2 == pa) + return not clean and (p1 == pa or p2 == pa) def confirmupdate(clean=None): if clean is None: clean = isclean() ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop