wolframresearch / gitlink Goto Github PK
View Code? Open in Web Editor NEWGit integration for the Wolfram Language
License: Other
Git integration for the Wolfram Language
License: Other
The most recent release is more than 2 years old. It looks like bugs were fixed since then. And the internal paclet server has a build of the paclet from May 5 of 2020, which of course the public does not have access to. We need to use GitLink for https://github.com/maxitg/SetReplace/ as part of the developer workflow, and non-Wolfram users need to get a build of GitLink. It would be nice if they could have recent build of the paclet. Could we get a fresh release here on the github project?
I downloaded the great GIT package.
The GitCommit works fine.
The GitPush did not work as expected.
I could not solve this, because the documentation is not available for GitPush.
Is there documentation for GitPush?
I added a text copy of my Mathematica code:
(* GitLink of GitLink-2018.07.20.01.paclet *)
Needs["GitLink`"]
(* repo on computer *)
workingRepo=GitOpen[NotebookDirectory[]]
GitProperties[workingRepo]
(* git properties of of working repo:
\[LeftAssociation]"HEAD"\[Rule]"refs/heads/master",
"HeadBranch"[Rule]"master",
"ShallowQ"[Rule]False,
"EmptyQ"[Rule]False,
"UnbornHeadQ"[Rule]False,
"BareQ"[Rule]False,
"GitDirectory"[Rule]"\\WURNET.NL\Homes\boend001\My Documents\2020\1600002031 EU H2020 VACDIVA\.git\",
"WorkingDirectory"[Rule]"\\WURNET.NL\Homes\boend001\My Documents\2020\1600002031 EU H2020 VACDIVA\",
"DetachedHeadQ"[Rule]False,
"Namespace"[Rule]$Failed,
"State"[Rule]"None",
"Conflicts"[Rule]{},
"Remotes"[Rule][LeftAssociation]"origin"[Rule][LeftAssociation]"FetchURL"[Rule]"[email protected]:wbvr_epi/vacdiva2020.git","PushURL"[Rule]"[email protected]:wbvr_epi/vacdiva2020.git","FetchRefSpecs"[Rule]{"+refs/heads/:refs/remotes/origin/"},"PushRefSpecs"[Rule]{}[RightAssociation][RightAssociation],
"LocalBranches"[Rule]{"master"},
"RemoteBranches"[Rule]{"origin/master"},
"Tags"[Rule]{}[RightAssociation] *)
!(*
StyleBox[
RowBox[{
RowBox[{
StyleBox[
RowBox[{"(",
StyleBox[
StyleBox["", "InformationUsageText",
StripOnInput->False,
LineSpacing->{1.5, 1.5, 3.}], "InformationUsageText",
StripOnInput->False,
LineSpacing->{1.5, 1.5, 3.}]}]],
StyleBox[
StyleBox["\n", "InformationUsageText",
StripOnInput->False,
LineSpacing->{1.5, 1.5, 3.}], "InformationUsageText",
StripOnInput->False,
LineSpacing->{1.5, 1.5, 3.}],
RowBox[{
RowBox[{
RowBox[{"GitLink`GitPush",
StyleBox[" ", "InformationUsageText",
StripOnInput->False,
LineSpacing->{1.5, 1.5, 3.}], "does", " ", "not", " ", "provide", " ", "a"}], " ", "<", "local", ">", " ",
RowBox[{"documentation", " ", "page"}]}], ",", " ",
RowBox[{"while", " ", "other", " ", "function", " ", "do"}]}],
StyleBox["\n", "InformationUsageText",
StripOnInput->False,
LineSpacing->{1.5, 1.5, 3.}], " ", ")"}], " "}], "InformationUsageText",
StripOnInput->False,
LineSpacing->{1.5, 1.5, 3.}])
?"GitLink`*"
(* remote repo *)
remoteRepo="origin";
(* test of proper remote repo : result is TRUE *)
GitRemoteQ[workingRepo,remoteRepo]
GitPush[workingRepo,remoteRepo,"origin/master"]
(* Output Error:
StringForm::sfr: "Item !(*RowBox[{"1"}]) requested in "!(*RowBox[{"\"The git remote failed to connect with the error \\\"1
\\\".\""}])" out of range; !(*RowBox[{"0"}]) items available."
""GitPush::noconnect: "The git remote failed to connect with the error "1
"."
False
*)
(*
The documentation is not available
What should I change to get the GitPush working?
*)
GitTest.pdf
V11.2 V11.1 Win7
Let's create a test repo:
<< GitLink`
dir = FileNameJoin[{$UserDocumentsDirectory, "Test2"}];
CreateDirectory[
FileNameJoin[{dir, "sub"}], CreateIntermediateDirectories -> True
];
Export[
FileNameJoin[{dir, "sub", "test.m"}], "Print@\"test\"", "Text"
];
repo = GitInit@dir;
GitStatus@repo
GitAdd[repo, All]
<|"New" -> {"sub\"}, ...|>
GitAdd::gitoperationfailed: A git operation failed with the message "Invalid path: 'sub/'".
{}
But if I run git add sub/
from a terminal, it works. Hope it is not another silly mistake I've made.
The package is marked as compatible with Mathematica 10.1+ in PacletInfo, but some functions use the symbol Nothing
, which requires M10.2.
https://github.com/WolframResearch/GitLink/blob/master/GitLink/Kernel/GitLink.wl#L1253
This is a feature request to include a usable visual notebook diff tool that makes it practically useful to keep notebooks in version control.
To add some weight to this:
There are some very well organized packages that are developed in a literate style in notebooks, and produce .m
(.wl
) files through the auto-generated package feature. Examples are SciDraw (you won't find the notebook sources online though) and RUBI. It was the notebook interface that made it possible to organize these packages so nicely, but they can't easily be put in a version control system because of the lack of a notebook diff tool. I believe the one in AuthorTools is outdated now.
This is a feature suggestion.
It would be nice to have functionality like git-archive. This would make it easy to "build" a package and make sure not to accidentally include any non-versioned junk in the output.
I downloaded and installed the Paclet on my Windows and Linux machines. Windows works fine, but when I try to GitOpen any repo (I tried several including newly created ones) I just get $Failed. I suspect that libgit2 is somehow not loading properly, but without a real error message I'm not sure how to provide a more helpful bug report. Are there some additional steps I can take to create a more useful report (or are there any known issues on 64bit Linux (Ubuntu 14.04 distro).
Does GitRange, ToGitObject etc support ranges?
e.g. GitRange[repo, "hash1..hash2"]
or GitRange[repo, "^hash1 hash2"]
fail. I end up with ridiculous solution:
Complement[
GitRange[repo, ToGitObject[repo, "hash2"]],
GitRange[repo, ToGitObject[repo, "hash1"]]
]
The latest release (2018.07.20.01) does not include binaries for M10.3 on macOS, so when I try to load it, I get
<< GitLink`
InitializeGitLibrary::libnotfound: -- Message text not found --
Either there is a problem with those options or we use it incorrectly. In the latter case the issue would only be about clarifying the usage in documentation.
Shortly, they either break GitCommit
or have no effect at all. More in:
A small feature request.
Would be nice to have by default GitInit[] := GitInit @ Directory[]
(more or less)
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.