From 43dc8ccbcc5227c055e77c0eca4ea4deae4b7c0d Mon Sep 17 00:00:00 2001 From: Sam Surtees Date: Fri, 26 Feb 2016 01:10:58 +1000 Subject: [PATCH] Fixed issue with incorrect UUID being generated for groups. Fixes #100 --- src/base/workspace.lua | 4 ++-- .../vstudio/sln2005/test_nested_projects.lua | 8 ++++---- tests/actions/vstudio/sln2005/test_projects.lua | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/base/workspace.lua b/src/base/workspace.lua index 82c342ac..adc6afe7 100644 --- a/src/base/workspace.lua +++ b/src/base/workspace.lua @@ -124,8 +124,8 @@ -- assign UUIDs to each node in the tree p.tree.traverse(tr, { - onnode = function(node) - node.uuid = os.uuid(node.path) + onbranch = function(node) + node.uuid = os.uuid("group:" .. node.path) end }) diff --git a/tests/actions/vstudio/sln2005/test_nested_projects.lua b/tests/actions/vstudio/sln2005/test_nested_projects.lua index d9bf7423..488a98b2 100644 --- a/tests/actions/vstudio/sln2005/test_nested_projects.lua +++ b/tests/actions/vstudio/sln2005/test_nested_projects.lua @@ -64,7 +64,7 @@ GlobalSection(NestedProjects) = preSolution prepare() test.capture [[ GlobalSection(NestedProjects) = preSolution - {42B5DBC6-AE1F-903D-F75D-41E363076E92} = {0B5CD40C-7770-FCBD-40F2-9F1DACC5F8EE} + {42B5DBC6-AE1F-903D-F75D-41E363076E92} = {D2C41116-3E7A-8A0B-C76E-84E23323810F} EndGlobalSection ]] end @@ -80,8 +80,8 @@ EndGlobalSection prepare() test.capture [[ GlobalSection(NestedProjects) = preSolution - {96080FE9-82C0-5036-EBC7-2992D79EEB26} = {0B5CD40C-7770-FCBD-40F2-9F1DACC5F8EE} - {42B5DBC6-AE1F-903D-F75D-41E363076E92} = {96080FE9-82C0-5036-EBC7-2992D79EEB26} + {BD0520A9-A9FE-3EFB-D230-2480BE881E07} = {D2C41116-3E7A-8A0B-C76E-84E23323810F} + {42B5DBC6-AE1F-903D-F75D-41E363076E92} = {BD0520A9-A9FE-3EFB-D230-2480BE881E07} EndGlobalSection ]] end @@ -98,7 +98,7 @@ EndGlobalSection prepare() test.capture [[ GlobalSection(NestedProjects) = preSolution - {42B5DBC6-AE1F-903D-F75D-41E363076E92} = {0B5CD40C-7770-FCBD-40F2-9F1DACC5F8EE} + {42B5DBC6-AE1F-903D-F75D-41E363076E92} = {D2C41116-3E7A-8A0B-C76E-84E23323810F} EndGlobalSection ]] end diff --git a/tests/actions/vstudio/sln2005/test_projects.lua b/tests/actions/vstudio/sln2005/test_projects.lua index 91d67b7d..bbad16fd 100755 --- a/tests/actions/vstudio/sln2005/test_projects.lua +++ b/tests/actions/vstudio/sln2005/test_projects.lua @@ -81,7 +81,7 @@ EndProject project "MyProject" prepare() test.capture [[ -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Alpha", "Alpha", "{0B5CD40C-7770-FCBD-40F2-9F1DACC5F8EE}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Alpha", "Alpha", "{D2C41116-3E7A-8A0B-C76E-84E23323810F}" EndProject ]] end @@ -97,9 +97,9 @@ EndProject project "MyProject" prepare() test.capture [[ -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Alpha", "Alpha", "{0B5CD40C-7770-FCBD-40F2-9F1DACC5F8EE}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Alpha", "Alpha", "{D2C41116-3E7A-8A0B-C76E-84E23323810F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Beta", "Beta", "{96080FE9-82C0-5036-EBC7-2992D79EEB26}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Beta", "Beta", "{BD0520A9-A9FE-3EFB-D230-2480BE881E07}" EndProject ]] end @@ -140,13 +140,13 @@ EndProject project "MyProject3" prepare() test.capture [[ -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Zed", "Zed", "{283F880B-9448-887C-1DC4-9E7C89CC937C}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Zed", "Zed", "{2FCAF67E-9B34-ABF5-E472-5C9B501C894A}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject2", "MyProject2.vcproj", "{B45D52A2-A015-94EF-091D-6D4BF5F32EE0}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject1", "MyProject1.vcproj", "{B35D52A2-9F15-94EF-081D-6D4BF4F32EE0}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Beta", "Beta", "{81FD827C-6D34-840D-1621-6A100237000F}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Beta", "Beta", "{68E9C25D-54A1-04AB-BDA8-DD06A97F9F9B}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject3", "MyProject3.vcproj", "{B55D52A2-A115-94EF-0A1D-6D4BF6F32EE0}" EndProject @@ -162,15 +162,15 @@ EndProject project "MyProject2" prepare() test.capture [[ -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Alpha", "Alpha", "{0B5CD40C-7770-FCBD-40F2-9F1DACC5F8EE}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Alpha", "Alpha", "{D2C41116-3E7A-8A0B-C76E-84E23323810F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Beta", "Beta", "{96080FE9-82C0-5036-EBC7-2992D79EEB26}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Beta", "Beta", "{BD0520A9-A9FE-3EFB-D230-2480BE881E07}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject2", "MyProject2.vcproj", "{B45D52A2-A015-94EF-091D-6D4BF5F32EE0}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject1", "MyProject1.vcproj", "{B35D52A2-9F15-94EF-081D-6D4BF4F32EE0}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Zed", "Zed", "{283F880B-9448-887C-1DC4-9E7C89CC937C}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Zed", "Zed", "{2FCAF67E-9B34-ABF5-E472-5C9B501C894A}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject3", "MyProject3.vcproj", "{B55D52A2-A115-94EF-0A1D-6D4BF6F32EE0}" EndProject