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

login
register
mail settings
Submitter Durham Goode
Date Feb. 8, 2013, 11:56 a.m.
Message ID <02dd78c2b8d74dc8a97d.1360324568@dev350.prn1.facebook.com>
Download mbox | patch
Permalink /patch/828/
State Accepted, archived
Headers show

Comments

Durham Goode - Feb. 8, 2013, 11:56 a.m.
# HG changeset patch
# User Durham Goode <durham@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.
tonfa - Feb. 8, 2013, 1:06 p.m.
Looks good (sorry no crew keys with me).


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

> # HG changeset patch
> # User Durham Goode <durham@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@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
Durham Goode - Feb. 14, 2013, 6:46 p.m.
Pinging this since it's a week old and a test failure.  Matt, the crew
people I talked to said they couldn't apply this since it's the hglib
repo, so you might have to be the one.

On 2/8/13 11:56 AM, "Durham Goode" <durham@fb.com> wrote:

># HG changeset patch
># User Durham Goode <durham@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@selenic.com
>http://selenic.com/mailman/listinfo/mercurial-devel
>
Matt Mackall - Feb. 14, 2013, 7:14 p.m.
On Thu, 2013-02-14 at 18:46 +0000, Durham Goode wrote:
> Pinging this since it's a week old and a test failure.  Matt, the crew
> people I talked to said they couldn't apply this since it's the hglib
> repo, so you might have to be the one.

Pushed, thanks for the reminder.

Patch

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)