[PATCH 1 of 3] clone to master bookmark if available

Matt Mackall mpm at selenic.com
Thu Nov 3 11:20:41 CDT 2011


On Thu, 2011-11-03 at 13:11 +0100, arne_bab at web.de wrote:
>  
> +            # clone all bookmarks
> +            if destrepo.local() and srcrepo.capable("pushkey"):
> +                rb = srcrepo.listkeys('bookmarks')
> +                for k, n in rb.iteritems():
> +                    try:
> +                        m = destrepo.lookup(n)
> +                        destrepo._bookmarks[k] = m
> +                    except error.RepoLookupError:
> +                        pass
> +                if rb:
> +                    bookmarks.write(destrepo)
> +                elif srcrepo.local() and destrepo.capable("pushkey"):
> +                    for k, n in srcrepo._bookmarks.iteritems():
> +                        destrepo.pushkey('bookmarks', k, '', hex(n))

This is practically the Platonic ideal of a change that wants to be its
own patch. Please send this as a patch by itself for discussion first.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list