[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mercurial-devel
Subject:    [PATCH 1 of 3 stable V2] ancestor.deepest: sort revs in C version
From:       Siddharth Agarwal <sid0 () fb ! com>
Date:       2013-07-25 22:50:02
Message-ID: acd8063547ca3cb47f65.1374792602 () dev1091 ! prn1 ! facebook ! com
[Download RAW message or body]

# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1374787237 25200
#      Thu Jul 25 14:20:37 2013 -0700
# Branch stable
# Node ID acd8063547ca3cb47f65140be7930b60fefd9cdc
# Parent  7a5cdf0c90ed57f914d864fdb7d0cbfcaa2637fa
ancestor.deepest: sort revs in C version

This isn't strictly necessary, but it makes the code more consistent with the
Python version.

diff --git a/mercurial/parsers.c b/mercurial/parsers.c
--- a/mercurial/parsers.c
+++ b/mercurial/parsers.c
@@ -1311,6 +1311,9 @@
 		goto bail;
 	}
 
+	if (PyList_Sort(revs) == -1)
+		goto bail;
+
 	for (i = 0; i < revcount; i++) {
 		int n = (int)PyInt_AsLong(PyList_GET_ITEM(revs, i));
 		long b = 1l << i;
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@selenic.com
http://selenic.com/mailman/listinfo/mercurial-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic