[PATCH] fetch: do not count closed branches when attempting to infer a merge
Matt Mackall
mpm at selenic.com
Mon Mar 16 16:05:37 CDT 2009
On Mon, 2009-03-16 at 16:50 -0400, Benjamin Pollack wrote:
> # HG changeset patch
> # User Benjamin Pollack <benjamin at bitquabit.com>
> # Date 1237236094 14400
> # Node ID 8c31859c7bd5fb14a36af569153429125a195c3c
> # Parent 55bd03e2e13c65eeb7175abfc60f9a6ef5e6f0f4
> fetch: do not count closed branches when attempting to infer a merge
>
> The fetch extension appeared broken under Mercurial 1.2 because it did
> not check whether a branch was closed when attempting to infer a
> merge. This fix restores the expected behavior.
>
> diff --git a/hgext/fetch.py b/hgext/fetch.py
> --- a/hgext/fetch.py
> +++ b/hgext/fetch.py
> @@ -52,7 +52,7 @@
> raise util.Abort(_('outstanding uncommitted changes'))
> if del_:
> raise util.Abort(_('working directory is missing some files'))
> - if len(repo.branchheads(branch)) > 1:
> + if len(repo.branchheads(branch, closed=False)) > 1:
> raise util.Abort(_('multiple heads in this branch '
> '(use "hg heads ." and "hg merge" to merge)'))
Looks promising. Any chance I can get you to tweak tests/test-fetch to
hit this case?
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel
mailing list