hg log: solves bug regarding hg log -r 0:null (issue4039) stable
authorCristian Zamfir <cristi_zmf@yahoo.com>
Wed, 12 Mar 2014 10:26:48 +0200
branchstable
changeset 20699 58c32a9c8e7b
parent 20663 5ab28a2e9962
child 20700 b0153cb8b64e
hg log: solves bug regarding hg log -r 0:null (issue4039) 'hg log -r 0:null' was showing only one changeset(the '-1' one) instead of the first two changesets.
mercurial/scmutil.py
tests/test-glog.t
tests/test-log.t
--- a/mercurial/scmutil.py	Mon Mar 10 01:01:43 2014 +0900
+++ b/mercurial/scmutil.py	Wed Mar 12 10:26:48 2014 +0200
@@ -496,7 +496,7 @@
                 start, end = spec.split(_revrangesep, 1)
                 start = revfix(repo, start, 0)
                 end = revfix(repo, end, len(repo) - 1)
-                if end == nullrev and start <= 0:
+                if end == nullrev and start < 0:
                     start = nullrev
                 rangeiter = repo.changelog.revs(start, end)
                 if not seen and not l:
--- a/tests/test-glog.t	Mon Mar 10 01:01:43 2014 +0900
+++ b/tests/test-glog.t	Wed Mar 12 10:26:48 2014 +0200
@@ -2111,6 +2111,11 @@
 issue3772
 
   $ hg log -G -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
--- a/tests/test-log.t	Mon Mar 10 01:01:43 2014 +0900
+++ b/tests/test-log.t	Wed Mar 12 10:26:48 2014 +0200
@@ -1356,6 +1356,12 @@
 issue3772: hg log -r :null showing revision 0 as well
 
   $ hg log -r :null
+  changeset:   0:65624cd9070a
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     a bunch of weird directories
+  
   changeset:   -1:000000000000
   user:        
   date:        Thu Jan 01 00:00:00 1970 +0000