changeset 46034:2cf61e66c6d0

merge with stable
author Augie Fackler <augie@google.com>
date Thu, 03 Dec 2020 14:15:39 -0500
parents 8b0a3ff5ed12 (current diff) dadbd01f9393 (diff)
children c701f616d852
files hgext/rebase.py mercurial/debugcommands.py mercurial/extensions.py mercurial/patch.py mercurial/ui.py mercurial/utils/procutil.py rust/hgcli/pyoxidizer.bzl tests/test-rebase-inmemory.t
diffstat 5 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsigs	Wed Dec 02 12:33:51 2020 -0800
+++ b/.hgsigs	Thu Dec 03 14:15:39 2020 -0500
@@ -204,3 +204,4 @@
 07731064ac41dacdf0ec869ebd05c2e848c14fbf 0 iQJJBAABCgAzFiEE64UTlbQiPuL3ugso2lR0C/CHMroFAl93L8cVHDc4OTVwdWxraXRAZ21haWwuY29tAAoJENpUdAvwhzK6xZIP/R34y1j74tumvkIQhijDuMEar3mEOcA0Bjy2iLMjEJtIwQ7OqRbQRY4bn5c88+uQtP2W2KH7OY8tusy+zplkclP2YZUMfUfeClz0G9Ud+94+hs41TX60Htm2dM3UbDo6aCO/j8Ado0U8W7m6LDd1UR/4UfcM5q2YZAq4n6a4twJuDqlv6xx9nFRK8AbeKihIGzv+J46YrqWi9unmLc0kTb6qWT/7H2FeMeBNN+XfGZ+ry/zEyTdhyURTaWEvt6h4EnroPFRmb779aK7dFNDZvc30bh5CnBfGflvvl5sQLDOU7Dqjmhie+PdVK0XNr1PGxNbI2Y9RSKyKXKHRI4jgxHfsB1957cVD++rzSBs4nAockPlAqupK8wL/RWZ0ilB+un1zPizk67cwApnQcWIRro+6D4OuqhA98DAHLu9R7vsjArxCcmgHXdjMiOpLs2K5dqYG15bgeJ+csVDzgFs8vtiaXWYbDdHrhMMAx0V+tLb9Yh6CashwPmi8+7mroJgqtZTLPg4cRwj0TiuHXzLUQrAzjf2o48KiUCEx6pz7PdQtaePO/l2qJCBWuXhY7pSNLy3kHv1gFN+hqKHLdJVNMoF0aR0O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sSJLG2tFuSvnW8b1YBCUD5o39F/4FxUuug/JxEG3nvP0Hf6PbPiAn/ZPJqNOyyY51YfjAaAGZeP+UNM4OgOdsSq1gAcCQEMclb54YuRe/J/fuBkQVKbaPuVYPCypqdc/KppS9hZzD3R3OEiztNXqn8u2tl33qsvdEJBlZq9NCD/wJMIzKC/6I5YNkYtgdfAH+xhqHgPvohGyc5q7jS8UvfIl6Wro8e+nWEXkOv2yQSU8nq/5hcyQj5SctznUxArpAt7CbNmGze42t29EdrP4P5w2K6t1lELUw1SVjzt/j9Xc5k/sDj4MxqP8KNRgoDSPRtv7+1/ECC4SfwVj5w==
--- a/.hgtags	Wed Dec 02 12:33:51 2020 -0800
+++ b/.hgtags	Thu Dec 03 14:15:39 2020 -0500
@@ -217,3 +217,4 @@
 07731064ac41dacdf0ec869ebd05c2e848c14fbf 5.5.2
 0e06a7ab9e0d5c65af4e511aee1e0342998799df 5.6rc0
 18c17d63fdabd009e70bf994e5efb7db422f4f7f 5.6
+1d5189a57405ceca5aa244052c9f948977f4699b 5.6.1
--- a/contrib/chg/chg.c	Wed Dec 02 12:33:51 2020 -0800
+++ b/contrib/chg/chg.c	Thu Dec 03 14:15:39 2020 -0500
@@ -276,6 +276,7 @@
 		debugmsg("closing files based on /proc contents");
 		struct dirent *de;
 		while ((de = readdir(dp))) {
+			errno = 0;
 			char *end;
 			long fd_value = strtol(de->d_name, &end, 10);
 			if (end == de->d_name) {
@@ -288,7 +289,8 @@
 				         de->d_name);
 				continue;
 			}
-			if (fd_value > STDERR_FILENO) {
+			if (fd_value > STDERR_FILENO && fd_value != dirfd(dp)) {
+				debugmsg("closing fd %ld", fd_value);
 				int res = close(fd_value);
 				if (res) {
 					debugmsg("tried to close fd %ld: %d "
@@ -297,6 +299,7 @@
 				}
 			}
 		}
+		closedir(dp);
 	}
 
 	if (putenv("CHGINTERNALMARK=") != 0)
--- a/mercurial/patch.py	Wed Dec 02 12:33:51 2020 -0800
+++ b/mercurial/patch.py	Thu Dec 03 14:15:39 2020 -0500
@@ -2730,8 +2730,8 @@
 def diffsinglehunkinline(hunklines):
     """yield tokens for a list of lines in a single hunk, with inline colors"""
     # prepare deleted, and inserted content
-    a = b''
-    b = b''
+    a = bytearray()
+    b = bytearray()
     for line in hunklines:
         if line[0:1] == b'-':
             a += line[1:]
@@ -2745,8 +2745,8 @@
             yield t
         return
     # re-split the content into words
-    al = wordsplitter.findall(a)
-    bl = wordsplitter.findall(b)
+    al = wordsplitter.findall(bytes(a))
+    bl = wordsplitter.findall(bytes(b))
     # re-arrange the words to lines since the diff algorithm is line-based
     aln = [s if s == b'\n' else s + b'\n' for s in al]
     bln = [s if s == b'\n' else s + b'\n' for s in bl]
--- a/mercurial/utils/procutil.py	Wed Dec 02 12:33:51 2020 -0800
+++ b/mercurial/utils/procutil.py	Thu Dec 03 14:15:39 2020 -0500
@@ -656,7 +656,7 @@
                 stdin.seek(0)
 
             p = subprocess.Popen(
-                tonativestr(script),
+                pycompat.rapply(tonativestr, script),
                 shell=shell,
                 env=tonativeenv(env),
                 close_fds=True,