Added:
Fixed:
Server-side source control extension for Git on InterSystems' platforms
zpm "install git-source-control"
d ##class(SourceControl.Git.API).Configure()
This will also allow you to generate an SSH key for use as (e.g.) a deploy key and to initialize or clone a git repo.isfs
server-side editing. First, save your current workspace in which you have the code open. Then, open the .code-workspace
file generated by VS Code and add the following to the list of folders:
{
"name": "<whatever you want the folder to show up as in the project explorer view>",
"uri": "isfs://<instance_name>:<namespace_name>/"
}
Add a file for tracking by right-clicking on it in the workspace/project view and choosing Git > Add. This same menu also has options to remove (stop tracking the file), discard changes (revert to the index), or commit changes.
You can browse file history and commit changes through a user interface launched from the top level Git > "Launch Git UI" menu item. There is also a page for configuring settings.
The same right click menus as in Studio live under "Server Source Control..." when right-clicking in a file (in the editor) or on a file when exploring an isfs folder. The top level "source control" menu is accessible through the command palette or the source control icon in the top right of the editor.
To specify where files should go relative to your repository root, add mappings via the "Settings" menu item. A mapping has three parts:
This might look like:
You really should be connecting to IRIS over a secured (https) connection. If you're not, web pages in this extension will launch in an external browser, because constraints around session cookies keep them from working properly in VSCode.
Newer git versions may produce output like:
fatal: detected dubious ownership in repository at 'C:/Your/Repo/Root' To add an exception for this directory, call:
git config --global --add safe.directory C:/Your/Repo/Root
Set the environment variable GIT_TEST_DEBUG_UNSAFE_DIRECTORIES=true and run
again for more information.
It is important for the namespace temp folder to be owned by the user IRIS runs as. (On Unix, commonly irisusr; on Windows, generally a designated service account or SYSTEM.) Setting this config flag is unlikely to actually help; just make sure the ownership is correct.
If you want to interact with remotes from VSCode/Studio directly (e.g., to push/pull), you must use ssh (rather than https), create a public/private key pair to identify the instance (not yourself), configure the private key file for use in Settings, and configure the public key as a deploy key in the remote(s).
For developers to be able to run this extension, they'll need the USE privilege on %System_Callout.
Assuming you have the local and remote repositories created,
ssh-keygen
.ssh://git@ssh.github.com:443/<repo_owner>/<repo_name>.git
<path to IRIS Instance storage>\mgr\<private key>
~/.ssh/<private key>
ssh
command in the git config for your repository as:
git config core.sshCommand 'ssh -i ~/.ssh/<private key name>'
git fetch
in Git Bash. All 3 should work without any issues.⚠️ Whenever any code in this project is updated outside the server (e.g. after every git pull
), you have to run zpm "load <absolute path to git-source-control>"
. Otherwise, the changes won't be reflected on the server. However, if you load git-source-control via the InterSystems package manager and run git pull
via the extension itself with the default pull event handler configured, it'll just work.
Added:
Fixed:
Fixed:
Added
$username
and $username@<hostname>
Fixed
Internal
Fixed:
Fixed:
Fixed
Changed the way we match mappings in NameToInternalName, modified and added new testcases by @isc-svelury in #199
sc-list.txt
anymore. We only use a global to maintain a list of tracked files that are in IRIS and Git..pkg
) and project (.prj
) files will no longer be in source control. Instead, all the individual files in the package will be in source control. This means that the user can easily remove a single file from source control. See Feature 2 for an explanation on how it all works.api/uncommitted
and confirms that the user knows another user has uncommitted changes and that they will carry them over on checkout.%
classes.sc-list.txt
from the project.NoFolders
mappings:
NoFolders
setting can now be applied to specific packages (instead of covering all files of a type).NoFolders
mappings. This way, all files that match the mapping will be stored with no further sub-folder creation at the specific path root.NameToInternalName()
tries to get internal names for all file types that have mappings.NameToInternalName()
no longer returns an empty string for a % class.Name()
now matches mappings correctly.NoFolders
toggle on a new mapping triggered the toggle on the first mapping instead of the clicked toggle.^SYS("SourceControl","Git","items")
in ImportRoutines()
if we find that the file has been deleted.RefreshUncommitted()
now uses git status to prune out files that were committed through means other than the Commit changes option is the Server Source Control menu. It also adds records to track uncommitted files, if applicable. This should help with ensuring that multiple users never edit the same file at the same time because of a missing record of change. It will also help with cases where a user might be blocked from editing a file because of a stale record in the uncommitted queue.Git add packages by @isc-svelury in #79
Removing from source control now works by @isc-svelury in #80
Queue filter by @isc-svelury in #82
compatibility fix for IE + minor bugfix by @isc-svelury in #83
Reload page on login expiration by @isc-svelury in #84
String.substr() is deprecated and substring() works a little differently by @isc-svelury in #87
Updated README with OpenSSH requirement by @isc-svelury in #89
Merge minor UX improvements by @isc-svelury in #94
Automatically stage any changes to sc-list.txt and note in README by @isc-svelury in #96
Stash list, pop, apply, drop; stash files from workspace by @isc-svelury in #95
Background color fix by @isc-svelury in #99
Automatically refresh the list of files in Working Copy after stashing by @isc-svelury in #98
includes is not supported by IE. Use indexOf instead. by @isc-svelury in #97
Preserve filenames for AbstractDocuments by @isc-svelury in #100
Miscellaneous bug fixes, most notably for UI operations on some (all?) Linux platforms
Fixes for better usability in portal-based interoperability editors
Fixing completely broken UI on Linux
Clearer settings around git path when on git is available via PATH
Expose git version in CLI and settings UI
Popper.js downgrade for proper compatibility
New features for branch management
Initial Release - Virtual Summit 2021