Imported Upstream version 6.0.0.183

Former-commit-id: 52d866fe5c7f8a1e61b372993391b8bfdfac2bd0
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2019-04-18 08:43:48 +00:00
parent 7aefecd37c
commit 82da664f86
57 changed files with 115 additions and 106 deletions

View File

@ -1 +1 @@
72075fe503f90a8c9087954fd13cae555b0fd10e
a33544e2256923c827809cd431f436b0559a226e

View File

@ -1 +1 @@
5cf967df968a4cd55c0acb463f01a9a4b019cee0
fca4cfccc556dbb274d1a351bbe332106a661be0

View File

@ -29,67 +29,11 @@ namespace System.IO
}
}
public static void ReplaceFile(string sourceFullPath, string destFullPath, string destBackupFullPath, bool ignoreMetadataErrors)
private static void LinkOrCopyFile (string sourceFullPath, string destFullPath)
{
if (destBackupFullPath != null)
{
// We're backing up the destination file to the backup file, so we need to first delete the backup
// file, if it exists. If deletion fails for a reason other than the file not existing, fail.
if (Interop.Sys.Unlink(destBackupFullPath) != 0)
{
Interop.ErrorInfo errno = Interop.Sys.GetLastErrorInfo();
if (errno.Error != Interop.Error.ENOENT)
{
throw Interop.GetExceptionForIoErrno(errno, destBackupFullPath);
}
}
// Now that the backup is gone, link the backup to point to the same file as destination.
// This way, we don't lose any data in the destination file, no copy is necessary, etc.
Interop.CheckIo(Interop.Sys.Link(destFullPath, destBackupFullPath), destFullPath);
}
else
{
// There is no backup file. Just make sure the destination file exists, throwing if it doesn't.
Interop.Sys.FileStatus ignored;
if (Interop.Sys.Stat(destFullPath, out ignored) != 0)
{
Interop.ErrorInfo errno = Interop.Sys.GetLastErrorInfo();
if (errno.Error == Interop.Error.ENOENT)
{
throw Interop.GetExceptionForIoErrno(errno, destBackupFullPath);
}
}
}
// Finally, rename the source to the destination, overwriting the destination.
Interop.CheckIo(Interop.Sys.Rename(sourceFullPath, destFullPath));
}
public static void MoveFile(string sourceFullPath, string destFullPath)
{
// The desired behavior for Move(source, dest) is to not overwrite the destination file
// if it exists. Since rename(source, dest) will replace the file at 'dest' if it exists,
// link/unlink are used instead. However, if the source path and the dest path refer to
// the same file, then do a rename rather than a link and an unlink. This is important
// for case-insensitive file systems (e.g. renaming a file in a way that just changes casing),
// so that we support changing the casing in the naming of the file. If this fails in any
// way (e.g. source file doesn't exist, dest file doesn't exist, rename fails, etc.), we
// just fall back to trying the link/unlink approach and generating any exceptional messages
// from there as necessary.
Interop.Sys.FileStatus sourceStat, destStat;
if (Interop.Sys.LStat(sourceFullPath, out sourceStat) == 0 && // source file exists
Interop.Sys.LStat(destFullPath, out destStat) == 0 && // dest file exists
sourceStat.Dev == destStat.Dev && // source and dest are on the same device
sourceStat.Ino == destStat.Ino && // and source and dest are the same file on that device
Interop.Sys.Rename(sourceFullPath, destFullPath) == 0) // try the rename
{
// Renamed successfully.
if (Interop.Sys.Link(sourceFullPath, destFullPath) >= 0)
return;
}
if (Interop.Sys.Link(sourceFullPath, destFullPath) < 0)
{
// If link fails, we can fall back to doing a full copy, but we'll only do so for
// cases where we expect link could fail but such a copy could succeed. We don't
// want to do so for all errors, because the copy could incur a lot of cost
@ -99,6 +43,7 @@ namespace System.IO
// the source file.
Interop.ErrorInfo errorInfo = Interop.Sys.GetLastErrorInfo();
if (errorInfo.Error == Interop.Error.EXDEV || // rename fails across devices / mount points
errorInfo.Error == Interop.Error.EACCES ||
errorInfo.Error == Interop.Error.EPERM || // permissions might not allow creating hard links even if a copy would work
errorInfo.Error == Interop.Error.EOPNOTSUPP || // links aren't supported by the source file system
errorInfo.Error == Interop.Error.EMLINK || // too many hard links to the source file
@ -140,6 +85,68 @@ namespace System.IO
throw Interop.GetExceptionForIoErrno(errorInfo, path, isDirectory);
}
}
public static void ReplaceFile(string sourceFullPath, string destFullPath, string destBackupFullPath, bool ignoreMetadataErrors)
{
if (destBackupFullPath != null)
{
// We're backing up the destination file to the backup file, so we need to first delete the backup
// file, if it exists. If deletion fails for a reason other than the file not existing, fail.
if (Interop.Sys.Unlink(destBackupFullPath) != 0)
{
Interop.ErrorInfo errno = Interop.Sys.GetLastErrorInfo();
if (errno.Error != Interop.Error.ENOENT)
{
throw Interop.GetExceptionForIoErrno(errno, destBackupFullPath);
}
}
// Now that the backup is gone, link the backup to point to the same file as destination.
// This way, we don't lose any data in the destination file, no copy is necessary, etc.
LinkOrCopyFile(destFullPath, destBackupFullPath);
}
else
{
// There is no backup file. Just make sure the destination file exists, throwing if it doesn't.
Interop.Sys.FileStatus ignored;
if (Interop.Sys.Stat(destFullPath, out ignored) != 0)
{
Interop.ErrorInfo errno = Interop.Sys.GetLastErrorInfo();
if (errno.Error == Interop.Error.ENOENT)
{
throw Interop.GetExceptionForIoErrno(errno, destBackupFullPath);
}
}
}
// Finally, rename the source to the destination, overwriting the destination.
Interop.CheckIo(Interop.Sys.Rename(sourceFullPath, destFullPath));
}
public static void MoveFile(string sourceFullPath, string destFullPath)
{
// The desired behavior for Move(source, dest) is to not overwrite the destination file
// if it exists. Since rename(source, dest) will replace the file at 'dest' if it exists,
// link/unlink are used instead. However, if the source path and the dest path refer to
// the same file, then do a rename rather than a link and an unlink. This is important
// for case-insensitive file systems (e.g. renaming a file in a way that just changes casing),
// so that we support changing the casing in the naming of the file. If this fails in any
// way (e.g. source file doesn't exist, dest file doesn't exist, rename fails, etc.), we
// just fall back to trying the link/unlink approach and generating any exceptional messages
// from there as necessary.
Interop.Sys.FileStatus sourceStat, destStat;
if (Interop.Sys.LStat(sourceFullPath, out sourceStat) == 0 && // source file exists
Interop.Sys.LStat(destFullPath, out destStat) == 0 && // dest file exists
sourceStat.Dev == destStat.Dev && // source and dest are on the same device
sourceStat.Ino == destStat.Ino && // and source and dest are the same file on that device
Interop.Sys.Rename(sourceFullPath, destFullPath) == 0) // try the rename
{
// Renamed successfully.
return;
}
LinkOrCopyFile(sourceFullPath, destFullPath);
DeleteFile(sourceFullPath);
}

View File

@ -41,7 +41,7 @@ static partial class Consts
// Use these assembly version constants to make code more maintainable.
//
public const string MonoVersion = "6.0.0.176";
public const string MonoVersion = "6.0.0.183";
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";

View File

@ -5,7 +5,6 @@
../../../mono/mini/basic-float.cs
../../../mono/mini/basic-long.cs
../../../mono/mini/basic-math.cs
../../../mono/mini/basic-simd.cs
../../../mono/mini/basic-vectors.cs
../../../mono/mini/basic.cs
../../../mono/mini/bench.cs

View File

@ -9,8 +9,12 @@ include ../../build/rules.make
LIBRARY = Mono.Runtime.Tests.dll
NO_BUILD = 1
NO_INSTALL = 1
LIB_REFS = System System.Core System.Numerics System.Numerics.Vectors Mono.Simd
LIB_REFS = System System.Core System.Numerics System.Numerics.Vectors
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -unsafe -d:__MOBILE__ -nowarn:CS0169,CS0649,CS0414,CS0618,CS0219,CS0168
ifneq ($(PROFILE),monodroid)
LIB_REFS += Mono.Simd
endif
include ../../build/library.make

View File

@ -0,0 +1 @@
../../../../mono/mini/basic-simd.cs

View File

@ -1071,7 +1071,7 @@ namespace System.Windows.Forms
return TreeView.ImageList.Images.IndexOfKey (selected_image_key);
if (!string.IsNullOrEmpty (TreeView.SelectedImageKey))
return TreeView.ImageList.Images.IndexOfKey (TreeView.SelectedImageKey);
if (TreeView.SelectedImageIndex >= 0)
if (selected_image_index == -1 && TreeView.SelectedImageIndex >= 0)
return TreeView.SelectedImageIndex;
} else {
if (image_index >= 0)
@ -1080,13 +1080,10 @@ namespace System.Windows.Forms
return TreeView.ImageList.Images.IndexOfKey (image_key);
if (!string.IsNullOrEmpty (TreeView.ImageKey))
return TreeView.ImageList.Images.IndexOfKey (TreeView.ImageKey);
if (TreeView.ImageIndex >= 0)
if (image_index == -1 && TreeView.ImageIndex >= 0)
return TreeView.ImageIndex;
}
if (TreeView.ImageList.Images.Count > 0)
return 0;
return -1;
}
}

View File

@ -923,7 +923,7 @@ namespace MonoTests.System.IO
}
Assert.IsTrue (File.Exists (bar), "#1");
File.Move (bar, baz);
Assert.DoesNotThrow (() => File.Move (bar, baz), "#5");
Assert.IsFalse (File.Exists (bar), "#2");
Assert.IsTrue (File.Exists (baz), "#3");
@ -939,7 +939,7 @@ namespace MonoTests.System.IO
Directory.CreateDirectory (dir);
Directory.CreateDirectory (dir2);
File.Create (dir_foo).Close ();
File.Move (dir_foo, dir2_foo);
Assert.DoesNotThrow (() => File.Move (dir_foo, dir2_foo), "#6");
Assert.IsTrue (File.Exists (dir2_foo), "#4");
Directory.Delete (dir, true);

View File

@ -1 +1 @@
3bb5075309cfee79947231190b6c06970814ecbf
812e72bb33c83991369be9f9ec7ceb56d725d4ba

View File

@ -1 +1 @@
4eff81e78b9af7cda22830830d3d49092a6b7018
abbfbea3a51f4a664ba8db3d9464ad05a3e55baf

View File

@ -1 +1 @@
3b0cda7b19ee016a6f2b3ad97ef9a6ddd8b9bbe5
7aadfbf5cf560b7c3b74e842ea934137d259649f

