[PATCH stable] graphmod: don't try to visit nullrev (issue3772)

Augie Fackler lists at durin42.com
Tue Jan 22 12:26:52 CST 2013


LGTM, ship it.

On Tue, Jan 22, 2013 at 1:15 PM, Bryan O'Sullivan <bos at serpentine.com> wrote:
> # HG changeset patch
> # User Bryan O'Sullivan <bryano at fb.com>
> # Date 1358878516 28800
> # Node ID 7ea2e6d23afc8a22d7f71822ea9efed94d18b2d4
> # Parent  8c019d2fd7c03f073f7b879ccb87f3e2891bce8a
> graphmod: don't try to visit nullrev (issue3772)
>
> diff --git a/mercurial/graphmod.py b/mercurial/graphmod.py
> --- a/mercurial/graphmod.py
> +++ b/mercurial/graphmod.py
> @@ -181,7 +181,7 @@ def asciiedges(type, char, lines, seen,
>      ncols = len(seen)
>      nextseen = seen[:]
>      nextseen[nodeidx:nodeidx + 1] = newparents
> -    edges = [(nodeidx, nextseen.index(p)) for p in knownparents]
> +    edges = [(nodeidx, nextseen.index(p)) for p in knownparents if p != nullrev]
>
>      while len(newparents) > 2:
>          # ascii() only knows how to add or remove a single column between two
> diff --git a/tests/test-glog.t b/tests/test-glog.t
> --- a/tests/test-glog.t
> +++ b/tests/test-glog.t
> @@ -2109,4 +2109,17 @@ The almost-empty template should do some
>    o
>
>
> +issue3772
> +
> +  $ hg glog -r :null
> +  o  changeset:   0:f8035bb17114
> +  |  user:        test
> +  |  date:        Thu Jan 01 00:00:00 1970 +0000
> +  |  summary:     add a
> +  |
> +  o  changeset:   -1:000000000000
> +     user:
> +     date:        Thu Jan 01 00:00:00 1970 +0000
> +
> +
>    $ cd ..
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list