This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4c4825db29e1: shortest: don't include nullid in 
disambigution revset (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4163?vs=10089&id=10336

REVISION DETAIL
  https://phab.mercurial-scm.org/D4163

AFFECTED FILES
  mercurial/cext/revlog.c
  tests/test-revisions.t

CHANGE DETAILS

diff --git a/tests/test-revisions.t b/tests/test-revisions.t
--- a/tests/test-revisions.t
+++ b/tests/test-revisions.t
@@ -3,7 +3,7 @@
 
   $ echo 0 > a
   $ hg ci -qAm 0
-  $ for i in 5 8 14 43; do
+  $ for i in 5 8 14 43 167; do
   >   hg up -q 0
   >   echo $i > a
   >   hg ci -qm $i
@@ -14,16 +14,18 @@
   > EOF
 
   $ hg l
+  5:00f
   4:7ba5d
   3:7ba57
   2:72
   1:9
   0:b
   $ cat <<EOF >> .hg/hgrc
   > [experimental]
-  > revisions.disambiguatewithin=:3
+  > revisions.disambiguatewithin=not 4
   > EOF
   $ hg l
+  5:0
   4:7ba5d
   3:7b
   2:72
diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -1075,10 +1075,6 @@
                return -1;
        }
        self->length = 1;
-       if (nt_insert(self, nullid, -1) == -1) {
-               free(self->nodes);
-               return -1;
-       }
        return 0;
 }
 
@@ -1152,6 +1148,11 @@
                        self->nt = NULL;
                        return -1;
                }
+               if (nt_insert(self->nt, nullid, -1) == -1) {
+                       PyMem_Free(self->nt);
+                       self->nt = NULL;
+                       return -1;
+               }
                self->ntrev = (int)index_length(self);
                self->ntlookups = 1;
                self->ntmisses = 0;



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to