Patchwork D4003: index: write expression for encoded revision index consistently

login
register
mail settings
Submitter phabricator
Date Aug. 1, 2018, 9:03 p.m.
Message ID <be78c80d4fc329f95443cb1dea609285@localhost.localdomain>
Download mbox | patch
Permalink /patch/33055/
State Not Applicable
Headers show

Comments

phabricator - Aug. 1, 2018, 9:03 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG37161dc600c5: index: write expression for encoded revision index consistently (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4003?vs=9695&id=9745

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

AFFECTED FILES
  mercurial/cext/revlog.c

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -1062,7 +1062,7 @@ 
 		v = n->children[k];
 
 		if (v == 0) {
-			n->children[k] = -rev - 1;
+			n->children[k] = -(rev + 1);
 			return 0;
 		}
 		if (v < 0) {
@@ -1072,7 +1072,7 @@ 
 			if (oldnode == NULL)
 				return -1;
 			if (!memcmp(oldnode, node, 20)) {
-				n->children[k] = -rev - 1;
+				n->children[k] = -(rev + 1);
 				return 0;
 			}
 			noff = nt_new(self);