gittools / gitlink Goto Github PK
View Code? Open in Web Editor NEWMaking .NET open source accessible!
License: MIT License
Making .NET open source accessible!
License: MIT License
It should be possible to determine the remote url based on the local git directory. Then we can create something like this:
gitlink.exe c:\source\myproject
Then if there is a .git directory, we check out the remote and know the remote url and automatically fill that for the user.
When gitlink is run without any command line argument it throws an exception
C:\Users\nsrinivasan>gitlink
GitLink v2.1.0.0
================
Arguments:
Invalid number of arguments
An unexpected error occurred | [GitLinkException] GitLink.GitLinkException: Inva
lid number of arguments
at Catel.Logging.LogExtensions.ErrorAndThrowException[TException](ILog log, S
tring messageFormat, Object[] args) in c:\CI_WS\Ws\5778\Source\Catel\src\Catel.C
ore\Catel.Core.Shared\Logging\Extensions\LogExtensions.cs:line 373
at GitLink.ArgumentParser.ParseArguments(List`1 commandLineArguments, IProvid
erManager providerManager)
at GitLink.Program.Main(String[] args)
It should provide the available arguments similar to this
C:\Users\nsrinivasan>gitlink /?
GitLink v2.1.0.0
================
Arguments: /?
Update pdb files to link all sources. This will allow anyone to step through the
source code while debugging without a symbol source server.
Note that the solution must be built because this application will update existi
ng pdb files.
GitLink [solutionPath] -u [urlToRepository]
solutionPath The directory containing the solution with the pdb files.
-u [url] Url to remote git repository.
-f [file] Solution file name.
-c [config] Name of the configuration, default value is 'Release'.
-p [platform] Name of the platform, default value is 'AnyCPU'.
-b [branch] Name of the branch to use on the remote repository.
-l [file] The log file to write to.
-s [shaHash] The SHA-1 hash of the commit.
-debug Enables debug mode with special dumps of msbuild.
Press any key to continue
Move documentation to readme.io.
Initiated by oxyplot/oxyplot#284
something like -ignore [path-to-csproj], comma separated. When walking though the sln, you just ignore the matching entries.
When an error occurs, the console application waits for a key input. This should be removed to prevent it from blocking builds.
Clean up after you are done. Create a disposable context that will gather all temporary files.
First, in issue #44 I mentioned that it's not possible to install the package in projects targeting .NET 4.0 and earlier. Looking at the package I realized that it actually adds a reference to the project where it's installed.
Is that really necessary? I figure that GitLink is more related to the general build process and as such I think that the exe could be directly in the content
. To actually use it's necessary to add a call to the build script manually anyway.
Especially on build servers, the file names can become quite long. Use filenames relative to the solution root.
By @gep13
Just another suggestion, while I am here...
You could push a new version of the GitHubLink package to Chocolatey, which does nothing more than take a dependency on the new GitLink Chocolatey package (i.e. take out the existing chocolateyInstall.ps1). That way, anyone running either:
choco install GitHubLink
or
cinst GitHubLink
will automatically get the latest version of GitLink.
Hi
Here's how I run GitLink in my solution
$(MSBuildProjectDirectory)\Build\GitLink.exe" "$(MSBuildProjectDirectory)\.." -u https://github.com/r2rml4net/core
Apparently the ..
path segment doesn't work for some reason.
I've fixed this by wrapping the path in $([System.IO.Path]::GetFullPath(..)) but it looks like a bug.
Tom
I've been wondering how GitHubLink processes pdb work.
I mean does the modified pdb contain precise revision information so that code for a specific revision is downloaded from github rather than branch's HEAD?
I've got a IndexOutOfBounds exception here: https://github.com/CatenaLogic/GitLink/blob/develop/src/GitLink/Pdb/PdbFile.cs#L264
I've created a package, which includes the source links to github. My pdb contains these lines
SRCSRV: variables ------------------------------------------
SRCSRVVERCTRL=https
SRCSRVTRG=https://raw.github.com/MakoLab/RomanticWeb/ca77347d9d6f1dcbd90522a5a09f9f3e0b907e0c/%var2%
SRCSRV: source files ---------------------------------------
C:\BuildAgent\work\93934db5aef9e39\.build\CommonAssemblyInfo.cs*C:/BuildAgent/work/93934db5aef9e39/.build/CommonAssemblyInfo.cs
[...]
C:\BuildAgent\work\93934db5aef9e39\RomanticWeb\EntityContextFactory.cs*EntityContextFactory.cs
[...]
But when I try to step into that EntityContextFactory class I get the typical browse for source dialog, with original location saying c:\BuildAgent\work\93934db5aef9e39\RomanticWeb\EntityContextFactory.cs
.
Also here's what the source not found window says in VS
Locating source for 'c:\BuildAgent\work\93934db5aef9e39\RomanticWeb\EntityContextFactory.cs'. (No checksum.)
The file 'c:\BuildAgent\work\93934db5aef9e39\RomanticWeb\EntityContextFactory.cs' does not exist.
Looking in script documents for 'c:\BuildAgent\work\93934db5aef9e39\RomanticWeb\EntityContextFactory.cs'...
Looking in the projects for 'c:\BuildAgent\work\93934db5aef9e39\RomanticWeb\EntityContextFactory.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\vccorlib\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include'...
Looking for source using source server...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\BuildAgent\work\93934db5aef9e39\RomanticWeb\EntityContextFactory.cs.
The debugger could not locate the source file 'c:\BuildAgent\work\93934db5aef9e39\RomanticWeb\EntityContextFactory.cs'.
I have the checkbox checked as on the screenshot in readme. What else could be wrong?
gitlink /h
Arguments: /h
Update pdb files to link all sources. This will allow anyone to step through the source code while debugging without a symbol source server.
Note that the solution must be built because this application will update existing pdb files.
GitLink [solutionPath] -u [urlToRepository]
solutionPath The directory containing the solution with the pdb files.
-u [url] Url to remote git repository.
-f [file] Solution file name.
-c [config] Name of the configuration, default value is 'Release'.
-p [platform] Name of the platform, default value is 'AnyCPU'.
-b [branch] Name of the branch to use on the remote repository.
-l [file] The log file to write to.
-s [shaHash] The SHA-1 hash of the commit.
-debug Enables debug mode with special dumps of msbuild.
Press any key to continue
An unexpected error occurred | [InvalidOperationException] System.InvalidOperationException: Schlssel knnen nicht gelesen werden, wenn keine der Anwendungen eine Konsole besitzt, oder wenn die Konsoleneingabe aus einer Datei umgeleitet wurde. Verwenden Sie Console.Read.
bei System.Console.ReadKey(Boolean intercept)
bei GitLink.Program.Main(String[] args)
Not sure if people want this. Will await comments on this issue report to see if it is worth the investment of implementing.
Instead of having to enumerate projects to skip, I'd really like to just suppress error generation. The main scenario is appveyor where an error code is hard to ignore externally. I don't want to have to specify every project to skip, I'd rather just pass in a command line param to ignore all errors.
Check if we are allowed to distribute the executable.
I've tried both Nuget and Chocolatey and I'm getting a FileNotFoundExceptionwhen running GitHubLink
$ gitlink
Arguments:
Invalid number of arguments
An unexpected error occurred | [GitLinkException] GitLink.GitLinkException: Invalid number of arguments
bei Catel.Logging.LogExtensions.ErrorAndThrowException[TException](ILog log, String messageFormat, Object[] args) in c:\CI_WS\Ws\5778\Source\Catel\src\Catel.Core\Catel.Core.Shared\Logging\Extensions\LogExtensions.cs:Zeile 398.
bei GitLink.ArgumentParser.ParseArguments(List`1 commandLineArguments, IProviderManager providerManager)
bei GitLink.Program.Main(String[] args)
which is pretty useless. ;-)
Hi, we are using a version of bitbucket hosted internally (e.g. bitbucket.foobar.com) could such urls be supported as well?
i download Catel.Core and in a new console app i coded just for the sake of debugging
Catel.Core.ModuleInitializer.Initialize();
I also checked the Modules window and the symbols are not loaded for the assembly. What can i be missing?
Support private repositories.
The url parameter (-u) is documented as "-url" twice in the help feature.
Unfortunately the -c is already take so we have to think of a different name.
Allow users to create a custom provider by specifying the url with replacements such as {CommitSha}.
Pull requests aren't supported yet. Should be implemented. I did this for GitVersion as well so can use the same code.
See https://plan.io/
Checksums for verification should be implemented.
This is an issue in Catel, see https://catelproject.atlassian.net/browse/CTL-418 for more details.
This issue is fixed in Catel. Will update once new nightly build is out.
Xaml files are useless for GitLink anyway, and it skips a few warnings.
Add support for bitbucket and other custom base urls.
i get
Error 1 NuGet Package restore failed for project GitHubLink: The 'Fody 1.23.2' package requires NuGet client version '2.8' or above, but the current NuGet version is '2.7.40911.287'.. 0 0
VSO's vNext build agents supports building from GitHub and any other external Git repo. GitLink can/should be packaged up as a Build Step for use there more easily.
See GitVersion for an example:
https://github.com/GitTools/GitVersion/tree/master/src/GitVersionTfsTask
there is a call in LinkToProject
string fullPath = Path.GetFullPath(project.GetOutputPdbFile());
this will return an incorrect path in the case you used msbuid with a custom OutputPath.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.