mercurial/parsers.c
changeset 27341 5042b999ef0a
parent 27226 f5e8cb813a4d
child 27364 ad1cc1435b13
equal deleted inserted replaced
27340:7b8b6e3b3571 27341:5042b999ef0a
  1993 		if (index_get_parents(self, v, parents, maxrev) < 0)
  1993 		if (index_get_parents(self, v, parents, maxrev) < 0)
  1994 			goto bail;
  1994 			goto bail;
  1995 
  1995 
  1996 		for (i = 0; i < 2; i++) {
  1996 		for (i = 0; i < 2; i++) {
  1997 			int p = parents[i];
  1997 			int p = parents[i];
  1998 			long nsp, sp;
  1998 			long sp;
  1999 			int dp;
  1999 			int dp;
  2000 
  2000 
  2001 			if (p == -1)
  2001 			if (p == -1)
  2002 				continue;
  2002 				continue;
  2003 
  2003 
  2004 			dp = depth[p];
  2004 			dp = depth[p];
  2005 			nsp = sp = seen[p];
  2005 			sp = seen[p];
  2006 			if (dp <= dv) {
  2006 			if (dp <= dv) {
  2007 				depth[p] = dv + 1;
  2007 				depth[p] = dv + 1;
  2008 				if (sp != sv) {
  2008 				if (sp != sv) {
  2009 					interesting[sv] += 1;
  2009 					interesting[sv] += 1;
  2010 					nsp = seen[p] = sv;
  2010 					seen[p] = sv;
  2011 					if (sp) {
  2011 					if (sp) {
  2012 						interesting[sp] -= 1;
  2012 						interesting[sp] -= 1;
  2013 						if (interesting[sp] == 0)
  2013 						if (interesting[sp] == 0)
  2014 							ninteresting -= 1;
  2014 							ninteresting -= 1;
  2015 					}
  2015 					}
  2016 				}
  2016 				}
  2017 			}
  2017 			}
  2018 			else if (dv == dp - 1) {
  2018 			else if (dv == dp - 1) {
  2019 				nsp = sp | sv;
  2019 				long nsp = sp | sv;
  2020 				if (nsp == sp)
  2020 				if (nsp == sp)
  2021 					continue;
  2021 					continue;
  2022 				seen[p] = nsp;
  2022 				seen[p] = nsp;
  2023 				interesting[sp] -= 1;
  2023 				interesting[sp] -= 1;
  2024 				if (interesting[sp] == 0 && interesting[nsp] > 0)
  2024 				if (interesting[sp] == 0 && interesting[nsp] > 0)