[PATCH hglib] tests: fix tests that use integer bookmarks

Benoit Boissinot bboissin at gmail.com
Fri Feb 8 07:06:21 CST 2013


Looks good (sorry no crew keys with me).


On Fri, Feb 8, 2013 at 12:56 PM, Durham Goode <durham at fb.com> wrote:

> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1360324302 28800
> # Node ID 02dd78c2b8d74dc8a97d1aa17238cebf37ccd708
> # Parent  7ce1c3b93414e08a9be1d83f17e7d87d2a24ab3b
> tests: fix tests that use integer bookmarks
>
> Integer bookmarks are now not allowed (since they alias with revision
> numbers),
> so a hglib test was failing.
>
> diff --git a/tests/test-bookmarks.py b/tests/test-bookmarks.py
> --- a/tests/test-bookmarks.py
> +++ b/tests/test-bookmarks.py
> @@ -10,14 +10,14 @@
>          self.append('a', 'a')
>          rev1, node1 = self.client.commit('second')
>
> -        self.client.bookmark('0', rev0)
> +        self.client.bookmark('zero', rev0)
>          self.assertEquals(self.client.bookmarks(),
> -                          ([('0', rev0, node0[:12])], -1))
> +                          ([('zero', rev0, node0[:12])], -1))
>
> -        self.client.bookmark('1', rev1)
> +        self.client.bookmark('one', rev1)
>          self.assertEquals(self.client.bookmarks(),
> -                          ([('0', rev0, node0[:12]),
> -                            ('1', rev1, node1[:12])], 1))
> +                          ([('one', rev1, node1[:12]),
> +                            ('zero', rev0, node0[:12])], 0))
>
>      #def test_spaces(self):
>      #    self.client.bookmark('s pace', self.rev0)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130208/6445f49b/attachment.html>


More information about the Mercurial-devel mailing list