├── Tools
├── NuGet.exe
├── psake.cmd
├── license.txt
├── psake.psd1
├── psake.ps1
├── README.markdown
└── psake.psm1
├── src
├── .nuget
│ ├── NuGet.exe
│ ├── NuGet.Config
│ └── NuGet.targets
├── packages
│ ├── LibGit2Sharp.NativeBinaries.1.0.164
│ │ ├── libgit2
│ │ │ ├── libgit2_filename.txt
│ │ │ ├── libgit2_hash.txt
│ │ │ ├── LibGit2Sharp.dll.config
│ │ │ └── libgit2.license.txt
│ │ ├── LibGit2Sharp.NativeBinaries.1.0.164.nupkg
│ │ ├── runtimes
│ │ │ ├── osx
│ │ │ │ └── native
│ │ │ │ │ └── libgit2-a5cf255.dylib
│ │ │ ├── win7-x64
│ │ │ │ └── native
│ │ │ │ │ ├── git2-a5cf255.dll
│ │ │ │ │ └── git2-a5cf255.pdb
│ │ │ ├── win7-x86
│ │ │ │ └── native
│ │ │ │ │ ├── git2-a5cf255.dll
│ │ │ │ │ └── git2-a5cf255.pdb
│ │ │ └── linux-x64
│ │ │ │ └── native
│ │ │ │ └── libgit2-a5cf255.so
│ │ └── build
│ │ │ └── LibGit2Sharp.NativeBinaries.props
│ ├── NDesk.Options.0.2.1
│ │ ├── lib
│ │ │ └── NDesk.Options.dll
│ │ └── NDesk.Options.0.2.1.nupkg
│ └── LibGit2Sharp.0.23.1
│ │ ├── LibGit2Sharp.0.23.1.nupkg
│ │ ├── lib
│ │ └── net40
│ │ │ ├── LibGit2Sharp.dll
│ │ │ └── LibGit2Sharp.pdb
│ │ └── App_Readme
│ │ ├── LibGit2Sharp.LICENSE.md
│ │ ├── LibGit2Sharp.README.md
│ │ └── LibGit2Sharp.CHANGES.md
├── Git.Unite
│ ├── packages.config
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Program.cs
│ └── Git.Unite.Console.csproj
├── LibGitUnite
│ ├── packages.config
│ ├── OptionFlags.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── LibGitUnite.csproj
│ └── UniteRepository.cs
└── Git.Unite.sln
├── .gitignore
├── default.ps1
├── LICENSE.md
└── README.md
/Tools/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/Tools/NuGet.exe
--------------------------------------------------------------------------------
/src/.nuget/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/.nuget/NuGet.exe
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/libgit2/libgit2_filename.txt:
--------------------------------------------------------------------------------
1 | git2-a5cf255
2 |
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/libgit2/libgit2_hash.txt:
--------------------------------------------------------------------------------
1 | a5cf255b471ad7113247d552d5695db0cb720882
2 |
--------------------------------------------------------------------------------
/src/packages/NDesk.Options.0.2.1/lib/NDesk.Options.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/packages/NDesk.Options.0.2.1/lib/NDesk.Options.dll
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.0.23.1/LibGit2Sharp.0.23.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/packages/LibGit2Sharp.0.23.1/LibGit2Sharp.0.23.1.nupkg
--------------------------------------------------------------------------------
/src/packages/NDesk.Options.0.2.1/NDesk.Options.0.2.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/packages/NDesk.Options.0.2.1/NDesk.Options.0.2.1.nupkg
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.0.23.1/lib/net40/LibGit2Sharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/packages/LibGit2Sharp.0.23.1/lib/net40/LibGit2Sharp.dll
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.0.23.1/lib/net40/LibGit2Sharp.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/packages/LibGit2Sharp.0.23.1/lib/net40/LibGit2Sharp.pdb
--------------------------------------------------------------------------------
/src/Git.Unite/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/.nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/LibGit2Sharp.NativeBinaries.1.0.164.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/LibGit2Sharp.NativeBinaries.1.0.164.nupkg
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/runtimes/osx/native/libgit2-a5cf255.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/runtimes/osx/native/libgit2-a5cf255.dylib
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/runtimes/win7-x64/native/git2-a5cf255.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/runtimes/win7-x64/native/git2-a5cf255.dll
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/runtimes/win7-x64/native/git2-a5cf255.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/runtimes/win7-x64/native/git2-a5cf255.pdb
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/runtimes/win7-x86/native/git2-a5cf255.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/runtimes/win7-x86/native/git2-a5cf255.dll
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/runtimes/win7-x86/native/git2-a5cf255.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/runtimes/win7-x86/native/git2-a5cf255.pdb
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/runtimes/linux-x64/native/libgit2-a5cf255.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tawman/git-unite/HEAD/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/runtimes/linux-x64/native/libgit2-a5cf255.so
--------------------------------------------------------------------------------
/src/LibGitUnite/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/libgit2/LibGit2Sharp.dll.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #ignore thumbnails created by windows
2 | Thumbs.db
3 | #Ignore files build by Visual Studio
4 | *.obj
5 | *.exe
6 | *.pdb
7 | *.user
8 | *.aps
9 | *.pch
10 | *.vspscc
11 | *_i.c
12 | *_p.c
13 | *.ncb
14 | *.suo
15 | *.tlb
16 | *.tlh
17 | *.bak
18 | *.cache
19 | *.ilk
20 | *.log
21 | [Bb]in
22 | [Dd]ebug*/
23 | *.lib
24 | *.sbr
25 | obj/
26 | [Rr]elease*/
27 | _ReSharper*/
28 | [Tt]est[Rr]esult*
29 | packages/
30 | *.swp
31 | *.*~
32 |
--------------------------------------------------------------------------------
/default.ps1:
--------------------------------------------------------------------------------
1 | # Setup MsBuild with C# 6 support
2 | Framework "4.6"
3 |
4 | $sln = "src\Git.Unite.sln"
5 | $config = "DEBUG"
6 |
7 | task default -depends Test
8 |
9 | task Test -depends Compile {
10 |
11 | }
12 |
13 | task Compile -depends Clean {
14 | Exec { msbuild /t:build /v:n /p:Configuration=$config $sln }
15 | }
16 |
17 | task Clean {
18 | Exec { msbuild /t:clean /v:n /p:Configuration=$config $sln }
19 | }
20 |
21 | task Restore {
22 | Exec { Tools\Nuget.exe restore -source "https://www.nuget.org/api/v2" $sln }
23 | }
24 |
--------------------------------------------------------------------------------
/Tools/psake.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | rem Helper script for those who want to run psake from cmd.exe
3 | rem Example run from cmd.exe:
4 | rem psake "default.ps1" "BuildHelloWord" "4.0"
5 |
6 | if '%1'=='/?' goto help
7 | if '%1'=='-help' goto help
8 | if '%1'=='-h' goto help
9 |
10 | powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\psake.ps1' %*; if ($psake.build_success -eq $false) { exit 1 } else { exit 0 }"
11 | exit /B %errorlevel%
12 |
13 | :help
14 | powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\psake.ps1' -help"
15 |
--------------------------------------------------------------------------------
/src/LibGitUnite/OptionFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace LibGitUnite
4 | {
5 | ///
6 | /// Git.Unite Runtime Option Flags
7 | ///
8 | [Flags]
9 | public enum OptionFlags : short
10 | {
11 | ///
12 | /// Perform a dry run (--dry-run) only and report proposed changes
13 | ///
14 | DryRun = 1,
15 | ///
16 | /// Process directory names for case changes
17 | ///
18 | UniteDirectories = 2,
19 | ///
20 | /// Process filenames for case changes
21 | ///
22 | UniteFiles = 4
23 | }
24 | }
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) 2013 LibGitUnite contributors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
11 |
--------------------------------------------------------------------------------
/Tools/license.txt:
--------------------------------------------------------------------------------
1 | psake
2 | Copyright (c) 2012-13 James Kovacs, Damian Hickey and Contributors
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.0.23.1/App_Readme/LibGit2Sharp.LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) LibGit2Sharp contributors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Tools/psake.psd1:
--------------------------------------------------------------------------------
1 | @{
2 | ModuleToProcess = 'psake.psm1'
3 | ModuleVersion = '4.6.0'
4 | GUID = 'cfb53216-072f-4a46-8975-ff7e6bda05a5'
5 | Author = 'James Kovacs'
6 | Copyright = 'Copyright (c) 2012-16 James Kovacs, Damian Hickey and Contributors'
7 | PowerShellVersion = '2.0'
8 | Description = 'psake is a build automation tool written in PowerShell.'
9 | FunctionsToExport = @('Invoke-psake',
10 | 'Invoke-Task',
11 | 'Get-PSakeScriptTasks',
12 | 'Task',
13 | 'Properties',
14 | 'Include',
15 | 'FormatTaskName',
16 | 'TaskSetup',
17 | 'TaskTearDown',
18 | 'Framework',
19 | 'Assert',
20 | 'Exec')
21 | VariablesToExport = 'psake'
22 |
23 | PrivateData = @{
24 | PSData = @{
25 | LicenseUri = 'https://github.com/psake/psake/blob/master/license.txt'
26 | ProjectUri = 'https://github.com/psake/psake'
27 | Tags = @('Build', 'Task')
28 | IconUri = 'https://raw.githubusercontent.com/psake/graphics/master/png/psake-single-icon-teal-bg-256x256.png'
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/LibGitUnite/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("LibGitUnite")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("Wood Consulting Practice, LLC")]
11 | [assembly: AssemblyProduct("LibGitUnite")]
12 | [assembly: AssemblyCopyright("Copyright © 2013-2017")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("06a0bafd-7c6d-41b0-b354-0db0c31d5e01")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("2.1.0.0")]
35 | [assembly: AssemblyFileVersion("2.1.0.0")]
36 |
--------------------------------------------------------------------------------
/src/Git.Unite/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("Git.Unite.Console")]
8 | [assembly: AssemblyDescription("git-unite to fix case sensitive directory paths")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("Wood Consulting Practice, LLC")]
11 | [assembly: AssemblyProduct("Git.Unite.Console")]
12 | [assembly: AssemblyCopyright("Copyright © 2013-2017")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("e67bfb54-7415-4bc4-9747-d052ba3b0cd9")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("2.1.0.0")]
35 | [assembly: AssemblyFileVersion("2.1.0.0")]
36 |
--------------------------------------------------------------------------------
/Tools/psake.ps1:
--------------------------------------------------------------------------------
1 | # Helper script for those who want to run psake without importing the module.
2 | # Example run from PowerShell:
3 | # .\psake.ps1 "default.ps1" "BuildHelloWord" "4.0"
4 |
5 | # Must match parameter definitions for psake.psm1/invoke-psake
6 | # otherwise named parameter binding fails
7 | param(
8 | [Parameter(Position=0,Mandatory=0)]
9 | [string]$buildFile,
10 | [Parameter(Position=1,Mandatory=0)]
11 | [string[]]$taskList = @(),
12 | [Parameter(Position=2,Mandatory=0)]
13 | [string]$framework,
14 | [Parameter(Position=3,Mandatory=0)]
15 | [switch]$docs = $false,
16 | [Parameter(Position=4,Mandatory=0)]
17 | [System.Collections.Hashtable]$parameters = @{},
18 | [Parameter(Position=5, Mandatory=0)]
19 | [System.Collections.Hashtable]$properties = @{},
20 | [Parameter(Position=6, Mandatory=0)]
21 | [alias("init")]
22 | [scriptblock]$initialization = {},
23 | [Parameter(Position=7, Mandatory=0)]
24 | [switch]$nologo = $false,
25 | [Parameter(Position=8, Mandatory=0)]
26 | [switch]$help = $false,
27 | [Parameter(Position=9, Mandatory=0)]
28 | [string]$scriptPath,
29 | [Parameter(Position=10,Mandatory=0)]
30 | [switch]$detailedDocs = $false
31 | )
32 |
33 | # setting $scriptPath here, not as default argument, to support calling as "powershell -File psake.ps1"
34 | if (!$scriptPath) {
35 | $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.path)
36 | }
37 |
38 | # '[p]sake' is the same as 'psake' but $Error is not polluted
39 | remove-module [p]sake
40 | import-module (join-path $scriptPath psake.psm1)
41 | if ($help) {
42 | Get-Help Invoke-psake -full
43 | return
44 | }
45 |
46 | if ($buildFile -and (-not(test-path $buildFile))) {
47 | $absoluteBuildFile = (join-path $scriptPath $buildFile)
48 | if (test-path $absoluteBuildFile) {
49 | $buildFile = $absoluteBuildFile
50 | }
51 | }
52 |
53 | Invoke-psake $buildFile $taskList $framework $docs $parameters $properties $initialization $nologo $detailedDocs
54 |
--------------------------------------------------------------------------------
/src/Git.Unite/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using NDesk.Options;
6 | using LibGitUnite;
7 |
8 | namespace Git.Unite
9 | {
10 | static class Program
11 | {
12 | static void Main(string[] args)
13 | {
14 | var options = OptionFlags.UniteDirectories | OptionFlags.UniteFiles;
15 | var showHelp = false;
16 | List paths;
17 | var opts = new OptionSet
18 | {
19 | {"dry-run", "dry run without making changes", v => options |= v != null ? OptionFlags.DryRun : options},
20 | {"d|directory-only", "only perform directory case changes", v => options = v != null ? options ^ OptionFlags.UniteFiles : options},
21 | {"f|file-only", "only perform filename case changes", v => options = v != null ? options ^ OptionFlags.UniteDirectories : options},
22 | {"h|help", "show this message and exit", v => showHelp = v != null}
23 | };
24 |
25 | try
26 | {
27 | paths = opts.Parse(args);
28 | }
29 | catch (OptionException ex)
30 | {
31 | Console.Write("Git.Unite: ");
32 | Console.WriteLine(ex.Message);
33 | Console.WriteLine("Try `Git.Unite --help' for more information.");
34 | return;
35 | }
36 |
37 | if (showHelp)
38 | {
39 | ShowHelp(opts);
40 | return;
41 | }
42 |
43 | if(!paths.Any())
44 | paths.Add(Directory.GetCurrentDirectory());
45 |
46 | foreach(var path in paths)
47 | {
48 | if(!Directory.Exists(path+"\\.git"))
49 | {
50 | Console.WriteLine(path+" does not appear to be a valid git repository");
51 | return;
52 | }
53 | new UniteRepository(path, options).Process().Dispose();
54 | }
55 | }
56 |
57 | private static void ShowHelp(OptionSet opts)
58 | {
59 | Console.WriteLine("Usage: Git.Unite [OPTIONS]+ repository");
60 | Console.WriteLine("Unite the git repository index file paths with current Windows case usage.");
61 | Console.WriteLine("If no repository path is specified, the current directory is used.");
62 | Console.WriteLine();
63 | Console.WriteLine("Options:");
64 | opts.WriteOptionDescriptions(Console.Out);
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/Tools/README.markdown:
--------------------------------------------------------------------------------
1 | Welcome to the psake project.
2 | =============================
3 |
4 | [](https://gitter.im/psake/psake?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5 |
6 | psake is a build automation tool written in PowerShell. It avoids the angle-bracket tax associated with executable XML by leveraging the PowerShell syntax in your build scripts.
7 | psake has a syntax inspired by rake (aka make in Ruby) and bake (aka make in Boo), but is easier to script because it leverages your existing command-line knowledge.
8 |
9 | psake is pronounced sake – as in Japanese rice wine. It does NOT rhyme with make, bake, or rake.
10 |
11 | ## How to get started:
12 |
13 | **Step 1:** Download and extract the project
14 |
15 | You will need to "unblock" the zip file before extracting - PowerShell by default does not run files downloaded from the internet.
16 | Just right-click the zip and click on "properties" and click on the "unblock" button.
17 |
18 | **Step 2:** CD into the directory where you extracted the project (where the psake.psm1 file is)
19 |
20 | > Import-Module .\psake.psm1
21 |
22 | If you encounter the following error "Import-Module : ...psake.psm1 cannot be loaded because the execution of scripts is disabled on this system." Please see "get-help about_signing" for more details.
23 |
24 | 1. Run PowerShell as administrator
25 | 2. Set-ExecutionPolicy RemoteSigned
26 |
27 | > Get-Help Invoke-psake -Full
28 | > - this will show you help and examples of how to use psake
29 |
30 | **Step 3:** Run some examples
31 |
32 | > CD .\examples
33 | >
34 | > Invoke-psake
35 | > - This will execute the "default" task in the "default.ps1"
36 | >
37 | > Invoke-psake .\default.ps1 Clean
38 | > - will execute the single task in the default.ps1 script
39 |
40 | ## Release Notes
41 |
42 | You can find all the information about each release of psake in the [releases section](https://github.com/psake/psake/releases).
43 |
44 | ## How To Contribute, Collaborate, Communicate
45 |
46 | If you'd like to get involved with psake, we have discussion groups over at google: **[psake-dev](http://groups.google.com/group/psake-dev)** **[psake-users](http://groups.google.com/group/psake-users)**
47 |
48 | Anyone can fork the main repository and submit patches, as well. And lastly, the [wiki](http://wiki.github.com/psake/psake/) and [issues list](http://github.com/psake/psake/issues) are also open for additions, edits, and discussion.
49 |
50 | Also check out the **[psake-contrib](http://github.com/psake/psake-contrib)** project for scripts, modules and functions to help you with a build.
51 |
52 | ## License
53 |
54 | psake is released under the [MIT license](http://www.opensource.org/licenses/MIT).
55 |
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/build/LibGit2Sharp.NativeBinaries.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | lib\win32\x64\git2-a5cf255.dll
10 | PreserveNewest
11 |
12 |
13 | lib\win32\x64\git2-a5cf255.pdb
14 | PreserveNewest
15 |
16 |
17 | lib\win32\x86\git2-a5cf255.dll
18 | PreserveNewest
19 |
20 |
21 | lib\win32\x86\git2-a5cf255.pdb
22 | PreserveNewest
23 |
24 |
25 | lib\osx\libgit2-a5cf255.dylib
26 | PreserveNewest
27 |
28 |
29 | lib\linux\x86_64\libgit2-a5cf255.so
30 | PreserveNewest
31 |
32 |
33 | LibGit2Sharp.dll.config
34 | PreserveNewest
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Git.Unite
2 | =========
3 | Git Unite is a utility that fixes case sensitive file names and paths present in a git repository index on Windows. Since Windows is not case sensitive, the git index case sensitivity issue does not manifest itself until browsing the code repository on GitHub or cloning the repository to a case sensitive file system on Linux.
4 |
5 | Introducing case sensitive file paths into the git index on a case insensitive operating system like Windows is easier than you think. A simple `git mv .\Where\Waldo where\is\Waldo` is all you need to create two separate paths in the git index, but the Windows working directory will only report one. There might be git config settings that help avoid this problem, but controlling the settings and behavior of 20+ contributors on a project team is nearly impossible.
6 |
7 | The problem is exacerbated when hundreds of files are moved during a repository layout reorganization. If the user moving the files is not careful, these case sensitive path names will pollute the git index but appear fine in the working directory. Cleaning up these case sensitive file path issues on Windows is tedious, and this is where Git Unite helps out.
8 |
9 | Git Unite will search the git repository index for file names and paths that do not match the same case that Windows is using. For each git index path case mismatch found, Git Unite will update the git index entry with the case reported by the Windows file system.
10 |
11 | Usage: Git.Unite [OPTIONS]+ repository
12 | Unite the git repository index file paths with current Windows case usage.
13 | If no repository path is specified, the current directory is used.
14 |
15 | Options:
16 | --dry-run dry run without making changes
17 | -d, --directory-only only perform directory case changes
18 | -f, --file-only only perform filename case changes
19 | -h, --help show this message and exit
20 |
21 | Example Usage
22 | ----------------
23 | C:\demo [master]> Git.Unite C:\demo
24 | C:\demo [master +0 ~1 -0]> git status
25 | # On branch master
26 | # Changes to be committed:
27 | # (use "git reset HEAD ..." to unstage)
28 | #
29 | # renamed: where/is/Waldo -> Where/Is/Waldo
30 | #
31 |
32 | A more detailed example scenario and usage is available on my blog post [Git Unite - Fix Case Sensitive File Paths on Windows](http://www.woodcp.com/2013/01/git-unite-fix-case-sensitive-file-paths-on-windows/ "Wood Consulting Practice, LLC")
33 |
34 | How To Build It?
35 | ----------------
36 | Open a PowerShell window and run: `build.cmd`
37 |
38 | Otherwise, open the Solution file in Visual Studio and Build
39 |
40 | The binary will be in `git-unite\src\Git.Unite\bin\Debug`
41 |
42 | Thanks
43 | ------
44 | This software is open source and check the LICENSE.md file for more details.
45 |
46 | Todd A. Wood
47 | ([@iToddWood](https://twitter.com/iToddWood "Follow me on Twitter"))
48 | Visit [Implement IToddWood](http://www.woodcp.com "Wood Consulting Practice, LLC")
49 |
--------------------------------------------------------------------------------
/src/Git.Unite/Git.Unite.Console.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | 8.0.30703
7 | 2.0
8 | {EACA1E82-1190-4533-B728-B50466F26E59}
9 | Exe
10 | Properties
11 | Git.Unite
12 | Git.Unite
13 | v4.0
14 | Client
15 | 512
16 | ..\
17 | true
18 |
19 |
20 | x86
21 | true
22 | full
23 | false
24 | bin\Debug\
25 | DEBUG;TRACE
26 | prompt
27 | 4
28 | true
29 |
30 |
31 | x86
32 | pdbonly
33 | true
34 | bin\Release\
35 | TRACE
36 | prompt
37 | 4
38 |
39 |
40 |
41 | ..\packages\NDesk.Options.0.2.1\lib\NDesk.Options.dll
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}
58 | LibGitUnite
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
77 |
--------------------------------------------------------------------------------
/src/Git.Unite.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Git.Unite.Console", "Git.Unite\Git.Unite.Console.csproj", "{EACA1E82-1190-4533-B728-B50466F26E59}"
5 | EndProject
6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{47CA9D9D-F581-48E9-85FE-792667D214FF}"
7 | ProjectSection(SolutionItems) = preProject
8 | .nuget\NuGet.Config = .nuget\NuGet.Config
9 | .nuget\NuGet.exe = .nuget\NuGet.exe
10 | .nuget\NuGet.targets = .nuget\NuGet.targets
11 | EndProjectSection
12 | EndProject
13 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibGitUnite", "LibGitUnite\LibGitUnite.csproj", "{00CE7D4E-93EC-4215-97D5-9C87180C9BAF}"
14 | EndProject
15 | Global
16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
17 | Debug|Any CPU = Debug|Any CPU
18 | Debug|Mixed Platforms = Debug|Mixed Platforms
19 | Debug|x86 = Debug|x86
20 | Leaks|Any CPU = Leaks|Any CPU
21 | Leaks|Mixed Platforms = Leaks|Mixed Platforms
22 | Leaks|x86 = Leaks|x86
23 | Release|Any CPU = Release|Any CPU
24 | Release|Mixed Platforms = Release|Mixed Platforms
25 | Release|x86 = Release|x86
26 | EndGlobalSection
27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
28 | {EACA1E82-1190-4533-B728-B50466F26E59}.Debug|Any CPU.ActiveCfg = Debug|x86
29 | {EACA1E82-1190-4533-B728-B50466F26E59}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
30 | {EACA1E82-1190-4533-B728-B50466F26E59}.Debug|Mixed Platforms.Build.0 = Debug|x86
31 | {EACA1E82-1190-4533-B728-B50466F26E59}.Debug|x86.ActiveCfg = Debug|x86
32 | {EACA1E82-1190-4533-B728-B50466F26E59}.Debug|x86.Build.0 = Debug|x86
33 | {EACA1E82-1190-4533-B728-B50466F26E59}.Leaks|Any CPU.ActiveCfg = Release|x86
34 | {EACA1E82-1190-4533-B728-B50466F26E59}.Leaks|Mixed Platforms.ActiveCfg = Release|x86
35 | {EACA1E82-1190-4533-B728-B50466F26E59}.Leaks|Mixed Platforms.Build.0 = Release|x86
36 | {EACA1E82-1190-4533-B728-B50466F26E59}.Leaks|x86.ActiveCfg = Release|x86
37 | {EACA1E82-1190-4533-B728-B50466F26E59}.Leaks|x86.Build.0 = Release|x86
38 | {EACA1E82-1190-4533-B728-B50466F26E59}.Release|Any CPU.ActiveCfg = Release|x86
39 | {EACA1E82-1190-4533-B728-B50466F26E59}.Release|Mixed Platforms.ActiveCfg = Release|x86
40 | {EACA1E82-1190-4533-B728-B50466F26E59}.Release|Mixed Platforms.Build.0 = Release|x86
41 | {EACA1E82-1190-4533-B728-B50466F26E59}.Release|x86.ActiveCfg = Release|x86
42 | {EACA1E82-1190-4533-B728-B50466F26E59}.Release|x86.Build.0 = Release|x86
43 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
45 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
46 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
47 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Debug|x86.ActiveCfg = Debug|Any CPU
48 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Leaks|Any CPU.ActiveCfg = Release|Any CPU
49 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Leaks|Any CPU.Build.0 = Release|Any CPU
50 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Leaks|Mixed Platforms.ActiveCfg = Release|Any CPU
51 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Leaks|Mixed Platforms.Build.0 = Release|Any CPU
52 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Leaks|x86.ActiveCfg = Release|Any CPU
53 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
54 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Release|Any CPU.Build.0 = Release|Any CPU
55 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
56 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
57 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}.Release|x86.ActiveCfg = Release|Any CPU
58 | EndGlobalSection
59 | GlobalSection(SolutionProperties) = preSolution
60 | HideSolutionNode = FALSE
61 | EndGlobalSection
62 | EndGlobal
63 |
--------------------------------------------------------------------------------
/src/LibGitUnite/LibGitUnite.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 8.0.30703
8 | 2.0
9 | {00CE7D4E-93EC-4215-97D5-9C87180C9BAF}
10 | Library
11 | Properties
12 | LibGitUnite
13 | LibGitUnite
14 | v4.0
15 | 512
16 | ..\
17 | true
18 |
19 |
20 |
21 |
22 | true
23 | full
24 | false
25 | bin\Debug\
26 | DEBUG;TRACE
27 | prompt
28 | 4
29 | true
30 |
31 |
32 | pdbonly
33 | true
34 | bin\Release\
35 | TRACE
36 | prompt
37 | 4
38 |
39 |
40 |
41 | ..\packages\LibGit2Sharp.0.23.1\lib\net40\LibGit2Sharp.dll
42 | True
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
69 |
70 |
71 |
72 |
79 |
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.0.23.1/App_Readme/LibGit2Sharp.README.md:
--------------------------------------------------------------------------------
1 | # LibGit2Sharp
2 |
3 | **LibGit2Sharp brings all the might and speed of [libgit2][libgit2], a native Git implementation, to the managed world of .NET and Mono.**
4 |
5 | [libgit2]: http://libgit2.github.com/
6 |
7 | ## Prerequisites
8 |
9 | - **Windows:** .NET 4.0+
10 | - **Linux/Mac OS X:** Mono 3.6+
11 |
12 | ## Online resources
13 |
14 | - [NuGet package][nuget] (Requires NuGet 2.7+)
15 | - [Source code][source]
16 |
17 | [nuget]: http://nuget.org/List/Packages/LibGit2Sharp
18 | [source]: https://github.com/libgit2/libgit2sharp/
19 |
20 | ## Troubleshooting and support
21 |
22 | - Usage or programming related question? Post it on [StackOverflow][so] using the tag *libgit2sharp*
23 | - Found a bug or missing a feature? Feed the [issue tracker][tracker]
24 | - Announcements and related miscellanea through Twitter ([@libgit2sharp][twitter])
25 |
26 | [so]: http://stackoverflow.com/questions/tagged/libgit2sharp
27 | [tracker]: https://github.com/libgit2/libgit2sharp/issues
28 | [twitter]: http://twitter.com/libgit2sharp
29 |
30 | ## Current project status
31 |
32 | The CI builds are generously hosted and run on the [Travis][travis] and [AppVeyor][appveyor] infrastructures.
33 |
34 | | | Windows (x86/amd64) | Linux/Mac OS X |
35 | | :------ | :------: | :------: |
36 | | **master** | [![master win][master-win-badge]][master-win] | [![master nix][master-nix-badge]][master-nix] |
37 | | **vNext** | [![vNext win][vNext-win-badge]][vNext-win] | [![vNext nix][vNext-nix-badge]][vNext-nix] |
38 |
39 | The security-oriented static code analysis is kindly run through the [Coverity][coverity] service. Code coverage is kindly run through [Coveralls.io][coveralls].
40 |
41 | | | Static Analysis | Code Coverage |
42 | |-------|-----------------|---------------|
43 | | **vNext** | [![coverity][coverity-badge]][coverity-project] | [![coveralls][coveralls-badge]][coveralls-project] |
44 |
45 |
46 | [travis]: https://travis-ci.org/
47 | [appveyor]: http://appveyor.com/
48 | [coverity]: https://scan.coverity.com/
49 | [coveralls]: https://coveralls.io/
50 |
51 | [master-win-badge]: https://ci.appveyor.com/api/projects/status/8qxcoqdo9kp7x2w9/branch/master?svg=true
52 | [master-win]: https://ci.appveyor.com/project/libgit2/libgit2sharp/branch/master
53 | [master-nix-badge]: https://travis-ci.org/libgit2/libgit2sharp.svg?branch=master
54 | [master-nix]: https://travis-ci.org/libgit2/libgit2sharp/branches
55 | [vNext-win-badge]: https://ci.appveyor.com/api/projects/status/8qxcoqdo9kp7x2w9/branch/vNext?svg=true
56 | [vNext-win]: https://ci.appveyor.com/project/libgit2/libgit2sharp/branch/vNext
57 | [vNext-nix-badge]: https://travis-ci.org/libgit2/libgit2sharp.svg?branch=vNext
58 | [vNext-nix]: https://travis-ci.org/libgit2/libgit2sharp/branches
59 |
60 | [coverity-project]: https://scan.coverity.com/projects/2088
61 | [coverity-badge]: https://scan.coverity.com/projects/2088/badge.svg
62 |
63 | [coveralls-project]: https://coveralls.io/r/libgit2/libgit2sharp?branch=vNext
64 | [coveralls-badge]: https://coveralls.io/repos/libgit2/libgit2sharp/badge.svg?branch=vNext
65 |
66 | ## Quick contributing guide
67 |
68 | - Fork and clone locally
69 | - Create a topic specific branch. Add some nice feature. Do not forget the tests ;-)
70 | - Send a Pull Request to spread the fun!
71 |
72 | More thorough information available in the [wiki][wiki].
73 |
74 | [wiki]: https://github.com/libgit2/libgit2sharp/wiki
75 |
76 | ## Optimizing unit testing
77 | LibGit2Sharp strives to have comprehensive and robust unit test suite to insure the quality of the software and to assist new contributors and users who can use the tests as sample to jump start development. There are over one-thousand unit-tests for LibGit2Sharp, this number will only grow as functionality is added.
78 |
79 | You can do a few things to optimize running unit-tests on Windows:
80 |
81 | 1. Set the `LibGit2TestPath` environment variable to a path in your development environment.
82 | * If the unit-test framework cannot find the specified folder at runtime, it will fall back to the default location.
83 | 2. Configure your anti-virus software to ignore the `LibGit2TestPath` path.
84 | 3. Install a RAM disk like [IMDisk](http://www.ltr-data.se/opencode.html/#ImDisk) and set `LibGit2TestPath` to use it.
85 | * Use `imdisk.exe -a -s 512M -m X: -p "/fs:fat /q /v:ramdisk /y"` to create a RAM disk. This command requires elevated privileges and can be placed into a scheduled task or run manually before you begin unit-testing.
86 |
87 | ## Authors
88 |
89 | - **Code:** The LibGit2Sharp [contributors][committers]
90 | - **Logo:** [Jason "blackant" Long][blackant]
91 |
92 | [committers]: https://github.com/libgit2/libgit2sharp/contributors
93 | [blackant]: https://github.com/jasonlong
94 |
95 | ## License
96 |
97 | The MIT license (Refer to the [LICENSE.md][license] file)
98 |
99 | [license]: https://github.com/libgit2/libgit2sharp/blob/master/LICENSE.md
100 |
--------------------------------------------------------------------------------
/src/.nuget/NuGet.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildProjectDirectory)\..\
5 |
6 |
7 | false
8 |
9 |
10 | false
11 |
12 |
13 | true
14 |
15 |
16 | false
17 |
18 |
19 |
20 |
21 |
25 |
26 |
27 |
28 |
29 | $([System.IO.Path]::Combine($(SolutionDir), ".nuget"))
30 | $([System.IO.Path]::Combine($(ProjectDir), "packages.config"))
31 |
32 |
33 |
34 |
35 | $(SolutionDir).nuget
36 | packages.config
37 |
38 |
39 |
40 |
41 | $(NuGetToolsPath)\nuget.exe
42 | @(PackageSource)
43 |
44 | "$(NuGetExePath)"
45 | mono --runtime=v4.0.30319 $(NuGetExePath)
46 |
47 | $(TargetDir.Trim('\\'))
48 |
49 | -RequireConsent
50 |
51 | $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -solutionDir "$(SolutionDir) "
52 | $(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols
53 |
54 |
55 |
56 | RestorePackages;
57 | $(ResolveReferencesDependsOn);
58 |
59 |
60 |
61 |
62 | $(BuildDependsOn);
63 | BuildPackage;
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
93 |
95 |
96 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
147 |
148 |
149 |
150 |
--------------------------------------------------------------------------------
/src/LibGitUnite/UniteRepository.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Reflection;
6 | using LibGit2Sharp;
7 |
8 | namespace LibGitUnite
9 | {
10 | public class UniteRepository : IDisposable
11 | {
12 | private readonly OptionFlags _options;
13 | private const string Separator = "\\";
14 | private List _folderInfo = new List();
15 | private readonly Repository _gitRepository;
16 | private readonly DirectoryInfo _gitDirectoryInfo;
17 | private static readonly FieldInfo FullNameField = typeof(FileSystemInfo).GetField("FullPath", BindingFlags.Instance | BindingFlags.NonPublic);
18 |
19 | ///
20 | /// Extended LibGit2Sharp.Repository with the Unite version of the Move command
21 | ///
22 | ///
23 | /// The path to the git repository to open, can be either the path to the git directory (for non-bare repositories this
24 | /// would be the ".git" folder inside the working directory) or the path to the working directory.
25 | ///
26 | /// Runtime command line options specified
27 | public UniteRepository(string path, OptionFlags options)
28 | {
29 | _gitDirectoryInfo = new DirectoryInfo(path);
30 | _gitRepository = new Repository(GetFullName(_gitDirectoryInfo));
31 | _options = options;
32 | }
33 |
34 | public UniteRepository Process()
35 | {
36 | return GetHostDirectoryInfo().UniteFolderCasing().UniteFilenameCasing();
37 | }
38 |
39 | ///
40 | /// Modified version of LibGit2Sharp.Index.Move without the OS file system checks to unite file with proper case path
41 | ///
42 | /// The path of the file within the working directory which has to be renamed.
43 | /// The target path of the file within the working directory.
44 | public void Unite(string sourcePath, string destinationPath)
45 | {
46 | if (_options.HasFlag(OptionFlags.DryRun))
47 | {
48 | Console.WriteLine("proposed rename: {0} -> {1}", sourcePath, destinationPath);
49 | return;
50 | }
51 |
52 | try
53 | {
54 | _gitRepository.Index.Remove(sourcePath.Replace(_gitRepository.Info.WorkingDirectory, string.Empty));
55 | _gitRepository.Index.Add(destinationPath.Replace(_gitRepository.Info.WorkingDirectory, string.Empty));
56 | _gitRepository.Index.Write();
57 | }
58 | catch (Exception ex)
59 | {
60 | Console.WriteLine("error changing: {0} -> {1} [{2}]", sourcePath, destinationPath, ex.Message);
61 | }
62 | }
63 |
64 | ///
65 | /// Modified version of LibGit2Sharp.Index.Move without the OS file system checks to unite file with proper case path
66 | ///
67 | /// The path changes required.
68 | public void Unite(Dictionary indexChanges)
69 | {
70 | if (!indexChanges.Any()) return;
71 |
72 | if (_options.HasFlag(OptionFlags.DryRun))
73 | {
74 | foreach (var indexChange in indexChanges)
75 | {
76 | Console.WriteLine("proposed rename: {0} -> {1}", indexChange.Key, indexChange.Value);
77 | }
78 | return;
79 | }
80 | RemoveIndexEntries(indexChanges);
81 | AddIndexEntries(indexChanges);
82 | _gitRepository.Index.Write();
83 | }
84 |
85 | private void AddIndexEntries(Dictionary indexChanges)
86 | {
87 | foreach (var indexChange in indexChanges)
88 | {
89 | try
90 | {
91 | _gitRepository.Index.Add(indexChange.Value.Replace(_gitRepository.Info.WorkingDirectory, string.Empty));
92 | }
93 | catch (Exception ex)
94 | {
95 | Console.WriteLine("error changing: {0} -> {1} [{2}]", indexChange.Key, indexChange.Value, ex.Message);
96 | }
97 | }
98 | }
99 |
100 | private void RemoveIndexEntries(Dictionary indexChanges)
101 | {
102 | foreach (var indexChange in indexChanges)
103 | {
104 | try
105 | {
106 | _gitRepository.Index.Remove(indexChange.Key.Replace(_gitRepository.Info.WorkingDirectory, string.Empty));
107 | }
108 | catch (Exception ex)
109 | {
110 | Console.WriteLine("error changing: {0} -> {1} [{2}]", indexChange.Key, indexChange.Value, ex.Message);
111 | }
112 | }
113 | }
114 |
115 | ///
116 | /// Get the FullName from long file names using the hidden property FullPath
117 | ///
118 | ///
119 | /// Full Name Field
120 | private static string GetFullName(FileSystemInfo fsi)
121 | {
122 | return (string)FullNameField.GetValue(fsi);
123 | }
124 |
125 | ///
126 | /// Builds a list of directory names as seen by the host operating system
127 | ///
128 | /// A aware of directories reported by host OS
129 | private UniteRepository GetHostDirectoryInfo()
130 | {
131 | try
132 | {
133 | _folderInfo = _gitDirectoryInfo.EnumerateDirectories("*", SearchOption.AllDirectories)
134 | .Where(d => !GetFullName(d).ToLowerInvariant().StartsWith(_gitRepository.Info.Path.TrimEnd('\\').ToLowerInvariant()))
135 | .ToList();
136 | }
137 | catch (Exception ex)
138 | {
139 | Console.Write("Git.Unite: ");
140 | Console.WriteLine(ex.Message);
141 | }
142 |
143 | return this;
144 | }
145 |
146 | ///
147 | /// Unite directory name casing between git index and host OS
148 | ///
149 | private UniteRepository UniteFolderCasing()
150 | {
151 | if (!_options.HasFlag(OptionFlags.UniteDirectories) || !_folderInfo.Any()) return this;
152 |
153 | var foldersFullPathMap = new HashSet(_folderInfo.ConvertAll(GetFullName));
154 |
155 | // Find all repository files with directory paths not found in the host OS folder collection
156 | var indexEntries =
157 | _gitRepository.Index.Where(f => f.Path.LastIndexOf(Separator, StringComparison.Ordinal) != -1
158 | &&
159 | !foldersFullPathMap.Any(s => s.Contains(f.Path.Substring(0, f.Path.LastIndexOf(Separator, StringComparison.Ordinal)))));
160 |
161 | // Build manifest of directory changes in order to remove all entries first before adding due to git internal handling of adds with existing directory entries
162 | var indexChanges = new Dictionary();
163 |
164 | // Unite the casing of the repository file directory path with the casing seen by the host operating system
165 | foreach (var entry in indexEntries)
166 | {
167 | var lastIndexOf = entry.Path.LastIndexOf(Separator, StringComparison.Ordinal);
168 | var filename = entry.Path.Substring(lastIndexOf + 1);
169 |
170 | // Match host OS folder based on minimum length to find top level directory to target
171 | var folder = _folderInfo
172 | .Where(x => GetFullName(x).ToLower().Contains(entry.Path.Substring(0, lastIndexOf).ToLower()))
173 | .OrderBy(x => GetFullName(x).Length)
174 | .FirstOrDefault();
175 |
176 | if (folder == null)
177 | {
178 | Console.WriteLine("Warning: unable to determine target for index entry [{0}]", entry.Path);
179 | continue;
180 | }
181 |
182 | var target = GetFullName(folder) + Separator + filename;
183 | var sourcePath = _gitRepository.Info.WorkingDirectory + entry.Path;
184 | indexChanges[sourcePath] = target;
185 | }
186 |
187 | // Unite the git index with the correct OS folder
188 | Unite(indexChanges);
189 |
190 | return this;
191 | }
192 |
193 | ///
194 | /// Unite filename casing between git index and host OS
195 | ///
196 | private UniteRepository UniteFilenameCasing()
197 | {
198 | if (!_options.HasFlag(OptionFlags.UniteFiles)) return this;
199 |
200 | // The " " at the end of the Path.Combine is a trick to be sure there is a \ at the end of the path
201 | // Otherwise, we will exclude files such as .gitattributes
202 | var dotGitFolderPath = Path.Combine(GetFullName(_gitDirectoryInfo), ".git", " ").TrimEnd();
203 | var files = _gitDirectoryInfo.GetFiles("*", SearchOption.AllDirectories).Where(f => !GetFullName(f).StartsWith(dotGitFolderPath)).ToList();
204 | var filesFullPathMap = new HashSet(files.ConvertAll(GetFullName));
205 | var indexFileEntries = _gitRepository.Index.Where(f => filesFullPathMap.All(s => s.Replace(_gitRepository.Info.WorkingDirectory, string.Empty) != f.Path));
206 |
207 | foreach (var entry in indexFileEntries)
208 | {
209 | var sourcePath = _gitRepository.Info.WorkingDirectory + entry.Path;
210 |
211 | // Match host OS filename based on full pathname ignoring case
212 | var target = files.FirstOrDefault(f => string.Equals(GetFullName(f), sourcePath, StringComparison.CurrentCultureIgnoreCase));
213 | if (target == null) continue;
214 |
215 | // Unite the git index with the correct OS folder
216 | Unite(sourcePath, GetFullName(target));
217 | }
218 | return this;
219 | }
220 |
221 | public void Dispose()
222 | {
223 | _gitRepository?.Dispose();
224 | }
225 | }
226 | }
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.0.23.1/App_Readme/LibGit2Sharp.CHANGES.md:
--------------------------------------------------------------------------------
1 | # LibGit2Sharp Changes
2 |
3 | **LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .Net and Mono.**
4 |
5 | - Source code:
6 | - NuGet package:
7 | - Issue tracker:
8 | - @libgit2sharp:
9 | - CI servers:
10 | - Windows (x86/amd64):
11 | - Linux/Mac OS X:
12 |
13 | ## v0.23.1 + 1
14 |
15 | ### Additions
16 |
17 | ### Changes
18 |
19 | ### Fixes
20 |
21 | ## v0.23.1 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.23..v0.23.1))
22 |
23 | ### Fixes
24 |
25 | - Update to libgit2 0.25.1 which includes security fixes for smart
26 | protocol parsing and TLS certificate validity check callbacks.
27 |
28 | ## v0.23 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.22..v0.23))
29 |
30 | ### Additions
31 |
32 | - Add `CherryPickCommit` and `RevertCommit` to `ObjectDatabase`.
33 | - Add `IncludeIgnored` field to `SatusOptions`.
34 | - Add `Commit.CreateBuffer` to write a commit object to a buffer and
35 | `ObjectDatabase.CreateCommitWithSignature` to create commits which include a
36 | signature.
37 | - Add `Commit.ExtractSignature` to get a commit's signature.
38 | - Add `ObjectDatabase.Write` to write arbitrary objects to the object db.
39 | - Add `Commit.PrettifyMessage`
40 |
41 |
42 | ### Changes
43 |
44 | - The native libraries are now expected to be in the `lib` directory,
45 | instead of `NativeBinaries` for improved mono compatibility. In
46 | addition, the names of platform architectures now better reflect
47 | the vendor naming (eg, `x86_64` instead of `amd64` on Linux).
48 | - Deprecate the config paths in RepositoryOptions
49 | - Deprecate the `QueryBy` overload with `FollowFilter`.
50 | - Deprecate `Branch.Remote` in favour of `Branch.RemoteName`
51 | - `Remote` no longer implement the equality operator.
52 | - `Remote.Update` takes a remote name instead of an instance.
53 | - `Fetch`, `Pull`, `Move`, `Remove`, `Stage` are now in a commands namespace to
54 | indicate what they represent.
55 |
56 | ## v0.22 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.21.1...v0.22))
57 |
58 | ### Additions
59 |
60 | - Add CustomHeaders in the push options (#1217)
61 | - Expose the minimal diff algorithm (#1229)
62 | - Expose Reset() with checkout options (#1219)
63 | - Add a prettify option to history rewrite options (#1185)
64 | - Add option to describe to only follow the first parent (#1190)
65 | - Allow setting the config search path (#1123)
66 | - Provide access to the remote's host HTTPS certificate (#1134)
67 | - Add support for rebase (#964)
68 | - ListReferences() now accepts a credentials provider (#1099)
69 | - Introduce FileStatus.Conflicted and introduce staging of conflicts (#1062)
70 | - Support streaming filters written in C# (#1030)
71 | - Add support for the pre-push callback (#1061)
72 | - Add support for listing remote references without a Repository instance (#1065)
73 | - Add StashCollection.Apply() and .Pop() (#1068)
74 | - Support retrieving a configuration for a repository without instantiating it (#1042)
75 | - Implement 'log --follow'-like functionality (#963)
76 | - Introduce in-memory merging via Repository.MergeCommits() (#990)
77 | - Allow setting whether to prune during a fetch (#1258)
78 |
79 | ### Changes
80 |
81 | - Deprecate MergeConflictException in a backwards-compatible way (#1243)
82 | - Improve type safety in the generic type for Diff.Compare() (#1180)
83 | - Obsolete Repository.Commit(), NoteCollection.Add() and
84 | NoteCollection.Remove() overloads which do not require a signature (#1173)
85 | - BuildSignature() no longer tries to build a signature from the
86 | environment if there is none configured (#1171)
87 | - Rename the commit walker's Since to IncludeReachableFrom and Until to ExcludeReachableFrom (#1069)
88 | - Rename MergeConflictException to CheckoutConflictException to more
89 | accurately reflect what it means (#1059)
90 | - Specify the diff algorithm instead of setting a boolean to use patience (#1043)
91 | - Remove optional parameters (#1031)
92 | - Move Repository.Reset(paths) into Index (#959)
93 | - Move FindMergeBase() overloads to ObjectDatabase (#957)
94 |
95 | ### Fixes
96 |
97 | - ListReferences() is now able to handle symbolic references (#1132)
98 | - Repository.IsValid() returns false on empty paths (#1156)
99 | - The included version of libgit2 includes racy-git support
100 | - Fix a racy NRE in the filters (#1113)
101 |
102 | ## v0.21.1 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.21...v0.21.1))
103 |
104 | ### Changes
105 |
106 | - Fix Fetch() related tests to cope with recent GitHub policy change regarding include-tag handling (#995, #1001)
107 |
108 | ## v0.21 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.20.2...v0.21))
109 |
110 | ### Additions
111 |
112 | - Introduce repo.Index.Add() and repo.Index.Remove() (#907)
113 | - Introduce repo.Describe() (#848)
114 | - Teach Repository.Clone to accept a specific branch to checkout (#650, #882)
115 | - Expose IndexEntry.AssumeUnchanged (#928, #929)
116 | - Introduce GlobalSettings.Version.InformationalVersion (#921)
117 |
118 | ### Changes
119 |
120 | - Deprecate Branch.Checkout() (#937)
121 | - Deprecate GlobalSettings.Version.MajorMinorPatch (#921)
122 | - Change Blob.Size output to a long (#892)
123 | - Update libgit2 binaries to libgit2/libgit2@e0902fb
124 |
125 | ### Fixes
126 |
127 | - Fix Network.Fetch() tags retrieval (#927)
128 | - Fix repo.Stage("*") behavior (#907)
129 | - Plug some memory leaks (#883, #910)
130 | - Protect Repository.Clone() from null parameters (#891)
131 |
132 | ## v0.20.2 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.20.1...v0.20.2))
133 |
134 | ### Fixes
135 |
136 | - Update libgit2 to prevent issues around symbolic links to ".git" folders in trees on Mac
137 |
138 | ## v0.20.1 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.20...v0.20.1))
139 |
140 | ### Fixes
141 |
142 | - Update libgit2 to prevent issues around ".git" folders in trees on Windows and Mac
143 |
144 | ## v0.20 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.19...v0.20))
145 |
146 | ### Additions
147 |
148 | - Teach RemoteUpdater to update the remote url (#803)
149 | - Introduce ObjectDatabase.CreateTree(Index) and Index.Reset(Tree) (#788, #799)
150 | - Add process wide logging feature (#832)
151 | - Add process wide SmartSubtransport registration/unregistration (#528)
152 | - Expose Index.Clear() (#814)
153 |
154 | ### Changes
155 |
156 | - Require Mono 3.6+ on non Windows platform (#800)
157 | - Require NuGet 2.7+ to install the package (#836)
158 | - Throw MergeFetchHeadNotFoundException when Pull cannot find ref to merge (#841)
159 | - Drop Remote.IsSupportedUrl() (#857)
160 | - Deprecate repo.Version in favor of GlobalSettings.Version (#726, #820)
161 | - Remove optional parameters from IRepository (#779, #815)
162 | - Move higher level Index operations to IRepository (#822, #851)
163 | - Deprecate repo.Refs.Move() in favor of repo.Refs.Rename() (#752, #819)
164 | - Update libgit2 binaries to libgit2/libgit2@3f8d005
165 |
166 | ### Fixes
167 |
168 | - Fix compareOptions handling in Diff.Compare (#827, #828)
169 | - Honor MSBuild Publish mechanism (#597, #821)
170 | - Make Configuration.BuildSignature() throw a more descriptive message (#831, #858)
171 | - Prevent Branch.Remote property from throwing when the remote is unresolvable (#823)
172 | - Teach Revert() to clean up repository state when there is nothing to revert (#816)
173 |
174 | ## v0.19 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.18.1...v0.19))
175 |
176 | ### Additions
177 |
178 | - Introduce repo.Network.Remotes.Rename() (#730, #741)
179 | - Introduce repo.ObjectDatabase.ShortenObjectId() (#677)
180 | - Introduce Remote.IsSupportedUrl() (#754)
181 | - Introduce repo.CherryPick() (#755, #756)
182 | - Expose advanced conflict data (REUC, renames) (#748)
183 |
184 | ### Changes
185 |
186 | - Make Patch expose a richer PatchEntryChanges type (#686, #702)
187 | - Make network operations accept Credentials through a callback (#759, #761, #767)
188 | - Make repo.Index.Stage() respect ignored files by default (#777)
189 | - Make OdbBackend IDisposable (#713)
190 | - Update libgit2 binaries to libgit2/libgit2@d28b2b7
191 |
192 | ### Fixes
193 |
194 | - Don't require specific rights to the parent hierarchy of a repository (#795)
195 | - Prevent Clone() from choking on empty packets (#794)
196 | - Ensure Tags can be created in detached Head state (#791)
197 | - Properly determine object size when calculating its CRC (#783)
198 | - Prevent blind fast forwards merges when there are checkout conflicts (#781)
199 | - Make repo.Reset() and repo.Index.Unstage() cope with renamed entries (#777)
200 | - Do not throw when parsing annotated tags without a Signature (#775, #776)
201 | - Remove conflicts upon repo.Index.Remove() call (#768)
202 | - Honor the merge.ff configuration entry (#709)
203 | - Make Clone() properly throws when passed an invalid url (#701)
204 |
205 | ## v0.18.1 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.18.0...v0.18.1))
206 |
207 | ### Additions
208 |
209 | - Make CommitOptions expose additional properties to control how the message should be prettified (#744, #745)
210 |
211 | ### Changes
212 |
213 | - Update libgit2 binaries to libgit2/libgit2@90befde
214 |
215 | ### Fixes
216 |
217 | - Fix issue when cloning from a different local volume (#742, #743)
218 |
219 | ## v0.18.0 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.17.0...v0.18.0))
220 |
221 | ### Additions
222 |
223 | - Introduce repo.Revert() (#706)
224 | - Enhanced control over Merge behavior through MergeOptions (#685)
225 | - Introduce repo.Network.Remotes.Remove() (#729, #731)
226 | - Teach repo.Network.ListReferences() to accept a Credentials (#647, #704)
227 | - Introduce Reference.IsValidName() (#680, #691)
228 | - Introduce Remote.IsValidName() (#679, #690)
229 | - Expose StatusOptions.RecurseIgnoredDirs (#728)
230 | - Introduce GlobalSettings.Features() (#717)
231 | - Make Repository.Version output the libgit2 built-in features (#676, #694)
232 |
233 | ### Changes
234 |
235 | - LibGit2Sharp now requires .Net 4.0 (#654, #678)
236 | - Repository.Checkout() and Branch.Checkout() overloads now accept a CheckoutOptions parameter (#685)
237 | - Deprecate repo.Refs.IsValidName() (#680, #691)
238 | - Deprecate repo.Network.Remotes.IsValidName() (#679, #690)
239 | - Deprecate repo.Branches.Move() in favor of repo.Branches.Rename() (#737, #738)
240 | - Update libgit2 binaries to libgit2/libgit2@2f6f6eb
241 |
242 | ### Fixes
243 |
244 | - Do not fail enumerating the ObjectDatabase content when an unexpected file is found under .git/objects (#704)
245 | - Fix update of HEAD when committing against a bare repository with a temporary working directory (#692)
246 |
247 | ## v0.17.0 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.16.0...v0.17.0))
248 |
249 | ### Additions
250 |
251 | - Introduce Network.Pull() (#643 and #65)
252 | - Introduce DefaultCredentials for NTLM/Negotiate authentication (#660)
253 | - Make repo.Merge() accept a Branch (#643)
254 | - Introduce MergeOptions type, to specify the type of merge and whether to commit or not (#643, #662, #663)
255 | - Teach reference altering methods to let the caller control how the reflog is valued (#612, #505 and #389)
256 | - Teach repo.Commits.FindMergeBase to leverage either Standard or Octopus strategy (#634 and #629)
257 | - Make ObjectDatabase.CreateCommit() accept an option controlling the prettifying of the message (#619)
258 | - Allow notes retrieval by namespace and ObjectId (#653)
259 |
260 | ### Changes
261 |
262 | - Deprecate repo.Commits.FindCommonAncestor() in favor of repo.Commits.FindMergeBase() (#634)
263 | - Deprecate Network.FetchHeads and Repository.MergeHeads (#643)
264 | - Repository.Commit() overloads now accept a CommitOptions parameter (#668)
265 | - Repository.Clone() now accepts a CloneOptions parameter
266 | - Ease testability by making all GetEnumerator() methods fakeable (#646 and #644)
267 | - Update libgit2 binaries to libgit2/libgit2@bcc6229
268 |
269 | ### Fixes
270 |
271 | - Make Branch.Add() and Branch.Move() use the correct indentity to feed the reflog (#612 and #616)
272 | - Fix NullReferenceException occuring in Repository.Clone (#659 and #635)
273 |
274 | ## v0.16.0 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.15.0...v0.16.0))
275 |
276 | ### Additions
277 |
278 | - Introduce Repository.Merge() (#608 and #620)
279 | - Teach Diff.Compare<>() to return a PatchStats (#610)
280 |
281 | ### Changes
282 |
283 | - Speed up NuGet post build copy of the native binaries (#613)
284 |
285 | ### Fixes
286 |
287 | - Fix Remotes.Add(name, url, refspec) to prevent the creation of a default fetch refspec beside the passed in one (#614)
288 | - Make LibGit2SharpException.Data expose the correct libgit2 error categories (#601)
289 |
290 | ## v0.15.0 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.14.1...v0.15.0))
291 |
292 | ### Additions
293 |
294 | - Introduce ObjectDatabase.Archive()
295 | - Introduce Repository.Blame()
296 | - Introduce ObjectDatabase.CalculateHistoryDivergence()
297 | - Add Configuration.Find(regexp)
298 | - Add CommitFilter.FirstParentOnly
299 | - Expose Configuration.BuildSignature()
300 | - Add TreeDefinition.Add(string, TreeEntry)
301 | - Make Remote expose its refspecs
302 |
303 | ### Changes
304 |
305 | - Make Network.Fetch() accepts optional refspec
306 | - Extend Network.Fetch() and ListReferences() to allow downloading from a url
307 | - Allow Network.Push() to control packbuilder parallelism
308 | - Expose Network.Push() progress reporting
309 | - Extend RemoteUpdater to allow updation of refspecs
310 | - Teach Index.RetrieveStatus to detect renames in index and workdir
311 | - Teach NoteCollection to optionally build a Signature from configuration
312 | - Add RewriteHistoryOptions.OnSucceeding and OnError
313 | - Introduce Blob FilteringOptions
314 | - Rename Blob.ContentAsText() as Blob.GetContentText()
315 | - Rename Blob.ContentStream() as Blob.GetContentStream()
316 | - Deprecate Blob.Content
317 | - Teach Diff.Compare<> to detect renames and copies
318 | - Split Patch and TreeChanges generation
319 | - Deprecate ResetOptions in favor of ResetMode.
320 | - Simplify OdbBackend.ReadPrefix() implementation
321 | - Deprecate ObjectId.StartsWith(byte[], int) in favor of ObjectId.StartsWith(string)
322 | - Update libgit2 binaries to libgit2/libgit2@96fb6a6
323 |
324 | ### Fixes
325 |
326 | - Fix building with Mono on OS X (#557)
327 | - Make RetrieveStatus() reload on-disk index beforehand (#322 and #519)
328 |
329 | ## v0.14.1 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.14.0...v0.14.1))
330 |
331 | ### Changes
332 |
333 | - Rename OrphanedHeadException into UnbornBranchException
334 |
335 | ### Fixes
336 |
337 | - Fix handling of http->https redirects
338 | - Make probing for libgit2 binaries work from within the NuGet packages folder
339 | - Accept submodule paths with native directory separators
340 |
341 | ## v0.14.0 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.13.0...v0.14.0))
342 |
343 | ### Additions
344 |
345 | - Introduce Blob.ContentAsText()
346 | - Teach repo.Refs.RewriteHistory() to prune empty commits
347 | - Teach repo.Refs.RewriteHistory() to rewrite symbolic references
348 | - Teach repo.ObjectDatabase to enumerate GitObjects
349 | - Teach Branches.Add() and Move() to append to the reflog
350 | - Honor core.logAllRefUpdates configuration setting
351 | - Add strongly-typed LockedFileException
352 | - Add TreeDefinition.Remove(IEnumerable)
353 | - Introduce ObjectId.StartsWith()
354 | - Introduce repo.Config.GetValueOrDefault()
355 |
356 | ### Changes
357 |
358 | - Introduce RewriteHistoryOptions type and make repo.Refs.RewriteHistory() leverage it
359 | - Introduce CheckoutOptions type and make repo.CheckoutPaths() leverage it
360 | - Obsolete Blob.ContentAsUnicode and Blob.ContentAsUf8
361 | - Make OdbBackend interface ObjectId based
362 | - Update libgit2 binaries to libgit2/libgit2@32e4992
363 |
364 | ### Fixes
365 |
366 | - Ensure repo.Network.Push() overloads pass the Credentials down the call chain
367 | - Make SymbolicReference.Target cope with chained symbolic references
368 | - Do not throw when parsing a Remote with no url
369 | - Prevent files or directories starting with ! from being ignored
370 | - Teach Index.Stage to stage files in ignored dirs
371 |
372 | ## v0.13.0 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.12.0...v0.13.0))
373 |
374 | ### Additions
375 |
376 | - Teach Repository to Checkout paths
377 | - Teach Checkout() to cope with revparse extended syntax leading to references
378 | - Make Stash expose Base, Index and Untracked commits
379 | - Teach Repository.Init() to set up a separate git directory
380 | - Teach checkout to report notifications
381 | - Create a new repo.Checkout() overload which accepts a Commit object
382 | - Allow ObjectDatabase.CreateBlob() to limit the number of bytes to consume
383 | - Make ObjectDatabase.CreateBlob() accept a Stream
384 | - Introduce repo.Refs.RewriteHistory()
385 | - Introduce repo.Refs.ReachableFrom()
386 | - Introduce TreeDefinition.From(Commit)
387 | - Expose TagFetchMode property on Remote type
388 | - Add CopyNativeDependencies.targets
389 |
390 | ### Changes
391 |
392 | - Rename CheckoutOptions into CheckoutModifiers
393 | - Rename DiffOptions into DiffModifiers
394 | - Rename StashOptions into StashModifiers
395 | - Rename GitSortOptions into CommitSortStrategies
396 | - Rename Filter into CommitFilter
397 | - Rename ObjectDatabase.CreateTag into ObjectDatabase.CreateTagAnnotation
398 | - Obsolete repo.Clone() overload which returns a Repository
399 | - Obsolete repo.Init() overload which returns a Repository
400 | - Obsolete ObjectDatabase.CreateBlob(BinaryReader, string)
401 | - Update libgit2 binaries to libgit2/libgit2@7940036
402 |
403 | ### Fixes
404 |
405 | - Fetch should respect the remote's configured tagopt setting unless explicitly specified
406 |
407 | ## v0.12.0 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.11.0...v0.12.0))
408 |
409 | ### Additions
410 |
411 | - Introduce repo.Info.IsShallow
412 | - Teach repo.Reset to append to the Reflog
413 | - Introduce repo.ObjectDatabase.CreateTag()
414 | - Make repo.Diff.Compare() able to define the expected number of context and interhunk lines (#423)
415 |
416 | ### Changes
417 |
418 | - Obsolete TreeEntryTargetType.Tag
419 | - Update libgit2 binaries to libgit2/libgit2@9d9fff3
420 |
421 | ### Fixes
422 |
423 | - Change probing mechanism to rely on specifically named versions of libgit2 binaries (#241)
424 | - Ensure that two versions of LibGit2Sharp can run side by side (#241)
425 |
426 | ## v0.11.0 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.10.0...v0.11.0))
427 |
428 | ### Additions
429 |
430 | - Introduce Repository.Refs.Log()
431 | - Teach Checkout() and Commit() to append to the reflog
432 | - Teach Refs.Add(), Refs.UpdateTarget() to optionally append to the reflog
433 | - Add Repository.Submodules namespace
434 | - Add submodule support to Index.Stage()
435 | - Add TreeDefinition.Add(Submodule) and TreeDefinition.AddGitLink()
436 | - Introduce ExplicitPathsOptions type to control handling of unmatched pathspecs
437 | - Make Index.Remove(), Index.Unstage()/Stage(), Diff.Compare() and Reset() accept ExplicitPathsOptions
438 | - Add an indexer to the StashCollection
439 | - Add the UpstreamBranchCanonicalName property to Branch
440 | - Make Push accept Branch instances
441 | - Introduce Reference.IsTag, Reference.IsLocalBranch and Reference.IsRemoteTrackingBranch
442 | - Add Repository.IsValid()
443 | - Refine build resilience on Linux
444 |
445 | ### Changes
446 |
447 | - Obsolete Tree.Trees and Tree.Blobs properties
448 | - Replace GitObjectType with ObjectType and TreeEntryTargetType
449 | - Rename TreeEntry.Type and TreeEntryDefinition.Type to *.TargetType
450 | - Move Repository.Conflicts to Index.Conflicts
451 | - Move Remote.Fetch() in Repository.Network
452 | - Modify StashCollection.Remove() to accept an integer param rather than a revparse expression
453 | - Rename BranchUpdater.Upstream to TrackedBranch
454 | - Rename BranchUpdater.UpstreamMergeBranch to UpstreamBranch
455 | - Rename BranchUpdater.UpstreamRemote to Remote
456 |
457 | ### Fixes
458 |
459 | - Make Commit() append to the reflog (#371)
460 | - Make Index.Remove() able to only remove from index (#270)
461 | - Teach Index.Remove() to clear the associated conflicts (#325)
462 | - Make Index.Remove() able to remove folders (#327)
463 | - Fix repo.Checkout() when working against repo.Head
464 | - Fix update of the target of repo.Refs.Head
465 | - Teach Checkout() to cope with revparse syntax
466 | - Support TreeEntry.Target for GitLink entries
467 |
468 | ## v0.10.0 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.9.5...v0.10.0))
469 |
470 | ### Additions
471 |
472 | - Update working directory on checkout
473 | - New network related features: clone, fetch, push, list remote references
474 | - Expose the heads that have been updated during the last fetch in Repository.Network.FetchHeads
475 | - Introduce Repository.Network.Remotes.IsValidName()
476 | - New .gitignore related features: temporary rules, path checking
477 | - Add support for custom, managed ODB backends
478 | - Add revparse support in Repository.Lookup()
479 | - Improve Repository.Commit(): add merged branches as parents, cleanup merge data
480 | - Introduce Blob.IsBinary
481 | - Add strongly-typed exceptions (NonFastForwardException, UnmergedIndexEntriesException, ...)
482 | - Add basic stashing support: add, retrieve, list and remove
483 | - Add git clean support in Repository.RemoveUntrackedFiles()
484 | - Add shortcut to HEAD in Repository.Refs.Head
485 | - Introduce Repository.Refs.IsValidName()
486 | - Add Repository.Refs.FromGlob() to enumerate references matching a specified glob
487 | - Add support for XDG configuration store
488 | - Make Config.Get() and Config.Delete() able to target a specific store
489 | - Diff.Compare() enhancements: work against workdir and index, consider untracked changes, expose typechanges
490 | - Allow retrieval of the remote of a non-local branch through Branch.Remote
491 | - Allow modification of the branch properties through Repository.Branches.Update()
492 | - Expose merge related information: Repository.Index.IsFullyMerged, Repository.Conflicts, IndexEntry.StageLevel
493 | - Expose the heads being merged in Repository.MergeHeads
494 | - Introduce IndexEntry.Mode
495 | - Add more repository information: Repository.Info.CurrentOperation, Repository.Info.Message, Repository.Info.IsHeadOrphaned
496 | - Allow passing an optional RepositoryOptions to Repository.Init()
497 | - Allow reset filtering by passing a list of paths to consider
498 |
499 | ### Changes
500 |
501 | - Make TreeChanges and TreeEntryChanges expose native paths
502 | - Make Repository.Reset accept a Commit instead of a string
503 | - Stop sorting collections (references, remotes, notes ...)
504 | - Move AheadBy/BehindBy into new Branch.TrackingDetails
505 | - Move Repository.Remotes to Repository.Network.Remotes
506 | - Move Configuration.HasXXXConfig() to Configuration.HasConfig()
507 | - Rename CommitCollection to CommitLog
508 | - Rename LibGit2Exception to LibGit2SharpException
509 | - Rename Delete() to Unset() in Configuration
510 | - Rename Delete() to Remove() in TagCollection, ReferenceCollection, NoteCollection, BranchCollection
511 | - Rename Create() to Add() in TagCollection, BranchCollection, ReferenceCollection, RemoteCollection, NoteCollection
512 | - Obsolete RepositoryInformation.IsEmpty, DiffTarget, IndexEntry.State, Commit.ParentsCount
513 |
514 | ### Fixes
515 |
516 | - Allow abstracting LibGit2Sharp in testing context (#138)
517 | - Ease the detection of a specific key in a specific store (#162)
518 | - Expose libgit2 error information through the LibGit2SharpException.Data property(#137)
519 | - Preserve non-ASCII characters in commit messages (#191)
520 | - Fix retrieval of the author of a commit (#242)
521 | - Prevent duplicated tree entries in commits (#243)
522 | - Fix Repository.Discover behaviour with UNC paths (#256)
523 | - Make Index.Unstage work against an orphaned head (#257)
524 | - Make IsTracking & TrackedBranch property not throw for a detached head (#266, #268)
525 |
526 | ## v0.9.5 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.9.0...v0.9.5))
527 |
528 | ### Additions
529 |
530 | - Add support to create, retrieve, list and remove object notes (#140)
531 | - Make Repository able to rely on specified global and system config files (#157)
532 |
533 | ### Changes
534 |
535 | - Remove repo.Branches.Checkout()
536 | - Remove Tree.Files
537 | - Update libgit2 binaries to libgit2/libgit2@4c977a6
538 |
539 | ### Fixes
540 |
541 | - Allow initialization of a repository located on a network path (#153)
542 |
543 | ## v0.9 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.8.0...v0.9.0))
544 |
545 | ### Additions
546 |
547 | - Support local tracking branches (#113)
548 | - Add an Ignored collection to the RepositoryStatus type (#120)
549 | - Expose the relative path of TreeEntries (#122)
550 | - Make Repository able to work against specified index and workdir (#132)
551 | - Direct creation or Blobs, Trees and Commits without the workdir nor index involvement (#135)
552 | - New Diff namespace: supports tree-to-tree, tree-to-index and blob-to-blob comparisons (#136)
553 | - Add Commits.FindCommonAncestor() (#149)
554 |
555 | ### Changes
556 |
557 | - Deprecate repo.Branches.Checkout() in favor of repo.Checkout()
558 | - Deprecate Tree.Files in favor of Tree.Blobs
559 | - Update libgit2 binaries to libgit2/libgit2@7a361e9
560 |
561 | ### Fixes
562 |
563 | - Embed both x86 and amd64 compiled versions of libgit2 binaries (#55, #70)
564 | - Honor symbolically linked global .gitconfig (#84)
565 | - Ease the creation of a remote (#114)
566 | - Prevent memory issues when revwalking a large repository (#115)
567 | - Cleanup commit and tag messages (#117)
568 | - Make RetrieveStatus() return correct results (#123)
569 | - Allow staging on a network shared repository (#125)
570 |
571 | ## v0.8 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.7.0...v0.8.0))
572 |
573 | ### Additions
574 |
575 | - Add Repository.Reset() and support of Soft and Mixed modes
576 | - Make Repository.Commit() able to amend the current tip of the Head
577 | - Make the constructor of Repository able to open a repository from a working directory path
578 | - Make Repository.Index.RetriveStatus honor the .gitgnore files
579 |
580 | ### Changes
581 |
582 | - Remove Repository.HasObject()
583 | - Change Repository.Init() to make it return an instance of the Repository type, instead of a string containing the path of the repository
584 | - Update libgit2 binaries to libgit2/libgit2@6d39c0d
585 |
586 | ### Fixes
587 |
588 | - Reinit a repository doesn't throw anymore (#54)
589 | - Embedded libgit2 binaries are now compiled with THREADSAFE=ON flag (#64)
590 | - Prevent Repository.Head.IsCurrentRepositoryHead from throwing when the Repository is empty (#105)
591 |
592 | ## v0.7 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.6.2...v0.7.0))
593 |
594 | ### Additions
595 |
596 | - Allow access to System and Global configuration outside the context of a repo
597 | - Add overloads to index methods that accept collection of paths
598 |
599 | ### Changes
600 |
601 | - Make Index.RetrieveStatus() return native file paths
602 | - Make IndexEntry able to cope with native file paths
603 | - Update libgit2 binaries to libgit2/libgit2@be00b00
604 | - Deprecate Repository.HasObject()
605 |
606 | ### Fixes
607 |
608 | - Fix the build script to be fully XBuild compatible on Linux/Mono 2.10
609 | - Fix Index.Remove() to correctly handle files which have been deleted and modified in the working directory
610 |
611 | ## v0.6.2 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.6.1...v0.6.2))
612 |
613 | ### Fixes
614 |
615 | - Make Index methods (Stage, Unstage, Move... ) able to cope with native Windows directory separator char
616 |
617 | ## v0.6.1 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.6.0...v0.6.1))
618 |
619 | ### Changes
620 |
621 | - Update libgit2 binaries to libgit2/libgit2@e3baa3c
622 |
623 | ### Fixes
624 |
625 | - Prevent segfault when determining the status a of repository
626 | - Fix retrieval of buggy status in some (not that rare) cases
627 |
628 | ## v0.6 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.5.0...v0.6.0))
629 |
630 | ### Additions
631 |
632 | - Add Configuration.Get() overload that takes key in parts
633 | - Add tracking branch details (#75)
634 | - Allow creation of commit using signature from configuration files
635 | - Add Index.Remove() (#78)
636 | - Add a string indexer to the Commit and Tree types in order to ease retrieval of TreeEntries
637 |
638 | ### Changes
639 |
640 | - Provide default value for non existent configuration setting (#67)
641 | - Change the tree structure into which libgit2 binaries are located (#70)
642 | - Update libgit2 binaries to libgit2/libgit2@28c1451
643 |
644 | ### Fixes
645 |
646 | - Prevent enumeration of branches from throwing when the repository contains remote branches (#69)
647 | - Fix Index.Stage(), Index.Unstage() (#78)
648 |
649 | ## v0.5 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.4.0...v0.5.0))
650 |
651 | ### Additions
652 |
653 | - Add Repository.Index.RetrieveStatus() (#49)
654 | - Add handling of configuration settings of the repository and retrieval of Remotes (#60)
655 |
656 | ### Changes
657 |
658 | - Can now enumerate from multiple starting points
659 | - While enumerating commits, automatically dereference objects to a commit object id
660 | - Defer resolving of Branch.Tip, Tag.Target and Tag.Annotation
661 | - Replace usage of ApplicationException with LibGit2Exception
662 | - Update libgit2 binaries to libgit2/libgit2@35e9407
663 |
664 | ### Fixes
665 |
666 | - Prevent enumeration of commits from throwing when starting from a tag which points at a blob or a tree (#62)
667 | - Prevent a branch from being removed if it's the current HEAD
668 | - References are now being enumerated in a ordered way
669 | - Fix Repository.Discover() implementation when no .git folder exists
670 |
671 | ## v0.4 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.3.0...v0.4.0))
672 |
673 | ### Additions
674 |
675 | - Add Repository.Index.Move()
676 | - Add handling of abbreviated identifiers
677 | - Add Repository.Discover() (#25)
678 | - Add TreeEntry.Type
679 |
680 | ### Changes
681 |
682 | - Propagate libgit2 error messages upward
683 | - Update libgit2 binaries to libgit2/libgit2@33afca4
684 |
685 | ### Fixes
686 |
687 | - Prevents GitSharp from throwing when browsing a repository initialized with LibGit2Sharp (#56)
688 | - Hide the .git directory when initializing a new standard repository (#53)
689 | - Fix Repository.IsEmpty implementation when HEAD is in detached state (#52)
690 | - Relaxed handling of bogus signatures (#51)
691 | - Improve Mono compatibility (#46 and #47)
692 | - Remove dependency to msvcr100.dll
693 |
694 | ## v0.3 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.2.0...v0.3.0))
695 |
696 | ### Additions
697 |
698 | - Add basic Commit feature (#32)
699 | - Add Repository.Index.Unstage()
700 | - Add branch renaming feature
701 | - Add symbolsource.org support (#37)
702 |
703 | ### Changes
704 |
705 | - Make Repository.Head return a Branch instead of a Reference
706 | - Defer resolving of Repository.Info
707 | - Update libgit2 binaries to libgit2/libgit2@a5aa5bd
708 | - Improved Mono compatibility (#34)
709 |
710 | ### Fixes
711 |
712 | - Add required msvcr100.dll dependency (#43)
713 | - Fix index updating issue
714 | - Fix branch creation issue
715 |
716 | ## v0.2.0 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.1.1...v0.2.0))
717 |
718 | ### Changes
719 |
720 | - Update CommitCollection API to query commits
721 | - Update libgit2 binaries to libgit2/libgit2@4191d52
722 |
723 | ### Fixes
724 |
725 | - Fix Repository.Info.IsEmpty
726 | - Fix default CommitCollection sorting behavior
727 | - Fix creation of reference to prevent it from choking on corrupted ones
728 | - Fix interop issue in a IIS hosted application
729 |
730 | ## v0.1.1 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.1.0...v0.1.1))
731 |
732 | ### Additions
733 |
734 | - Update staging mechanism to authorize full paths to be used (#23)
735 |
736 | ### Fixes
737 |
738 | - Fix NuGet packaging
739 |
740 | ## v0.1.0
741 |
742 | - Initial release
743 |
--------------------------------------------------------------------------------
/Tools/psake.psm1:
--------------------------------------------------------------------------------
1 | # psake
2 | # Copyright (c) 2012 James Kovacs
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | # THE SOFTWARE.
20 |
21 | #Requires -Version 2.0
22 |
23 | if ($PSVersionTable.PSVersion.Major -ge 3)
24 | {
25 | $script:IgnoreError = 'Ignore'
26 | }
27 | else
28 | {
29 | $script:IgnoreError = 'SilentlyContinue'
30 | }
31 |
32 | #-- Public Module Functions --#
33 |
34 | # .ExternalHelp psake.psm1-help.xml
35 | function Invoke-Task
36 | {
37 | [CmdletBinding()]
38 | param(
39 | [Parameter(Position=0,Mandatory=1)] [string]$taskName
40 | )
41 |
42 | Assert $taskName ($msgs.error_invalid_task_name)
43 |
44 | $taskKey = $taskName.ToLower()
45 |
46 | if ($currentContext.aliases.Contains($taskKey)) {
47 | $taskName = $currentContext.aliases.$taskKey.Name
48 | $taskKey = $taskName.ToLower()
49 | }
50 |
51 | $currentContext = $psake.context.Peek()
52 |
53 | Assert ($currentContext.tasks.Contains($taskKey)) ($msgs.error_task_name_does_not_exist -f $taskName)
54 |
55 | if ($currentContext.executedTasks.Contains($taskKey)) { return }
56 |
57 | Assert (!$currentContext.callStack.Contains($taskKey)) ($msgs.error_circular_reference -f $taskName)
58 |
59 | $currentContext.callStack.Push($taskKey)
60 |
61 | $task = $currentContext.tasks.$taskKey
62 |
63 | $precondition_is_valid = & $task.Precondition
64 |
65 | if (!$precondition_is_valid) {
66 | WriteColoredOutput ($msgs.precondition_was_false -f $taskName) -foregroundcolor Cyan
67 | } else {
68 | if ($taskKey -ne 'default') {
69 |
70 | if ($task.PreAction -or $task.PostAction) {
71 | Assert ($task.Action -ne $null) ($msgs.error_missing_action_parameter -f $taskName)
72 | }
73 |
74 | if ($task.Action) {
75 | try {
76 | foreach($childTask in $task.DependsOn) {
77 | Invoke-Task $childTask
78 | }
79 |
80 | $stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
81 | $currentContext.currentTaskName = $taskName
82 |
83 | & $currentContext.taskSetupScriptBlock
84 |
85 | if ($task.PreAction) {
86 | & $task.PreAction
87 | }
88 |
89 | if ($currentContext.config.taskNameFormat -is [ScriptBlock]) {
90 | & $currentContext.config.taskNameFormat $taskName
91 | } else {
92 | WriteColoredOutput ($currentContext.config.taskNameFormat -f $taskName) -foregroundcolor Cyan
93 | }
94 |
95 | foreach ($variable in $task.requiredVariables) {
96 | Assert ((test-path "variable:$variable") -and ((get-variable $variable).Value -ne $null)) ($msgs.required_variable_not_set -f $variable, $taskName)
97 | }
98 |
99 | & $task.Action
100 |
101 | if ($task.PostAction) {
102 | & $task.PostAction
103 | }
104 |
105 | & $currentContext.taskTearDownScriptBlock
106 | $task.Duration = $stopwatch.Elapsed
107 | } catch {
108 | if ($task.ContinueOnError) {
109 | "-"*70
110 | WriteColoredOutput ($msgs.continue_on_error -f $taskName,$_) -foregroundcolor Yellow
111 | "-"*70
112 | $task.Duration = $stopwatch.Elapsed
113 | } else {
114 | throw $_
115 | }
116 | }
117 | } else {
118 | # no action was specified but we still execute all the dependencies
119 | foreach($childTask in $task.DependsOn) {
120 | Invoke-Task $childTask
121 | }
122 | }
123 | } else {
124 | foreach($childTask in $task.DependsOn) {
125 | Invoke-Task $childTask
126 | }
127 | }
128 |
129 | Assert (& $task.Postcondition) ($msgs.postcondition_failed -f $taskName)
130 | }
131 |
132 | $poppedTaskKey = $currentContext.callStack.Pop()
133 | Assert ($poppedTaskKey -eq $taskKey) ($msgs.error_corrupt_callstack -f $taskKey,$poppedTaskKey)
134 |
135 | $currentContext.executedTasks.Push($taskKey)
136 | }
137 |
138 | # .ExternalHelp psake.psm1-help.xml
139 | function Exec
140 | {
141 | [CmdletBinding()]
142 | param(
143 | [Parameter(Position=0,Mandatory=1)][scriptblock]$cmd,
144 | [Parameter(Position=1,Mandatory=0)][string]$errorMessage = ($msgs.error_bad_command -f $cmd),
145 | [Parameter(Position=2,Mandatory=0)][int]$maxRetries = 0,
146 | [Parameter(Position=3,Mandatory=0)][string]$retryTriggerErrorPattern = $null
147 | )
148 |
149 | $tryCount = 1
150 |
151 | do {
152 | try {
153 | $global:lastexitcode = 0
154 | & $cmd
155 | if ($lastexitcode -ne 0) {
156 | throw ("Exec: " + $errorMessage)
157 | }
158 | break
159 | }
160 | catch [Exception]
161 | {
162 | if ($tryCount -gt $maxRetries) {
163 | throw $_
164 | }
165 |
166 | if ($retryTriggerErrorPattern -ne $null) {
167 | $isMatch = [regex]::IsMatch($_.Exception.Message, $retryTriggerErrorPattern)
168 |
169 | if ($isMatch -eq $false) {
170 | throw $_
171 | }
172 | }
173 |
174 | Write-Host "Try $tryCount failed, retrying again in 1 second..."
175 |
176 | $tryCount++
177 |
178 | [System.Threading.Thread]::Sleep([System.TimeSpan]::FromSeconds(1))
179 | }
180 | }
181 | while ($true)
182 | }
183 |
184 | # .ExternalHelp psake.psm1-help.xml
185 | function Assert
186 | {
187 | [CmdletBinding()]
188 | param(
189 | [Parameter(Position=0,Mandatory=1)]$conditionToCheck,
190 | [Parameter(Position=1,Mandatory=1)]$failureMessage
191 | )
192 | if (!$conditionToCheck) {
193 | throw ("Assert: " + $failureMessage)
194 | }
195 | }
196 |
197 | # .ExternalHelp psake.psm1-help.xml
198 | function Task
199 | {
200 | [CmdletBinding()]
201 | param(
202 | [Parameter(Position=0,Mandatory=1)][string]$name = $null,
203 | [Parameter(Position=1,Mandatory=0)][scriptblock]$action = $null,
204 | [Parameter(Position=2,Mandatory=0)][scriptblock]$preaction = $null,
205 | [Parameter(Position=3,Mandatory=0)][scriptblock]$postaction = $null,
206 | [Parameter(Position=4,Mandatory=0)][scriptblock]$precondition = {$true},
207 | [Parameter(Position=5,Mandatory=0)][scriptblock]$postcondition = {$true},
208 | [Parameter(Position=6,Mandatory=0)][switch]$continueOnError = $false,
209 | [Parameter(Position=7,Mandatory=0)][string[]]$depends = @(),
210 | [Parameter(Position=8,Mandatory=0)][string[]]$requiredVariables = @(),
211 | [Parameter(Position=9,Mandatory=0)][string]$description = $null,
212 | [Parameter(Position=10,Mandatory=0)][string]$alias = $null
213 | )
214 | if ($name -eq 'default') {
215 | Assert (!$action) ($msgs.error_default_task_cannot_have_action)
216 | }
217 |
218 | $newTask = @{
219 | Name = $name
220 | DependsOn = $depends
221 | PreAction = $preaction
222 | Action = $action
223 | PostAction = $postaction
224 | Precondition = $precondition
225 | Postcondition = $postcondition
226 | ContinueOnError = $continueOnError
227 | Description = $description
228 | Duration = [System.TimeSpan]::Zero
229 | RequiredVariables = $requiredVariables
230 | Alias = $alias
231 | }
232 |
233 | $taskKey = $name.ToLower()
234 |
235 | $currentContext = $psake.context.Peek()
236 |
237 | Assert (!$currentContext.tasks.ContainsKey($taskKey)) ($msgs.error_duplicate_task_name -f $name)
238 |
239 | $currentContext.tasks.$taskKey = $newTask
240 |
241 | if($alias)
242 | {
243 | $aliasKey = $alias.ToLower()
244 |
245 | Assert (!$currentContext.aliases.ContainsKey($aliasKey)) ($msgs.error_duplicate_alias_name -f $alias)
246 |
247 | $currentContext.aliases.$aliasKey = $newTask
248 | }
249 | }
250 |
251 | # .ExternalHelp psake.psm1-help.xml
252 | function Properties {
253 | [CmdletBinding()]
254 | param(
255 | [Parameter(Position=0,Mandatory=1)][scriptblock]$properties
256 | )
257 | $psake.context.Peek().properties += $properties
258 | }
259 |
260 | # .ExternalHelp psake.psm1-help.xml
261 | function Include {
262 | [CmdletBinding()]
263 | param(
264 | [Parameter(Position=0,Mandatory=1)][string]$fileNamePathToInclude
265 | )
266 | Assert (test-path $fileNamePathToInclude -pathType Leaf) ($msgs.error_invalid_include_path -f $fileNamePathToInclude)
267 | $psake.context.Peek().includes.Enqueue((Resolve-Path $fileNamePathToInclude));
268 | }
269 |
270 | # .ExternalHelp psake.psm1-help.xml
271 | function FormatTaskName {
272 | [CmdletBinding()]
273 | param(
274 | [Parameter(Position=0,Mandatory=1)]$format
275 | )
276 | $psake.context.Peek().config.taskNameFormat = $format
277 | }
278 |
279 | # .ExternalHelp psake.psm1-help.xml
280 | function TaskSetup {
281 | [CmdletBinding()]
282 | param(
283 | [Parameter(Position=0,Mandatory=1)][scriptblock]$setup
284 | )
285 | $psake.context.Peek().taskSetupScriptBlock = $setup
286 | }
287 |
288 | # .ExternalHelp psake.psm1-help.xml
289 | function TaskTearDown {
290 | [CmdletBinding()]
291 | param(
292 | [Parameter(Position=0,Mandatory=1)][scriptblock]$teardown
293 | )
294 | $psake.context.Peek().taskTearDownScriptBlock = $teardown
295 | }
296 |
297 | # .ExternalHelp psake.psm1-help.xml
298 | function Framework {
299 | [CmdletBinding()]
300 | param(
301 | [Parameter(Position=0,Mandatory=1)][string]$framework
302 | )
303 | $psake.context.Peek().config.framework = $framework
304 | ConfigureBuildEnvironment
305 | }
306 |
307 | # .ExternalHelp psake.psm1-help.xml
308 | function Get-PSakeScriptTasks {
309 | [CmdletBinding()]
310 | param(
311 | [Parameter(Position = 0, Mandatory = 0)][string] $buildFile
312 | )
313 |
314 | if (!$buildFile) {
315 | $buildFile = $psake.config_default.buildFileName
316 | }
317 |
318 | try
319 | {
320 | ExecuteInBuildFileScope $buildFile $MyInvocation.MyCommand.Module {
321 | param($currentContext, $module)
322 | return GetTasksFromContext $currentContext
323 | }
324 |
325 | } finally {
326 |
327 | CleanupEnvironment
328 | }
329 | }
330 |
331 | # .ExternalHelp psake.psm1-help.xml
332 | function Invoke-psake {
333 | [CmdletBinding()]
334 | param(
335 | [Parameter(Position = 0, Mandatory = 0)][string] $buildFile,
336 | [Parameter(Position = 1, Mandatory = 0)][string[]] $taskList = @(),
337 | [Parameter(Position = 2, Mandatory = 0)][string] $framework,
338 | [Parameter(Position = 3, Mandatory = 0)][switch] $docs = $false,
339 | [Parameter(Position = 4, Mandatory = 0)][hashtable] $parameters = @{},
340 | [Parameter(Position = 5, Mandatory = 0)][hashtable] $properties = @{},
341 | [Parameter(Position = 6, Mandatory = 0)][alias("init")][scriptblock] $initialization = {},
342 | [Parameter(Position = 7, Mandatory = 0)][switch] $nologo = $false,
343 | [Parameter(Position = 8, Mandatory = 0)][switch] $detailedDocs = $false,
344 | [Parameter(Position = 9, Mandatory = 0)][switch] $notr = $false # disable time report
345 | )
346 | try {
347 | if (-not $nologo) {
348 | "psake version {0}`nCopyright (c) 2010-2014 James Kovacs & Contributors`n" -f $psake.version
349 | }
350 |
351 | if (!$buildFile) {
352 | $buildFile = $psake.config_default.buildFileName
353 | }
354 | elseif (!(test-path $buildFile -pathType Leaf) -and (test-path $psake.config_default.buildFileName -pathType Leaf)) {
355 | # If the $config.buildFileName file exists and the given "buildfile" isn 't found assume that the given
356 | # $buildFile is actually the target Tasks to execute in the $config.buildFileName script.
357 | $taskList = $buildFile.Split(', ')
358 | $buildFile = $psake.config_default.buildFileName
359 | }
360 |
361 | ExecuteInBuildFileScope $buildFile $MyInvocation.MyCommand.Module {
362 | param($currentContext, $module)
363 |
364 | $stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
365 |
366 | if ($docs -or $detailedDocs) {
367 | WriteDocumentation($detailedDocs)
368 | return
369 | }
370 |
371 | foreach ($key in $parameters.keys) {
372 | if (test-path "variable:\$key") {
373 | set-item -path "variable:\$key" -value $parameters.$key -WhatIf:$false -Confirm:$false | out-null
374 | } else {
375 | new-item -path "variable:\$key" -value $parameters.$key -WhatIf:$false -Confirm:$false | out-null
376 | }
377 | }
378 |
379 | # The initial dot (.) indicates that variables initialized/modified in the propertyBlock are available in the parent scope.
380 | foreach ($propertyBlock in $currentContext.properties) {
381 | . $propertyBlock
382 | }
383 |
384 | foreach ($key in $properties.keys) {
385 | if (test-path "variable:\$key") {
386 | set-item -path "variable:\$key" -value $properties.$key -WhatIf:$false -Confirm:$false | out-null
387 | }
388 | }
389 |
390 | # Simple dot sourcing will not work. We have to force the script block into our
391 | # module's scope in order to initialize variables properly.
392 | . $module $initialization
393 |
394 | # Execute the list of tasks or the default task
395 | if ($taskList) {
396 | foreach ($task in $taskList) {
397 | invoke-task $task
398 | }
399 | } elseif ($currentContext.tasks.default) {
400 | invoke-task default
401 | } else {
402 | throw $msgs.error_no_default_task
403 | }
404 |
405 | WriteColoredOutput ("`n" + $msgs.build_success + "`n") -foregroundcolor Green
406 |
407 | $stopwatch.Stop()
408 | if (-not $notr) {
409 | WriteTaskTimeSummary $stopwatch.Elapsed
410 | }
411 | }
412 |
413 | $psake.build_success = $true
414 |
415 | } catch {
416 | $currentConfig = GetCurrentConfigurationOrDefault
417 | if ($currentConfig.verboseError) {
418 | $error_message = "{0}: An Error Occurred. See Error Details Below: `n" -f (Get-Date)
419 | $error_message += ("-" * 70) + "`n"
420 | $error_message += "Error: {0}`n" -f (ResolveError $_ -Short)
421 | $error_message += ("-" * 70) + "`n"
422 | $error_message += ResolveError $_
423 | $error_message += ("-" * 70) + "`n"
424 | $error_message += "Script Variables" + "`n"
425 | $error_message += ("-" * 70) + "`n"
426 | $error_message += get-variable -scope script | format-table | out-string
427 | } else {
428 | # ($_ | Out-String) gets error messages with source information included.
429 | $error_message = "Error: {0}: `n{1}" -f (Get-Date), (ResolveError $_ -Short)
430 | }
431 |
432 | $psake.build_success = $false
433 |
434 | # if we are running in a nested scope (i.e. running a psake script from a psake script) then we need to re-throw the exception
435 | # so that the parent script will fail otherwise the parent script will report a successful build
436 | $inNestedScope = ($psake.context.count -gt 1)
437 | if ( $inNestedScope ) {
438 | throw $_
439 | } else {
440 | if (!$psake.run_by_psake_build_tester) {
441 | WriteColoredOutput $error_message -foregroundcolor Red
442 | }
443 | }
444 | } finally {
445 | CleanupEnvironment
446 | }
447 | }
448 |
449 | #-- Private Module Functions --#
450 | function WriteColoredOutput {
451 | param(
452 | [string] $message,
453 | [System.ConsoleColor] $foregroundcolor
454 | )
455 |
456 | $currentConfig = GetCurrentConfigurationOrDefault
457 | if ($currentConfig.coloredOutput -eq $true) {
458 | if (($Host.UI -ne $null) -and ($Host.UI.RawUI -ne $null) -and ($Host.UI.RawUI.ForegroundColor -ne $null)) {
459 | $previousColor = $Host.UI.RawUI.ForegroundColor
460 | $Host.UI.RawUI.ForegroundColor = $foregroundcolor
461 | }
462 | }
463 |
464 | $message
465 |
466 | if ($previousColor -ne $null) {
467 | $Host.UI.RawUI.ForegroundColor = $previousColor
468 | }
469 | }
470 |
471 | function LoadModules {
472 | $currentConfig = $psake.context.peek().config
473 | if ($currentConfig.modules) {
474 |
475 | $scope = $currentConfig.moduleScope
476 |
477 | $global = [string]::Equals($scope, "global", [StringComparison]::CurrentCultureIgnoreCase)
478 |
479 | $currentConfig.modules | foreach {
480 | resolve-path $_ | foreach {
481 | "Loading module: $_"
482 | $module = import-module $_ -passthru -DisableNameChecking -global:$global
483 | if (!$module) {
484 | throw ($msgs.error_loading_module -f $_.Name)
485 | }
486 | }
487 | }
488 | ""
489 | }
490 | }
491 |
492 | function LoadConfiguration {
493 | param(
494 | [string] $configdir = $PSScriptRoot
495 | )
496 |
497 | $psakeConfigFilePath = (join-path $configdir "psake-config.ps1")
498 |
499 | if (test-path $psakeConfigFilePath -pathType Leaf) {
500 | try {
501 | $config = GetCurrentConfigurationOrDefault
502 | . $psakeConfigFilePath
503 | } catch {
504 | throw "Error Loading Configuration from psake-config.ps1: " + $_
505 | }
506 | }
507 | }
508 |
509 | function GetCurrentConfigurationOrDefault() {
510 | if ($psake.context.count -gt 0) {
511 | return $psake.context.peek().config
512 | } else {
513 | return $psake.config_default
514 | }
515 | }
516 |
517 | function CreateConfigurationForNewContext {
518 | param(
519 | [string] $buildFile,
520 | [string] $framework
521 | )
522 |
523 | $previousConfig = GetCurrentConfigurationOrDefault
524 |
525 | $config = new-object psobject -property @{
526 | buildFileName = $previousConfig.buildFileName;
527 | framework = $previousConfig.framework;
528 | taskNameFormat = $previousConfig.taskNameFormat;
529 | verboseError = $previousConfig.verboseError;
530 | coloredOutput = $previousConfig.coloredOutput;
531 | modules = $previousConfig.modules;
532 | moduleScope = $previousConfig.moduleScope;
533 | }
534 |
535 | if ($framework) {
536 | $config.framework = $framework;
537 | }
538 |
539 | if ($buildFile) {
540 | $config.buildFileName = $buildFile;
541 | }
542 |
543 | return $config
544 | }
545 |
546 | function ConfigureBuildEnvironment {
547 | $framework = $psake.context.peek().config.framework
548 | if ($framework -cmatch '^((?:\d+\.\d+)(?:\.\d+){0,1})(x86|x64){0,1}$') {
549 | $versionPart = $matches[1]
550 | $bitnessPart = $matches[2]
551 | } else {
552 | throw ($msgs.error_invalid_framework -f $framework)
553 | }
554 | $versions = $null
555 | $buildToolsVersions = $null
556 | switch ($versionPart) {
557 | '1.0' {
558 | $versions = @('v1.0.3705')
559 | }
560 | '1.1' {
561 | $versions = @('v1.1.4322')
562 | }
563 | '2.0' {
564 | $versions = @('v2.0.50727')
565 | }
566 | '3.0' {
567 | $versions = @('v2.0.50727')
568 | }
569 | '3.5' {
570 | $versions = @('v3.5', 'v2.0.50727')
571 | }
572 | '4.0' {
573 | $versions = @('v4.0.30319')
574 | }
575 | {($_ -eq '4.5.1') -or ($_ -eq '4.5.2')} {
576 | $versions = @('v4.0.30319')
577 | $buildToolsVersions = @('14.0', '12.0')
578 | }
579 | {($_ -eq '4.6') -or ($_ -eq '4.6.1')} {
580 | $versions = @('v4.0.30319')
581 | $buildToolsVersions = @('14.0')
582 | }
583 |
584 | default {
585 | throw ($msgs.error_unknown_framework -f $versionPart, $framework)
586 | }
587 | }
588 |
589 | $bitness = 'Framework'
590 | if ($versionPart -ne '1.0' -and $versionPart -ne '1.1') {
591 | switch ($bitnessPart) {
592 | 'x86' {
593 | $bitness = 'Framework'
594 | $buildToolsKey = 'MSBuildToolsPath32'
595 | }
596 | 'x64' {
597 | $bitness = 'Framework64'
598 | $buildToolsKey = 'MSBuildToolsPath'
599 | }
600 | { [string]::IsNullOrEmpty($_) } {
601 | $ptrSize = [System.IntPtr]::Size
602 | switch ($ptrSize) {
603 | 4 {
604 | $bitness = 'Framework'
605 | $buildToolsKey = 'MSBuildToolsPath32'
606 | }
607 | 8 {
608 | $bitness = 'Framework64'
609 | $buildToolsKey = 'MSBuildToolsPath'
610 | }
611 | default {
612 | throw ($msgs.error_unknown_pointersize -f $ptrSize)
613 | }
614 | }
615 | }
616 | default {
617 | throw ($msgs.error_unknown_bitnesspart -f $bitnessPart, $framework)
618 | }
619 | }
620 | }
621 | $frameworkDirs = @()
622 | if ($buildToolsVersions -ne $null) {
623 | foreach($ver in $buildToolsVersions) {
624 | if (Test-Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\$ver") {
625 | $frameworkDirs += (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\$ver" -Name $buildToolsKey).$buildToolsKey
626 | }
627 | }
628 | }
629 | $frameworkDirs = $frameworkDirs + @($versions | foreach { "$env:windir\Microsoft.NET\$bitness\$_\" })
630 |
631 | for ($i = 0; $i -lt $frameworkDirs.Count; $i++) {
632 | $dir = $frameworkDirs[$i]
633 | if ($dir -Match "\$\(Registry:HKEY_LOCAL_MACHINE(.*?)@(.*)\)") {
634 | $key = "HKLM:" + $matches[1]
635 | $name = $matches[2]
636 | $dir = (Get-ItemProperty -Path $key -Name $name).$name
637 | $frameworkDirs[$i] = $dir
638 | }
639 | }
640 |
641 | $frameworkDirs | foreach { Assert (test-path $_ -pathType Container) ($msgs.error_no_framework_install_dir_found -f $_)}
642 |
643 | $env:path = ($frameworkDirs -join ";") + ";$env:path"
644 | # if any error occurs in a PS function then "stop" processing immediately
645 | # this does not effect any external programs that return a non-zero exit code
646 | $global:ErrorActionPreference = "Stop"
647 | }
648 |
649 | function ExecuteInBuildFileScope {
650 | param([string]$buildFile, $module, [scriptblock]$sb)
651 |
652 | # Execute the build file to set up the tasks and defaults
653 | Assert (test-path $buildFile -pathType Leaf) ($msgs.error_build_file_not_found -f $buildFile)
654 |
655 | $psake.build_script_file = get-item $buildFile
656 | $psake.build_script_dir = $psake.build_script_file.DirectoryName
657 | $psake.build_success = $false
658 |
659 | $psake.context.push(@{
660 | "taskSetupScriptBlock" = {};
661 | "taskTearDownScriptBlock" = {};
662 | "executedTasks" = new-object System.Collections.Stack;
663 | "callStack" = new-object System.Collections.Stack;
664 | "originalEnvPath" = $env:path;
665 | "originalDirectory" = get-location;
666 | "originalErrorActionPreference" = $global:ErrorActionPreference;
667 | "tasks" = @{};
668 | "aliases" = @{};
669 | "properties" = @();
670 | "includes" = new-object System.Collections.Queue;
671 | "config" = CreateConfigurationForNewContext $buildFile $framework
672 | })
673 |
674 | LoadConfiguration $psake.build_script_dir
675 |
676 | set-location $psake.build_script_dir
677 |
678 | LoadModules
679 |
680 | $frameworkOldValue = $framework
681 | . $psake.build_script_file.FullName
682 |
683 | $currentContext = $psake.context.Peek()
684 |
685 | if ($framework -ne $frameworkOldValue) {
686 | writecoloredoutput $msgs.warning_deprecated_framework_variable -foregroundcolor Yellow
687 | $currentContext.config.framework = $framework
688 | }
689 |
690 | ConfigureBuildEnvironment
691 |
692 | while ($currentContext.includes.Count -gt 0) {
693 | $includeFilename = $currentContext.includes.Dequeue()
694 | . $includeFilename
695 | }
696 |
697 | & $sb $currentContext $module
698 | }
699 |
700 | function CleanupEnvironment {
701 | if ($psake.context.Count -gt 0) {
702 | $currentContext = $psake.context.Peek()
703 | $env:path = $currentContext.originalEnvPath
704 | Set-Location $currentContext.originalDirectory
705 | $global:ErrorActionPreference = $currentContext.originalErrorActionPreference
706 | [void] $psake.context.Pop()
707 | }
708 | }
709 |
710 | function SelectObjectWithDefault
711 | {
712 | [CmdletBinding()]
713 | param(
714 | [Parameter(ValueFromPipeline=$true)]
715 | [PSObject]
716 | $InputObject,
717 | [string]
718 | $Name,
719 | $Value
720 | )
721 |
722 | process {
723 | if ($_ -eq $null) { $Value }
724 | elseif ($_ | Get-Member -Name $Name) {
725 | $_.$Name
726 | }
727 | elseif (($_ -is [Hashtable]) -and ($_.Keys -contains $Name)) {
728 | $_.$Name
729 | }
730 | else { $Value }
731 | }
732 | }
733 |
734 | # borrowed from Jeffrey Snover http://blogs.msdn.com/powershell/archive/2006/12/07/resolve-error.aspx
735 | # modified to better handle SQL errors
736 | function ResolveError
737 | {
738 | [CmdletBinding()]
739 | param(
740 | [Parameter(ValueFromPipeline=$true)]
741 | $ErrorRecord=$Error[0],
742 | [Switch]
743 | $Short
744 | )
745 |
746 | process {
747 | if ($_ -eq $null) { $_ = $ErrorRecord }
748 | $ex = $_.Exception
749 |
750 | if (-not $Short) {
751 | $error_message = "`nErrorRecord:{0}ErrorRecord.InvocationInfo:{1}Exception:`n{2}"
752 | $formatted_errorRecord = $_ | format-list * -force | out-string
753 | $formatted_invocationInfo = $_.InvocationInfo | format-list * -force | out-string
754 | $formatted_exception = ''
755 |
756 | $i = 0
757 | while ($ex -ne $null) {
758 | $i++
759 | $formatted_exception += ("$i" * 70) + "`n" +
760 | ($ex | format-list * -force | out-string) + "`n"
761 | $ex = $ex | SelectObjectWithDefault -Name 'InnerException' -Value $null
762 | }
763 |
764 | return $error_message -f $formatted_errorRecord, $formatted_invocationInfo, $formatted_exception
765 | }
766 |
767 | $lastException = @()
768 | while ($ex -ne $null) {
769 | $lastMessage = $ex | SelectObjectWithDefault -Name 'Message' -Value ''
770 | $lastException += ($lastMessage -replace "`n", '')
771 | if ($ex -is [Data.SqlClient.SqlException]) {
772 | $lastException += "(Line [$($ex.LineNumber)] " +
773 | "Procedure [$($ex.Procedure)] Class [$($ex.Class)] " +
774 | " Number [$($ex.Number)] State [$($ex.State)] )"
775 | }
776 | $ex = $ex | SelectObjectWithDefault -Name 'InnerException' -Value $null
777 | }
778 | $shortException = $lastException -join ' --> '
779 |
780 | $header = $null
781 | $current = $_
782 | $header = (($_.InvocationInfo |
783 | SelectObjectWithDefault -Name 'PositionMessage' -Value '') -replace "`n", ' '),
784 | ($_ | SelectObjectWithDefault -Name 'Message' -Value ''),
785 | ($_ | SelectObjectWithDefault -Name 'Exception' -Value '') |
786 | ? { -not [String]::IsNullOrEmpty($_) } |
787 | Select -First 1
788 |
789 | $delimiter = ''
790 | if ((-not [String]::IsNullOrEmpty($header)) -and
791 | (-not [String]::IsNullOrEmpty($shortException)))
792 | { $delimiter = ' [<<==>>] ' }
793 |
794 | return "$($header)$($delimiter)Exception: $($shortException)"
795 | }
796 | }
797 |
798 | function GetTasksFromContext($currentContext) {
799 |
800 | $docs = $currentContext.tasks.Keys | foreach-object {
801 |
802 | $task = $currentContext.tasks.$_
803 | new-object PSObject -property @{
804 | Name = $task.Name;
805 | Alias = $task.Alias;
806 | Description = $task.Description;
807 | DependsOn = $task.DependsOn;
808 | }
809 | }
810 |
811 | return $docs
812 | }
813 |
814 | function WriteDocumentation($showDetailed) {
815 |
816 | $currentContext = $psake.context.Peek()
817 |
818 | if ($currentContext.tasks.default) {
819 | $defaultTaskDependencies = $currentContext.tasks.default.DependsOn
820 | } else {
821 | $defaultTaskDependencies = @()
822 | }
823 |
824 | $docs = GetTasksFromContext $currentContext |
825 | Where {$_.Name -ne 'default'} |
826 | ForEach {
827 | $isDefault = $null
828 | if ($defaultTaskDependencies -contains $_.Name) {
829 | $isDefault = $true
830 | }
831 | return Add-Member -InputObject $_ 'Default' $isDefault -PassThru
832 | }
833 |
834 | if ($showDetailed) {
835 | $docs | sort 'Name' | format-list -property Name,Alias,Description,@{Label="Depends On";Expression={$_.DependsOn -join ', '}},Default
836 | } else {
837 | $docs | sort 'Name' | format-table -autoSize -wrap -property Name,Alias,@{Label="Depends On";Expression={$_.DependsOn -join ', '}},Default,Description
838 | }
839 | }
840 |
841 | function WriteTaskTimeSummary($invokePsakeDuration) {
842 | if ($psake.context.count -gt 0) {
843 | "-" * 70
844 | "Build Time Report"
845 | "-" * 70
846 | $list = @()
847 | $currentContext = $psake.context.Peek()
848 | while ($currentContext.executedTasks.Count -gt 0) {
849 | $taskKey = $currentContext.executedTasks.Pop()
850 | $task = $currentContext.tasks.$taskKey
851 | if ($taskKey -eq "default") {
852 | continue
853 | }
854 | $list += new-object PSObject -property @{
855 | Name = $task.Name;
856 | Duration = $task.Duration
857 | }
858 | }
859 | [Array]::Reverse($list)
860 | $list += new-object PSObject -property @{
861 | Name = "Total:";
862 | Duration = $invokePsakeDuration
863 | }
864 | # using "out-string | where-object" to filter out the blank line that format-table prepends
865 | $list | format-table -autoSize -property Name,Duration | out-string -stream | where-object { $_ }
866 | }
867 | }
868 |
869 | DATA msgs {
870 | convertfrom-stringdata @'
871 | error_invalid_task_name = Task name should not be null or empty string.
872 | error_task_name_does_not_exist = Task {0} does not exist.
873 | error_circular_reference = Circular reference found for task {0}.
874 | error_missing_action_parameter = Action parameter must be specified when using PreAction or PostAction parameters for task {0}.
875 | error_corrupt_callstack = Call stack was corrupt. Expected {0}, but got {1}.
876 | error_invalid_framework = Invalid .NET Framework version, {0} specified.
877 | error_unknown_framework = Unknown .NET Framework version, {0} specified in {1}.
878 | error_unknown_pointersize = Unknown pointer size ({0}) returned from System.IntPtr.
879 | error_unknown_bitnesspart = Unknown .NET Framework bitness, {0}, specified in {1}.
880 | error_no_framework_install_dir_found = No .NET Framework installation directory found at {0}.
881 | error_bad_command = Error executing command {0}.
882 | error_default_task_cannot_have_action = 'default' task cannot specify an action.
883 | error_duplicate_task_name = Task {0} has already been defined.
884 | error_duplicate_alias_name = Alias {0} has already been defined.
885 | error_invalid_include_path = Unable to include {0}. File not found.
886 | error_build_file_not_found = Could not find the build file {0}.
887 | error_no_default_task = 'default' task required.
888 | error_loading_module = Error loading module {0}.
889 | warning_deprecated_framework_variable = Warning: Using global variable $framework to set .NET framework version used is deprecated. Instead use Framework function or configuration file psake-config.ps1.
890 | required_variable_not_set = Variable {0} must be set to run task {1}.
891 | postcondition_failed = Postcondition failed for task {0}.
892 | precondition_was_false = Precondition was false, not executing task {0}.
893 | continue_on_error = Error in task {0}. {1}
894 | build_success = Build Succeeded!
895 | '@
896 | }
897 |
898 | Import-LocalizedData -BindingVariable msgs -FileName messages.psd1 -ErrorAction $script:IgnoreError
899 |
900 | $scriptDir = Split-Path $MyInvocation.MyCommand.Path
901 | $manifestPath = Join-Path $scriptDir psake.psd1
902 | $manifest = Test-ModuleManifest -Path $manifestPath -WarningAction SilentlyContinue
903 |
904 | $script:psake = @{}
905 |
906 | $psake.version = $manifest.Version.ToString()
907 | $psake.context = new-object system.collections.stack # holds onto the current state of all variables
908 | $psake.run_by_psake_build_tester = $false # indicates that build is being run by psake-BuildTester
909 | $psake.config_default = new-object psobject -property @{
910 | buildFileName = "default.ps1";
911 | framework = "4.0";
912 | taskNameFormat = "Executing {0}";
913 | verboseError = $false;
914 | coloredOutput = $true;
915 | modules = $null;
916 | moduleScope = "";
917 | } # contains default configuration, can be overriden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script
918 |
919 | $psake.build_success = $false # indicates that the current build was successful
920 | $psake.build_script_file = $null # contains a System.IO.FileInfo for the current build script
921 | $psake.build_script_dir = "" # contains a string with fully-qualified path to current build script
922 |
923 | LoadConfiguration
924 |
925 | export-modulemember -function Invoke-psake, Invoke-Task, Get-PSakeScriptTasks, Task, Properties, Include, FormatTaskName, TaskSetup, TaskTearDown, Framework, Assert, Exec -variable psake
926 |
--------------------------------------------------------------------------------
/src/packages/LibGit2Sharp.NativeBinaries.1.0.164/libgit2/libgit2.license.txt:
--------------------------------------------------------------------------------
1 | libgit2 is Copyright (C) the libgit2 contributors,
2 | unless otherwise stated. See the AUTHORS file for details.
3 |
4 | Note that the only valid version of the GPL as far as this project
5 | is concerned is _this_ particular version of the license (ie v2, not
6 | v2.2 or v3.x or whatever), unless explicitly otherwise stated.
7 |
8 | ----------------------------------------------------------------------
9 |
10 | LINKING EXCEPTION
11 |
12 | In addition to the permissions in the GNU General Public License,
13 | the authors give you unlimited permission to link the compiled
14 | version of this library into combinations with other programs,
15 | and to distribute those combinations without any restriction
16 | coming from the use of this file. (The General Public License
17 | restrictions do apply in other respects; for example, they cover
18 | modification of the file, and distribution when not linked into
19 | a combined executable.)
20 |
21 | ----------------------------------------------------------------------
22 |
23 | GNU GENERAL PUBLIC LICENSE
24 | Version 2, June 1991
25 |
26 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.
27 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 | Everyone is permitted to copy and distribute verbatim copies
29 | of this license document, but changing it is not allowed.
30 |
31 | Preamble
32 |
33 | The licenses for most software are designed to take away your
34 | freedom to share and change it. By contrast, the GNU General Public
35 | License is intended to guarantee your freedom to share and change free
36 | software--to make sure the software is free for all its users. This
37 | General Public License applies to most of the Free Software
38 | Foundation's software and to any other program whose authors commit to
39 | using it. (Some other Free Software Foundation software is covered by
40 | the GNU Library General Public License instead.) You can apply it to
41 | your programs, too.
42 |
43 | When we speak of free software, we are referring to freedom, not
44 | price. Our General Public Licenses are designed to make sure that you
45 | have the freedom to distribute copies of free software (and charge for
46 | this service if you wish), that you receive source code or can get it
47 | if you want it, that you can change the software or use pieces of it
48 | in new free programs; and that you know you can do these things.
49 |
50 | To protect your rights, we need to make restrictions that forbid
51 | anyone to deny you these rights or to ask you to surrender the rights.
52 | These restrictions translate to certain responsibilities for you if you
53 | distribute copies of the software, or if you modify it.
54 |
55 | For example, if you distribute copies of such a program, whether
56 | gratis or for a fee, you must give the recipients all the rights that
57 | you have. You must make sure that they, too, receive or can get the
58 | source code. And you must show them these terms so they know their
59 | rights.
60 |
61 | We protect your rights with two steps: (1) copyright the software, and
62 | (2) offer you this license which gives you legal permission to copy,
63 | distribute and/or modify the software.
64 |
65 | Also, for each author's protection and ours, we want to make certain
66 | that everyone understands that there is no warranty for this free
67 | software. If the software is modified by someone else and passed on, we
68 | want its recipients to know that what they have is not the original, so
69 | that any problems introduced by others will not reflect on the original
70 | authors' reputations.
71 |
72 | Finally, any free program is threatened constantly by software
73 | patents. We wish to avoid the danger that redistributors of a free
74 | program will individually obtain patent licenses, in effect making the
75 | program proprietary. To prevent this, we have made it clear that any
76 | patent must be licensed for everyone's free use or not licensed at all.
77 |
78 | The precise terms and conditions for copying, distribution and
79 | modification follow.
80 |
81 | GNU GENERAL PUBLIC LICENSE
82 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
83 |
84 | 0. This License applies to any program or other work which contains
85 | a notice placed by the copyright holder saying it may be distributed
86 | under the terms of this General Public License. The "Program", below,
87 | refers to any such program or work, and a "work based on the Program"
88 | means either the Program or any derivative work under copyright law:
89 | that is to say, a work containing the Program or a portion of it,
90 | either verbatim or with modifications and/or translated into another
91 | language. (Hereinafter, translation is included without limitation in
92 | the term "modification".) Each licensee is addressed as "you".
93 |
94 | Activities other than copying, distribution and modification are not
95 | covered by this License; they are outside its scope. The act of
96 | running the Program is not restricted, and the output from the Program
97 | is covered only if its contents constitute a work based on the
98 | Program (independent of having been made by running the Program).
99 | Whether that is true depends on what the Program does.
100 |
101 | 1. You may copy and distribute verbatim copies of the Program's
102 | source code as you receive it, in any medium, provided that you
103 | conspicuously and appropriately publish on each copy an appropriate
104 | copyright notice and disclaimer of warranty; keep intact all the
105 | notices that refer to this License and to the absence of any warranty;
106 | and give any other recipients of the Program a copy of this License
107 | along with the Program.
108 |
109 | You may charge a fee for the physical act of transferring a copy, and
110 | you may at your option offer warranty protection in exchange for a fee.
111 |
112 | 2. You may modify your copy or copies of the Program or any portion
113 | of it, thus forming a work based on the Program, and copy and
114 | distribute such modifications or work under the terms of Section 1
115 | above, provided that you also meet all of these conditions:
116 |
117 | a) You must cause the modified files to carry prominent notices
118 | stating that you changed the files and the date of any change.
119 |
120 | b) You must cause any work that you distribute or publish, that in
121 | whole or in part contains or is derived from the Program or any
122 | part thereof, to be licensed as a whole at no charge to all third
123 | parties under the terms of this License.
124 |
125 | c) If the modified program normally reads commands interactively
126 | when run, you must cause it, when started running for such
127 | interactive use in the most ordinary way, to print or display an
128 | announcement including an appropriate copyright notice and a
129 | notice that there is no warranty (or else, saying that you provide
130 | a warranty) and that users may redistribute the program under
131 | these conditions, and telling the user how to view a copy of this
132 | License. (Exception: if the Program itself is interactive but
133 | does not normally print such an announcement, your work based on
134 | the Program is not required to print an announcement.)
135 |
136 | These requirements apply to the modified work as a whole. If
137 | identifiable sections of that work are not derived from the Program,
138 | and can be reasonably considered independent and separate works in
139 | themselves, then this License, and its terms, do not apply to those
140 | sections when you distribute them as separate works. But when you
141 | distribute the same sections as part of a whole which is a work based
142 | on the Program, the distribution of the whole must be on the terms of
143 | this License, whose permissions for other licensees extend to the
144 | entire whole, and thus to each and every part regardless of who wrote it.
145 |
146 | Thus, it is not the intent of this section to claim rights or contest
147 | your rights to work written entirely by you; rather, the intent is to
148 | exercise the right to control the distribution of derivative or
149 | collective works based on the Program.
150 |
151 | In addition, mere aggregation of another work not based on the Program
152 | with the Program (or with a work based on the Program) on a volume of
153 | a storage or distribution medium does not bring the other work under
154 | the scope of this License.
155 |
156 | 3. You may copy and distribute the Program (or a work based on it,
157 | under Section 2) in object code or executable form under the terms of
158 | Sections 1 and 2 above provided that you also do one of the following:
159 |
160 | a) Accompany it with the complete corresponding machine-readable
161 | source code, which must be distributed under the terms of Sections
162 | 1 and 2 above on a medium customarily used for software interchange; or,
163 |
164 | b) Accompany it with a written offer, valid for at least three
165 | years, to give any third party, for a charge no more than your
166 | cost of physically performing source distribution, a complete
167 | machine-readable copy of the corresponding source code, to be
168 | distributed under the terms of Sections 1 and 2 above on a medium
169 | customarily used for software interchange; or,
170 |
171 | c) Accompany it with the information you received as to the offer
172 | to distribute corresponding source code. (This alternative is
173 | allowed only for noncommercial distribution and only if you
174 | received the program in object code or executable form with such
175 | an offer, in accord with Subsection b above.)
176 |
177 | The source code for a work means the preferred form of the work for
178 | making modifications to it. For an executable work, complete source
179 | code means all the source code for all modules it contains, plus any
180 | associated interface definition files, plus the scripts used to
181 | control compilation and installation of the executable. However, as a
182 | special exception, the source code distributed need not include
183 | anything that is normally distributed (in either source or binary
184 | form) with the major components (compiler, kernel, and so on) of the
185 | operating system on which the executable runs, unless that component
186 | itself accompanies the executable.
187 |
188 | If distribution of executable or object code is made by offering
189 | access to copy from a designated place, then offering equivalent
190 | access to copy the source code from the same place counts as
191 | distribution of the source code, even though third parties are not
192 | compelled to copy the source along with the object code.
193 |
194 | 4. You may not copy, modify, sublicense, or distribute the Program
195 | except as expressly provided under this License. Any attempt
196 | otherwise to copy, modify, sublicense or distribute the Program is
197 | void, and will automatically terminate your rights under this License.
198 | However, parties who have received copies, or rights, from you under
199 | this License will not have their licenses terminated so long as such
200 | parties remain in full compliance.
201 |
202 | 5. You are not required to accept this License, since you have not
203 | signed it. However, nothing else grants you permission to modify or
204 | distribute the Program or its derivative works. These actions are
205 | prohibited by law if you do not accept this License. Therefore, by
206 | modifying or distributing the Program (or any work based on the
207 | Program), you indicate your acceptance of this License to do so, and
208 | all its terms and conditions for copying, distributing or modifying
209 | the Program or works based on it.
210 |
211 | 6. Each time you redistribute the Program (or any work based on the
212 | Program), the recipient automatically receives a license from the
213 | original licensor to copy, distribute or modify the Program subject to
214 | these terms and conditions. You may not impose any further
215 | restrictions on the recipients' exercise of the rights granted herein.
216 | You are not responsible for enforcing compliance by third parties to
217 | this License.
218 |
219 | 7. If, as a consequence of a court judgment or allegation of patent
220 | infringement or for any other reason (not limited to patent issues),
221 | conditions are imposed on you (whether by court order, agreement or
222 | otherwise) that contradict the conditions of this License, they do not
223 | excuse you from the conditions of this License. If you cannot
224 | distribute so as to satisfy simultaneously your obligations under this
225 | License and any other pertinent obligations, then as a consequence you
226 | may not distribute the Program at all. For example, if a patent
227 | license would not permit royalty-free redistribution of the Program by
228 | all those who receive copies directly or indirectly through you, then
229 | the only way you could satisfy both it and this License would be to
230 | refrain entirely from distribution of the Program.
231 |
232 | If any portion of this section is held invalid or unenforceable under
233 | any particular circumstance, the balance of the section is intended to
234 | apply and the section as a whole is intended to apply in other
235 | circumstances.
236 |
237 | It is not the purpose of this section to induce you to infringe any
238 | patents or other property right claims or to contest validity of any
239 | such claims; this section has the sole purpose of protecting the
240 | integrity of the free software distribution system, which is
241 | implemented by public license practices. Many people have made
242 | generous contributions to the wide range of software distributed
243 | through that system in reliance on consistent application of that
244 | system; it is up to the author/donor to decide if he or she is willing
245 | to distribute software through any other system and a licensee cannot
246 | impose that choice.
247 |
248 | This section is intended to make thoroughly clear what is believed to
249 | be a consequence of the rest of this License.
250 |
251 | 8. If the distribution and/or use of the Program is restricted in
252 | certain countries either by patents or by copyrighted interfaces, the
253 | original copyright holder who places the Program under this License
254 | may add an explicit geographical distribution limitation excluding
255 | those countries, so that distribution is permitted only in or among
256 | countries not thus excluded. In such case, this License incorporates
257 | the limitation as if written in the body of this License.
258 |
259 | 9. The Free Software Foundation may publish revised and/or new versions
260 | of the General Public License from time to time. Such new versions will
261 | be similar in spirit to the present version, but may differ in detail to
262 | address new problems or concerns.
263 |
264 | Each version is given a distinguishing version number. If the Program
265 | specifies a version number of this License which applies to it and "any
266 | later version", you have the option of following the terms and conditions
267 | either of that version or of any later version published by the Free
268 | Software Foundation. If the Program does not specify a version number of
269 | this License, you may choose any version ever published by the Free Software
270 | Foundation.
271 |
272 | 10. If you wish to incorporate parts of the Program into other free
273 | programs whose distribution conditions are different, write to the author
274 | to ask for permission. For software which is copyrighted by the Free
275 | Software Foundation, write to the Free Software Foundation; we sometimes
276 | make exceptions for this. Our decision will be guided by the two goals
277 | of preserving the free status of all derivatives of our free software and
278 | of promoting the sharing and reuse of software generally.
279 |
280 | NO WARRANTY
281 |
282 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
283 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
284 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
285 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
286 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
287 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
288 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
289 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
290 | REPAIR OR CORRECTION.
291 |
292 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
293 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
294 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
295 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
296 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
297 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
298 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
299 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
300 | POSSIBILITY OF SUCH DAMAGES.
301 |
302 | END OF TERMS AND CONDITIONS
303 |
304 | How to Apply These Terms to Your New Programs
305 |
306 | If you develop a new program, and you want it to be of the greatest
307 | possible use to the public, the best way to achieve this is to make it
308 | free software which everyone can redistribute and change under these terms.
309 |
310 | To do so, attach the following notices to the program. It is safest
311 | to attach them to the start of each source file to most effectively
312 | convey the exclusion of warranty; and each file should have at least
313 | the "copyright" line and a pointer to where the full notice is found.
314 |
315 |
316 | Copyright (C)
317 |
318 | This program is free software; you can redistribute it and/or modify
319 | it under the terms of the GNU General Public License as published by
320 | the Free Software Foundation; either version 2 of the License, or
321 | (at your option) any later version.
322 |
323 | This program is distributed in the hope that it will be useful,
324 | but WITHOUT ANY WARRANTY; without even the implied warranty of
325 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
326 | GNU General Public License for more details.
327 |
328 | You should have received a copy of the GNU General Public License
329 | along with this program; if not, write to the Free Software
330 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
331 |
332 |
333 | Also add information on how to contact you by electronic and paper mail.
334 |
335 | If the program is interactive, make it output a short notice like this
336 | when it starts in an interactive mode:
337 |
338 | Gnomovision version 69, Copyright (C) year name of author
339 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
340 | This is free software, and you are welcome to redistribute it
341 | under certain conditions; type `show c' for details.
342 |
343 | The hypothetical commands `show w' and `show c' should show the appropriate
344 | parts of the General Public License. Of course, the commands you use may
345 | be called something other than `show w' and `show c'; they could even be
346 | mouse-clicks or menu items--whatever suits your program.
347 |
348 | You should also get your employer (if you work as a programmer) or your
349 | school, if any, to sign a "copyright disclaimer" for the program, if
350 | necessary. Here is a sample; alter the names:
351 |
352 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
353 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
354 |
355 | , 1 April 1989
356 | Ty Coon, President of Vice
357 |
358 | This General Public License does not permit incorporating your program into
359 | proprietary programs. If your program is a subroutine library, you may
360 | consider it more useful to permit linking proprietary applications with the
361 | library. If this is what you want to do, use the GNU Library General
362 | Public License instead of this License.
363 |
364 | ----------------------------------------------------------------------
365 |
366 | The bundled ZLib code is licensed under the ZLib license:
367 |
368 | Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
369 |
370 | This software is provided 'as-is', without any express or implied
371 | warranty. In no event will the authors be held liable for any damages
372 | arising from the use of this software.
373 |
374 | Permission is granted to anyone to use this software for any purpose,
375 | including commercial applications, and to alter it and redistribute it
376 | freely, subject to the following restrictions:
377 |
378 | 1. The origin of this software must not be misrepresented; you must not
379 | claim that you wrote the original software. If you use this software
380 | in a product, an acknowledgment in the product documentation would be
381 | appreciated but is not required.
382 | 2. Altered source versions must be plainly marked as such, and must not be
383 | misrepresented as being the original software.
384 | 3. This notice may not be removed or altered from any source distribution.
385 |
386 | Jean-loup Gailly Mark Adler
387 | jloup@gzip.org madler@alumni.caltech.edu
388 |
389 | ----------------------------------------------------------------------
390 |
391 | The priority queue implementation is based on code licensed under the
392 | Apache 2.0 license:
393 |
394 | Copyright 2010 Volkan Yazıcı
395 | Copyright 2006-2010 The Apache Software Foundation
396 |
397 | The full text of the Apache 2.0 license is available at:
398 |
399 | http://www.apache.org/licenses/LICENSE-2.0
400 |
401 | ----------------------------------------------------------------------
402 |
403 | The Clay framework is licensed under the MIT license:
404 |
405 | Copyright (C) 2011 by Vicent Marti
406 |
407 | Permission is hereby granted, free of charge, to any person obtaining a copy
408 | of this software and associated documentation files (the "Software"), to deal
409 | in the Software without restriction, including without limitation the rights
410 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
411 | copies of the Software, and to permit persons to whom the Software is
412 | furnished to do so, subject to the following conditions:
413 |
414 | The above copyright notice and this permission notice shall be included in
415 | all copies or substantial portions of the Software.
416 |
417 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
418 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
419 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
420 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
421 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
422 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
423 | THE SOFTWARE.
424 |
425 | ----------------------------------------------------------------------
426 |
427 | The regex library (deps/regex/) is licensed under the GNU LGPL
428 |
429 | GNU LESSER GENERAL PUBLIC LICENSE
430 | Version 2.1, February 1999
431 |
432 | Copyright (C) 1991, 1999 Free Software Foundation, Inc.
433 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
434 | Everyone is permitted to copy and distribute verbatim copies
435 | of this license document, but changing it is not allowed.
436 |
437 | [This is the first released version of the Lesser GPL. It also counts
438 | as the successor of the GNU Library Public License, version 2, hence
439 | the version number 2.1.]
440 |
441 | Preamble
442 |
443 | The licenses for most software are designed to take away your
444 | freedom to share and change it. By contrast, the GNU General Public
445 | Licenses are intended to guarantee your freedom to share and change
446 | free software--to make sure the software is free for all its users.
447 |
448 | This license, the Lesser General Public License, applies to some
449 | specially designated software packages--typically libraries--of the
450 | Free Software Foundation and other authors who decide to use it. You
451 | can use it too, but we suggest you first think carefully about whether
452 | this license or the ordinary General Public License is the better
453 | strategy to use in any particular case, based on the explanations below.
454 |
455 | When we speak of free software, we are referring to freedom of use,
456 | not price. Our General Public Licenses are designed to make sure that
457 | you have the freedom to distribute copies of free software (and charge
458 | for this service if you wish); that you receive source code or can get
459 | it if you want it; that you can change the software and use pieces of
460 | it in new free programs; and that you are informed that you can do
461 | these things.
462 |
463 | To protect your rights, we need to make restrictions that forbid
464 | distributors to deny you these rights or to ask you to surrender these
465 | rights. These restrictions translate to certain responsibilities for
466 | you if you distribute copies of the library or if you modify it.
467 |
468 | For example, if you distribute copies of the library, whether gratis
469 | or for a fee, you must give the recipients all the rights that we gave
470 | you. You must make sure that they, too, receive or can get the source
471 | code. If you link other code with the library, you must provide
472 | complete object files to the recipients, so that they can relink them
473 | with the library after making changes to the library and recompiling
474 | it. And you must show them these terms so they know their rights.
475 |
476 | We protect your rights with a two-step method: (1) we copyright the
477 | library, and (2) we offer you this license, which gives you legal
478 | permission to copy, distribute and/or modify the library.
479 |
480 | To protect each distributor, we want to make it very clear that
481 | there is no warranty for the free library. Also, if the library is
482 | modified by someone else and passed on, the recipients should know
483 | that what they have is not the original version, so that the original
484 | author's reputation will not be affected by problems that might be
485 | introduced by others.
486 |
487 | Finally, software patents pose a constant threat to the existence of
488 | any free program. We wish to make sure that a company cannot
489 | effectively restrict the users of a free program by obtaining a
490 | restrictive license from a patent holder. Therefore, we insist that
491 | any patent license obtained for a version of the library must be
492 | consistent with the full freedom of use specified in this license.
493 |
494 | Most GNU software, including some libraries, is covered by the
495 | ordinary GNU General Public License. This license, the GNU Lesser
496 | General Public License, applies to certain designated libraries, and
497 | is quite different from the ordinary General Public License. We use
498 | this license for certain libraries in order to permit linking those
499 | libraries into non-free programs.
500 |
501 | When a program is linked with a library, whether statically or using
502 | a shared library, the combination of the two is legally speaking a
503 | combined work, a derivative of the original library. The ordinary
504 | General Public License therefore permits such linking only if the
505 | entire combination fits its criteria of freedom. The Lesser General
506 | Public License permits more lax criteria for linking other code with
507 | the library.
508 |
509 | We call this license the "Lesser" General Public License because it
510 | does Less to protect the user's freedom than the ordinary General
511 | Public License. It also provides other free software developers Less
512 | of an advantage over competing non-free programs. These disadvantages
513 | are the reason we use the ordinary General Public License for many
514 | libraries. However, the Lesser license provides advantages in certain
515 | special circumstances.
516 |
517 | For example, on rare occasions, there may be a special need to
518 | encourage the widest possible use of a certain library, so that it becomes
519 | a de-facto standard. To achieve this, non-free programs must be
520 | allowed to use the library. A more frequent case is that a free
521 | library does the same job as widely used non-free libraries. In this
522 | case, there is little to gain by limiting the free library to free
523 | software only, so we use the Lesser General Public License.
524 |
525 | In other cases, permission to use a particular library in non-free
526 | programs enables a greater number of people to use a large body of
527 | free software. For example, permission to use the GNU C Library in
528 | non-free programs enables many more people to use the whole GNU
529 | operating system, as well as its variant, the GNU/Linux operating
530 | system.
531 |
532 | Although the Lesser General Public License is Less protective of the
533 | users' freedom, it does ensure that the user of a program that is
534 | linked with the Library has the freedom and the wherewithal to run
535 | that program using a modified version of the Library.
536 |
537 | The precise terms and conditions for copying, distribution and
538 | modification follow. Pay close attention to the difference between a
539 | "work based on the library" and a "work that uses the library". The
540 | former contains code derived from the library, whereas the latter must
541 | be combined with the library in order to run.
542 |
543 | GNU LESSER GENERAL PUBLIC LICENSE
544 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
545 |
546 | 0. This License Agreement applies to any software library or other
547 | program which contains a notice placed by the copyright holder or
548 | other authorized party saying it may be distributed under the terms of
549 | this Lesser General Public License (also called "this License").
550 | Each licensee is addressed as "you".
551 |
552 | A "library" means a collection of software functions and/or data
553 | prepared so as to be conveniently linked with application programs
554 | (which use some of those functions and data) to form executables.
555 |
556 | The "Library", below, refers to any such software library or work
557 | which has been distributed under these terms. A "work based on the
558 | Library" means either the Library or any derivative work under
559 | copyright law: that is to say, a work containing the Library or a
560 | portion of it, either verbatim or with modifications and/or translated
561 | straightforwardly into another language. (Hereinafter, translation is
562 | included without limitation in the term "modification".)
563 |
564 | "Source code" for a work means the preferred form of the work for
565 | making modifications to it. For a library, complete source code means
566 | all the source code for all modules it contains, plus any associated
567 | interface definition files, plus the scripts used to control compilation
568 | and installation of the library.
569 |
570 | Activities other than copying, distribution and modification are not
571 | covered by this License; they are outside its scope. The act of
572 | running a program using the Library is not restricted, and output from
573 | such a program is covered only if its contents constitute a work based
574 | on the Library (independent of the use of the Library in a tool for
575 | writing it). Whether that is true depends on what the Library does
576 | and what the program that uses the Library does.
577 |
578 | 1. You may copy and distribute verbatim copies of the Library's
579 | complete source code as you receive it, in any medium, provided that
580 | you conspicuously and appropriately publish on each copy an
581 | appropriate copyright notice and disclaimer of warranty; keep intact
582 | all the notices that refer to this License and to the absence of any
583 | warranty; and distribute a copy of this License along with the
584 | Library.
585 |
586 | You may charge a fee for the physical act of transferring a copy,
587 | and you may at your option offer warranty protection in exchange for a
588 | fee.
589 |
590 | 2. You may modify your copy or copies of the Library or any portion
591 | of it, thus forming a work based on the Library, and copy and
592 | distribute such modifications or work under the terms of Section 1
593 | above, provided that you also meet all of these conditions:
594 |
595 | a) The modified work must itself be a software library.
596 |
597 | b) You must cause the files modified to carry prominent notices
598 | stating that you changed the files and the date of any change.
599 |
600 | c) You must cause the whole of the work to be licensed at no
601 | charge to all third parties under the terms of this License.
602 |
603 | d) If a facility in the modified Library refers to a function or a
604 | table of data to be supplied by an application program that uses
605 | the facility, other than as an argument passed when the facility
606 | is invoked, then you must make a good faith effort to ensure that,
607 | in the event an application does not supply such function or
608 | table, the facility still operates, and performs whatever part of
609 | its purpose remains meaningful.
610 |
611 | (For example, a function in a library to compute square roots has
612 | a purpose that is entirely well-defined independent of the
613 | application. Therefore, Subsection 2d requires that any
614 | application-supplied function or table used by this function must
615 | be optional: if the application does not supply it, the square
616 | root function must still compute square roots.)
617 |
618 | These requirements apply to the modified work as a whole. If
619 | identifiable sections of that work are not derived from the Library,
620 | and can be reasonably considered independent and separate works in
621 | themselves, then this License, and its terms, do not apply to those
622 | sections when you distribute them as separate works. But when you
623 | distribute the same sections as part of a whole which is a work based
624 | on the Library, the distribution of the whole must be on the terms of
625 | this License, whose permissions for other licensees extend to the
626 | entire whole, and thus to each and every part regardless of who wrote
627 | it.
628 |
629 | Thus, it is not the intent of this section to claim rights or contest
630 | your rights to work written entirely by you; rather, the intent is to
631 | exercise the right to control the distribution of derivative or
632 | collective works based on the Library.
633 |
634 | In addition, mere aggregation of another work not based on the Library
635 | with the Library (or with a work based on the Library) on a volume of
636 | a storage or distribution medium does not bring the other work under
637 | the scope of this License.
638 |
639 | 3. You may opt to apply the terms of the ordinary GNU General Public
640 | License instead of this License to a given copy of the Library. To do
641 | this, you must alter all the notices that refer to this License, so
642 | that they refer to the ordinary GNU General Public License, version 2,
643 | instead of to this License. (If a newer version than version 2 of the
644 | ordinary GNU General Public License has appeared, then you can specify
645 | that version instead if you wish.) Do not make any other change in
646 | these notices.
647 |
648 | Once this change is made in a given copy, it is irreversible for
649 | that copy, so the ordinary GNU General Public License applies to all
650 | subsequent copies and derivative works made from that copy.
651 |
652 | This option is useful when you wish to copy part of the code of
653 | the Library into a program that is not a library.
654 |
655 | 4. You may copy and distribute the Library (or a portion or
656 | derivative of it, under Section 2) in object code or executable form
657 | under the terms of Sections 1 and 2 above provided that you accompany
658 | it with the complete corresponding machine-readable source code, which
659 | must be distributed under the terms of Sections 1 and 2 above on a
660 | medium customarily used for software interchange.
661 |
662 | If distribution of object code is made by offering access to copy
663 | from a designated place, then offering equivalent access to copy the
664 | source code from the same place satisfies the requirement to
665 | distribute the source code, even though third parties are not
666 | compelled to copy the source along with the object code.
667 |
668 | 5. A program that contains no derivative of any portion of the
669 | Library, but is designed to work with the Library by being compiled or
670 | linked with it, is called a "work that uses the Library". Such a
671 | work, in isolation, is not a derivative work of the Library, and
672 | therefore falls outside the scope of this License.
673 |
674 | However, linking a "work that uses the Library" with the Library
675 | creates an executable that is a derivative of the Library (because it
676 | contains portions of the Library), rather than a "work that uses the
677 | library". The executable is therefore covered by this License.
678 | Section 6 states terms for distribution of such executables.
679 |
680 | When a "work that uses the Library" uses material from a header file
681 | that is part of the Library, the object code for the work may be a
682 | derivative work of the Library even though the source code is not.
683 | Whether this is true is especially significant if the work can be
684 | linked without the Library, or if the work is itself a library. The
685 | threshold for this to be true is not precisely defined by law.
686 |
687 | If such an object file uses only numerical parameters, data
688 | structure layouts and accessors, and small macros and small inline
689 | functions (ten lines or less in length), then the use of the object
690 | file is unrestricted, regardless of whether it is legally a derivative
691 | work. (Executables containing this object code plus portions of the
692 | Library will still fall under Section 6.)
693 |
694 | Otherwise, if the work is a derivative of the Library, you may
695 | distribute the object code for the work under the terms of Section 6.
696 | Any executables containing that work also fall under Section 6,
697 | whether or not they are linked directly with the Library itself.
698 |
699 | 6. As an exception to the Sections above, you may also combine or
700 | link a "work that uses the Library" with the Library to produce a
701 | work containing portions of the Library, and distribute that work
702 | under terms of your choice, provided that the terms permit
703 | modification of the work for the customer's own use and reverse
704 | engineering for debugging such modifications.
705 |
706 | You must give prominent notice with each copy of the work that the
707 | Library is used in it and that the Library and its use are covered by
708 | this License. You must supply a copy of this License. If the work
709 | during execution displays copyright notices, you must include the
710 | copyright notice for the Library among them, as well as a reference
711 | directing the user to the copy of this License. Also, you must do one
712 | of these things:
713 |
714 | a) Accompany the work with the complete corresponding
715 | machine-readable source code for the Library including whatever
716 | changes were used in the work (which must be distributed under
717 | Sections 1 and 2 above); and, if the work is an executable linked
718 | with the Library, with the complete machine-readable "work that
719 | uses the Library", as object code and/or source code, so that the
720 | user can modify the Library and then relink to produce a modified
721 | executable containing the modified Library. (It is understood
722 | that the user who changes the contents of definitions files in the
723 | Library will not necessarily be able to recompile the application
724 | to use the modified definitions.)
725 |
726 | b) Use a suitable shared library mechanism for linking with the
727 | Library. A suitable mechanism is one that (1) uses at run time a
728 | copy of the library already present on the user's computer system,
729 | rather than copying library functions into the executable, and (2)
730 | will operate properly with a modified version of the library, if
731 | the user installs one, as long as the modified version is
732 | interface-compatible with the version that the work was made with.
733 |
734 | c) Accompany the work with a written offer, valid for at
735 | least three years, to give the same user the materials
736 | specified in Subsection 6a, above, for a charge no more
737 | than the cost of performing this distribution.
738 |
739 | d) If distribution of the work is made by offering access to copy
740 | from a designated place, offer equivalent access to copy the above
741 | specified materials from the same place.
742 |
743 | e) Verify that the user has already received a copy of these
744 | materials or that you have already sent this user a copy.
745 |
746 | For an executable, the required form of the "work that uses the
747 | Library" must include any data and utility programs needed for
748 | reproducing the executable from it. However, as a special exception,
749 | the materials to be distributed need not include anything that is
750 | normally distributed (in either source or binary form) with the major
751 | components (compiler, kernel, and so on) of the operating system on
752 | which the executable runs, unless that component itself accompanies
753 | the executable.
754 |
755 | It may happen that this requirement contradicts the license
756 | restrictions of other proprietary libraries that do not normally
757 | accompany the operating system. Such a contradiction means you cannot
758 | use both them and the Library together in an executable that you
759 | distribute.
760 |
761 | 7. You may place library facilities that are a work based on the
762 | Library side-by-side in a single library together with other library
763 | facilities not covered by this License, and distribute such a combined
764 | library, provided that the separate distribution of the work based on
765 | the Library and of the other library facilities is otherwise
766 | permitted, and provided that you do these two things:
767 |
768 | a) Accompany the combined library with a copy of the same work
769 | based on the Library, uncombined with any other library
770 | facilities. This must be distributed under the terms of the
771 | Sections above.
772 |
773 | b) Give prominent notice with the combined library of the fact
774 | that part of it is a work based on the Library, and explaining
775 | where to find the accompanying uncombined form of the same work.
776 |
777 | 8. You may not copy, modify, sublicense, link with, or distribute
778 | the Library except as expressly provided under this License. Any
779 | attempt otherwise to copy, modify, sublicense, link with, or
780 | distribute the Library is void, and will automatically terminate your
781 | rights under this License. However, parties who have received copies,
782 | or rights, from you under this License will not have their licenses
783 | terminated so long as such parties remain in full compliance.
784 |
785 | 9. You are not required to accept this License, since you have not
786 | signed it. However, nothing else grants you permission to modify or
787 | distribute the Library or its derivative works. These actions are
788 | prohibited by law if you do not accept this License. Therefore, by
789 | modifying or distributing the Library (or any work based on the
790 | Library), you indicate your acceptance of this License to do so, and
791 | all its terms and conditions for copying, distributing or modifying
792 | the Library or works based on it.
793 |
794 | 10. Each time you redistribute the Library (or any work based on the
795 | Library), the recipient automatically receives a license from the
796 | original licensor to copy, distribute, link with or modify the Library
797 | subject to these terms and conditions. You may not impose any further
798 | restrictions on the recipients' exercise of the rights granted herein.
799 | You are not responsible for enforcing compliance by third parties with
800 | this License.
801 |
802 | 11. If, as a consequence of a court judgment or allegation of patent
803 | infringement or for any other reason (not limited to patent issues),
804 | conditions are imposed on you (whether by court order, agreement or
805 | otherwise) that contradict the conditions of this License, they do not
806 | excuse you from the conditions of this License. If you cannot
807 | distribute so as to satisfy simultaneously your obligations under this
808 | License and any other pertinent obligations, then as a consequence you
809 | may not distribute the Library at all. For example, if a patent
810 | license would not permit royalty-free redistribution of the Library by
811 | all those who receive copies directly or indirectly through you, then
812 | the only way you could satisfy both it and this License would be to
813 | refrain entirely from distribution of the Library.
814 |
815 | If any portion of this section is held invalid or unenforceable under any
816 | particular circumstance, the balance of the section is intended to apply,
817 | and the section as a whole is intended to apply in other circumstances.
818 |
819 | It is not the purpose of this section to induce you to infringe any
820 | patents or other property right claims or to contest validity of any
821 | such claims; this section has the sole purpose of protecting the
822 | integrity of the free software distribution system which is
823 | implemented by public license practices. Many people have made
824 | generous contributions to the wide range of software distributed
825 | through that system in reliance on consistent application of that
826 | system; it is up to the author/donor to decide if he or she is willing
827 | to distribute software through any other system and a licensee cannot
828 | impose that choice.
829 |
830 | This section is intended to make thoroughly clear what is believed to
831 | be a consequence of the rest of this License.
832 |
833 | 12. If the distribution and/or use of the Library is restricted in
834 | certain countries either by patents or by copyrighted interfaces, the
835 | original copyright holder who places the Library under this License may add
836 | an explicit geographical distribution limitation excluding those countries,
837 | so that distribution is permitted only in or among countries not thus
838 | excluded. In such case, this License incorporates the limitation as if
839 | written in the body of this License.
840 |
841 | 13. The Free Software Foundation may publish revised and/or new
842 | versions of the Lesser General Public License from time to time.
843 | Such new versions will be similar in spirit to the present version,
844 | but may differ in detail to address new problems or concerns.
845 |
846 | Each version is given a distinguishing version number. If the Library
847 | specifies a version number of this License which applies to it and
848 | "any later version", you have the option of following the terms and
849 | conditions either of that version or of any later version published by
850 | the Free Software Foundation. If the Library does not specify a
851 | license version number, you may choose any version ever published by
852 | the Free Software Foundation.
853 |
854 | 14. If you wish to incorporate parts of the Library into other free
855 | programs whose distribution conditions are incompatible with these,
856 | write to the author to ask for permission. For software which is
857 | copyrighted by the Free Software Foundation, write to the Free
858 | Software Foundation; we sometimes make exceptions for this. Our
859 | decision will be guided by the two goals of preserving the free status
860 | of all derivatives of our free software and of promoting the sharing
861 | and reuse of software generally.
862 |
863 | NO WARRANTY
864 |
865 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
866 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
867 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
868 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
869 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
870 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
871 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
872 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
873 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
874 |
875 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
876 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
877 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
878 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
879 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
880 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
881 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
882 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
883 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
884 | DAMAGES.
885 |
886 | END OF TERMS AND CONDITIONS
887 |
888 | How to Apply These Terms to Your New Libraries
889 |
890 | If you develop a new library, and you want it to be of the greatest
891 | possible use to the public, we recommend making it free software that
892 | everyone can redistribute and change. You can do so by permitting
893 | redistribution under these terms (or, alternatively, under the terms of the
894 | ordinary General Public License).
895 |
896 | To apply these terms, attach the following notices to the library. It is
897 | safest to attach them to the start of each source file to most effectively
898 | convey the exclusion of warranty; and each file should have at least the
899 | "copyright" line and a pointer to where the full notice is found.
900 |
901 |
902 | Copyright (C)
903 |
904 | This library is free software; you can redistribute it and/or
905 | modify it under the terms of the GNU Lesser General Public
906 | License as published by the Free Software Foundation; either
907 | version 2.1 of the License, or (at your option) any later version.
908 |
909 | This library is distributed in the hope that it will be useful,
910 | but WITHOUT ANY WARRANTY; without even the implied warranty of
911 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
912 | Lesser General Public License for more details.
913 |
914 | You should have received a copy of the GNU Lesser General Public
915 | License along with this library; if not, write to the Free Software
916 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
917 |
918 | Also add information on how to contact you by electronic and paper mail.
919 |
920 | You should also get your employer (if you work as a programmer) or your
921 | school, if any, to sign a "copyright disclaimer" for the library, if
922 | necessary. Here is a sample; alter the names:
923 |
924 | Yoyodyne, Inc., hereby disclaims all copyright interest in the
925 | library `Frob' (a library for tweaking knobs) written by James Random Hacker.
926 |
927 | , 1 April 1990
928 | Ty Coon, President of Vice
929 |
930 | That's all there is to it!
931 |
--------------------------------------------------------------------------------