Patchwork [3,of,3] graphmod: don't try to visit nullrev (issue3772)

login
register
mail settings
Submitter Kevin Bullock
Date Jan. 23, 2013, 6:09 p.m.
Message ID <4FAE8979-4541-4563-9DF6-45FEBE1497DE@ringworld.org>
Download mbox | patch
Permalink /patch/720/
State Accepted
Commit e441657b372bef3569b8bdaeeaa1597e55f684d2
Headers show

Comments

Sean Farley - Jan. 23, 2013, 6:27 p.m.
On Wed, Jan 23, 2013 at 12:09 PM, Kevin Bullock
<kbullock+mercurial@ringworld.org> wrote:
> On Jan 23, 2013, at 12:28 AM, Sean Farley wrote:
>
>> # HG changeset patch
>> # User Bryan O'Sullivan <bryano@fb.com>
>> # Date 1358922026 21600
>> # Branch stable
>> # Node ID 2f6922395c30f3f3ef0b4600f8ee2dc52c164fd6
>> # Parent  d45b0b049d80d06939ca7c7f33eed4ecdb619d62
>> graphmod: don't try to visit nullrev (issue3772)
>
> Crewed this series after a copy-edit, plus the addition of a couple more test cases to ensure we don't regress:
>
> diff --git a/tests/test-glog.t b/tests/test-glog.t
> --- a/tests/test-glog.t
> +++ b/tests/test-glog.t
> @@ -2116,5 +2116,10 @@ issue3772
>       user:
>       date:        Thu Jan 01 00:00:00 1970 +0000
>
> +  $ hg glog -r null:null
> +  o  changeset:   -1:000000000000
> +     user:
> +     date:        Thu Jan 01 00:00:00 1970 +0000
> +
>
>    $ cd ..
> diff --git a/tests/test-log.t b/tests/test-log.t
> --- a/tests/test-log.t
> +++ b/tests/test-log.t
> @@ -1304,5 +1304,10 @@ issue3772: hg log -r :null showing revis
>    user:
>    date:        Thu Jan 01 00:00:00 1970 +0000
>
> +  $ hg log -r null:null
> +  changeset:   -1:000000000000
> +  user:
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +
>
>    $ cd ..

Ah, good call, I was planning on adding more tests based on Matt's
comments but forgot. Thanks!

Patch

diff --git a/tests/test-glog.t b/tests/test-glog.t
--- a/tests/test-glog.t
+++ b/tests/test-glog.t
@@ -2116,5 +2116,10 @@  issue3772
      user:
      date:        Thu Jan 01 00:00:00 1970 +0000
   
+  $ hg glog -r null:null
+  o  changeset:   -1:000000000000
+     user:
+     date:        Thu Jan 01 00:00:00 1970 +0000
+  
 
   $ cd ..
diff --git a/tests/test-log.t b/tests/test-log.t
--- a/tests/test-log.t
+++ b/tests/test-log.t
@@ -1304,5 +1304,10 @@  issue3772: hg log -r :null showing revis
   user:        
   date:        Thu Jan 01 00:00:00 1970 +0000
   
+  $ hg log -r null:null
+  changeset:   -1:000000000000
+  user:        
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  
 
   $ cd ..