View File

@ -1 +1 @@
167a06dea1a9f639eed2d5ae04afc5c23891d656
edd9d4c737bb1d7820ff3adb5eb44303676c0579

View File

@ -1 +1 @@
71b6657d1ec9f6a632e30c9ed789ef7fd6e97b70
a4050af4872d879b40435b821550b364b53a0c5e

View File

@ -1 +1 @@
81c98bb54997edda2c51abc2c020a02ef58bcb65
78cc979f44705424bfcf8a9065b8f1ea0c06a407

View File

@ -1 +1 @@
02e92c8371781b6e97eef8cd9fff063521233353
10a0ef69f7a743c313c308618241d53fbf0867c8

View File

@ -1 +1 @@
3bb5075309cfee79947231190b6c06970814ecbf
812e72bb33c83991369be9f9ec7ceb56d725d4ba

View File

@ -1 +1 @@
4eff81e78b9af7cda22830830d3d49092a6b7018
abbfbea3a51f4a664ba8db3d9464ad05a3e55baf

View File

@ -1 +1 @@
3b0cda7b19ee016a6f2b3ad97ef9a6ddd8b9bbe5
7aadfbf5cf560b7c3b74e842ea934137d259649f

View File

@ -1 +1 @@
167a06dea1a9f639eed2d5ae04afc5c23891d656
edd9d4c737bb1d7820ff3adb5eb44303676c0579

View File

@ -1 +1 @@
71b6657d1ec9f6a632e30c9ed789ef7fd6e97b70
a4050af4872d879b40435b821550b364b53a0c5e

View File

@ -1 +1 @@
81c98bb54997edda2c51abc2c020a02ef58bcb65
78cc979f44705424bfcf8a9065b8f1ea0c06a407

View File

@ -1 +1 @@
02e92c8371781b6e97eef8cd9fff063521233353
10a0ef69f7a743c313c308618241d53fbf0867c8

View File

@ -1 +1 @@
3bb5075309cfee79947231190b6c06970814ecbf
812e72bb33c83991369be9f9ec7ceb56d725d4ba

View File

@ -1 +1 @@
4eff81e78b9af7cda22830830d3d49092a6b7018
abbfbea3a51f4a664ba8db3d9464ad05a3e55baf

View File

@ -1 +1 @@
3b0cda7b19ee016a6f2b3ad97ef9a6ddd8b9bbe5
7aadfbf5cf560b7c3b74e842ea934137d259649f

View File

@ -1 +1 @@
167a06dea1a9f639eed2d5ae04afc5c23891d656
edd9d4c737bb1d7820ff3adb5eb44303676c0579

View File

