On 12/14/16 9:46 AM, David Soria Parra wrote:
> # HG changeset patch
> # User David Soria Parra <davi...@fb.com>
> # Date 1481694598 28800
> #      Tue Dec 13 21:49:58 2016 -0800
> # Node ID c6c26e238617600d0523b44a9043d17f963f9eda
> # Parent  4b9d267d2a05970d9320b83f8bf29ec99f8ab40f
> convert: do not provide head revisions if we have no changests to import
>
> Don't set a head revision in cases where we have a revmap but no
> changesets to import, as convertcmd.convert() treats them as heads of
> to-imported revisions.
>
> diff --git a/hgext/convert/p4.py b/hgext/convert/p4.py
> --- a/hgext/convert/p4.py
> +++ b/hgext/convert/p4.py
> @@ -228,7 +228,7 @@
>               self.copies[change] = copies
>               lastid = change
>   
> -        if lastid:
> +        if lastid and len(self.changeset) > 0:
>               self.heads = [lastid]
So previously self.heads was initialized as a dict but later changed to 
be a list? Wow.
>   
>       def getheads(self):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to