Skip to content

Commit 67c8612

Browse files
authored
Automatically stage any changes to sc-list.txt note in README (#96)
Co-authored-by: Sarmishta Velury <[email protected]>
1 parent 61f707a commit 67c8612

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,14 @@ You can browse file history and commit changes through a user interface launched
3838
### VSCode
3939
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.
4040
41-
### A Note on Security
41+
## Notes
42+
43+
### Security
4244
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).
4345
46+
### `sc-list.txt`
47+
The `sc-list.txt` file is used to keep track of files that exist on the filesystem and the server. It is used to determine which files need to be exported from the filesystem or imported into the server. As such, it must be tracked by Git and synced properly to ensure consistent extension behavior across all the distributed repositories. To simplify this, when `sc-list.txt` is updated, any changes to it are automatically staged and will be committed in the next commit barring any manual intervention.
48+
4449
## During Development
4550
4651
:warning: Whenever any code in this project is updated outside of 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.

cls/SourceControl/Git/Utils.cls

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,10 @@ ClassMethod ExportSCList() As %Status
10801080
$$$QuitOnError(file.%Save())
10811081
do file.Close()
10821082
kill file
1083+
1084+
do ..RunGitWithArgs(.errStream, .outStream, "add", ..#SCListFilename)
1085+
do errStream.OutputToDevice()
1086+
do outStream.OutputToDevice()
10831087
quit $$$OK
10841088
}
10851089

0 commit comments

Comments
 (0)