@ -1 +1 @@
71b6657d1ec9f6a632e30c9ed789ef7fd6e97b70
a4050af4872d879b40435b821550b364b53a0c5e

View File

@ -1 +1 @@
81c98bb54997edda2c51abc2c020a02ef58bcb65
78cc979f44705424bfcf8a9065b8f1ea0c06a407

View File

@ -1 +1 @@
02e92c8371781b6e97eef8cd9fff063521233353
10a0ef69f7a743c313c308618241d53fbf0867c8

View File

@ -1 +1 @@
3bb5075309cfee79947231190b6c06970814ecbf
812e72bb33c83991369be9f9ec7ceb56d725d4ba

View File

@ -1 +1 @@
4eff81e78b9af7cda22830830d3d49092a6b7018
abbfbea3a51f4a664ba8db3d9464ad05a3e55baf

View File

@ -1 +1 @@
be628dd9444478c2a5afb7a005df151971572827
44cef98a299aa05e05371a8bf1e8e836ccda4450

View File

@ -1 +1 @@
167a06dea1a9f639eed2d5ae04afc5c23891d656
edd9d4c737bb1d7820ff3adb5eb44303676c0579

View File

@ -1 +1 @@
71b6657d1ec9f6a632e30c9ed789ef7fd6e97b70
a4050af4872d879b40435b821550b364b53a0c5e

View File

@ -1 +1 @@
81c98bb54997edda2c51abc2c020a02ef58bcb65
78cc979f44705424bfcf8a9065b8f1ea0c06a407

View File

@ -1 +1 @@
21392ca5aa714720fd915319eaf0d6c04eea22fc
90e7a52df974302d087204b725711b2ac31a6e6c

View File

@ -1 +1 @@
e6e25d44563d58245ce37d51704b76c6777cc974
7dd5faf818a0108425a9aa20fa86dc9b77faaaec

View File

@ -1 +1 @@
66cd7b5ed2f6a19db0867491f5fe6dde7f27740c
0abdc895b47a19e554a020a88141e224146e2d43

View File

@ -252,6 +252,7 @@ get_throw_trampoline (int size, gboolean corlib, gboolean rethrow, gboolean llvm
int param_size = 8;
if (!resume_unwind && !corlib)
param_size += 4; // Extra arg
param_size = ALIGN_TO (param_size, MONO_ARCH_FRAME_ALIGNMENT);
ARM_SUB_REG_IMM8 (code, ARMREG_SP, ARMREG_SP, param_size);
cfa_offset += param_size;
mono_add_unwind_op_def_cfa_offset (unwind_ops, code, start, cfa_offset);

View File

@ -1 +1 @@
cf9e3c07259eff35dd0817ae62d89a3e068069c3
85a888f70ae4668d92fa432249750d2629b8862a

View File

@ -1 +1 @@
#define FULL_VERSION "explicit/d75c142"
#define FULL_VERSION "explicit/cf880be"

View File

@ -1430,10 +1430,10 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
@CROSS_COMPILE_TRUE@test-local:
@HOST_WIN32_TRUE@test-local:
@CROSS_COMPILE_TRUE@clean-local:
@HOST_WIN32_TRUE@clean-local:
@CROSS_COMPILE_TRUE@test-local:
@HOST_WIN32_TRUE@test-local:
clean: clean-am
clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \

View File

@ -503,8 +503,8 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
@ENABLE_MSVC_FALSE@install-exec-local:
@ENABLE_MSVC_FALSE@clean-local:
@ENABLE_MSVC_FALSE@install-exec-local:
clean: clean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am

Binary file not shown.

View File

@ -1 +1 @@
20b0d421c5e2324009181031d01e869357c82ca5
c54d4a3d333ebd3c0b69b69088bc7aea5b480543

Binary file not shown.

View File

@ -1 +1 @@
dfa0243662d7a67bddbe9b8c3537f166d520e289
87c8c8298de9167f9913ce06c750c54c549dda3f

Binary file not shown.

View File

@ -1 +1 @@
3666efe6a8bfde05515288d200864e987a0362c9
27278b4f4ff20744d812f2e2d2c3f38c6db1a567

View File

@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: mono 6.0.0.176\n"
"Project-Id-Version: mono 6.0.0.183\n"
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
"POT-Creation-Date: 2019-04-13 08:06+0000\n"
"POT-Creation-Date: 2019-04-18 08:09+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

Binary file not shown.

View File

@ -1 +1 @@
b61652d1049177932bbbf3fb70bae129f1204ae6
7f2ae455b3fc239442987ff9e2ea03a9752d4903