1
0
mirror of synced 2026-01-26 04:12:03 +00:00

Rmk38: Added git "projects" to GITFNS, plus minor updates to directory/source comparisons (#771)

* SETSTRINGLENGTH.TEDIT: Orphan TEDIT file, no code in lispusers

It will be restored when the code it goes with is moved over from LFG

* COMPAREDIRECTORIES: minor fix

* COMPARESOURCES:  Add IGNORECOMMENTS flag

* GITFNS: Add new "project" capability for multiple clones

The TEDIT file got smashed, so new features are not yet documented.  Should work as before for the Medley project.  If you set up unix variables LOOPS or NOTECARDS to point to their local clones (or just name the clones git-loops or git-notecards as sisters to your MEDLEYDIR), you should be able to do prc loops or prc notecards.

* Update GITFNS.TEDIT

Repaired the Tedit smash

* EDITINTERFACE:  All date comments at the same comment level

* EDITINTERFACE:  Improved date alignment

* GITFNS again:  added cdg and cdw commands
This commit is contained in:
rmkaplan
2022-05-13 12:50:16 -07:00
committed by GitHub
parent d28bcf19fe
commit 8bfbe99367
10 changed files with 1108 additions and 742 deletions

View File

@@ -1,14 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "25-Apr-2022 09:25:02" 
{DSK}<Users>kaplan>Local>medley3.5>my-medley>lispusers>COMPAREDIRECTORIES.;217 123829
(FILECREATED " 9-May-2022 20:28:46" 
{DSK}<users>kaplan>local>medley3.5>my-medley>lispusers>COMPAREDIRECTORIES.;218 123686
:CHANGES-TO (FNS CDBROWSER-COPY COMPAREDIRECTORIES.INFOS.TYPE CDFILES FIND-UNSOURCED-FILES
FIND-SOURCE-FILES FIND-COMPILED-FILES FIND-UNLOADED-FILES FIND-LOADED-FILES
FIND-MULTICOMPILED-FILES SOURCE-FOR-COMPILED-P CDBROWSER-DELETE-FILE)
:CHANGES-TO (FNS SOURCE-FOR-COMPILED-P)
:PREVIOUS-DATE "29-Mar-2022 11:53:34"
{DSK}<Users>kaplan>Local>medley3.5>my-medley>lispusers>COMPAREDIRECTORIES.;215)
:PREVIOUS-DATE "25-Apr-2022 09:25:02"
{DSK}<users>kaplan>local>medley3.5>my-medley>lispusers>COMPAREDIRECTORIES.;217)
(* ; "
@@ -1376,7 +1374,8 @@ Copyright (c) 1985-1988, 1990, 1994, 1998, 2018, 2020-2021 by Venue & Xerox Corp
(LIST SOURCENAME (GDATE (IDATE SOURCEDATE))))])
(SOURCE-FOR-COMPILED-P
[LAMBDA (SOURCE COMPILED DFASLMARGIN) (* ; "Edited 25-Apr-2022 08:46 by rmk")
[LAMBDA (SOURCE COMPILED DFASLMARGIN) (* ; "Edited 9-May-2022 20:28 by rmk")
(* ; "Edited 25-Apr-2022 08:46 by rmk")
(* ; "Edited 31-Oct-2020 09:12 by rmk:")
(* ;; "There seems to be some variation between the source dates in dfasl files and the filecreated date in the sources, they often don't match exactly. But if they are within DFASLMARGIN, we assume a match. We require exact date match for LCOMS")
@@ -1416,8 +1415,8 @@ Copyright (c) 1985-1988, 1990, 1994, 1998, 2018, 2020-2021 by Venue & Xerox Corp
(CADDR COMPILED))
(EQUAL (CADR SOURCE)
(CADDDR COMPILED))
(AND [STREQUAL 'DFASL (U-CASE (FILENAMEFIELD.STRING (CAR COMPILED)
'EXTENSION]
(AND (STRING.EQUAL 'DFASL (FILENAMEFIELD.STRING (CAR COMPILED)
'EXTENSION))
(LET ((TIMEDIFF (COMPILE-SOURCE-DATE-DIFF COMPILED SOURCE)))
(* ;; "If compiled was no more than 20 minutes later, it's probably OK. Of no more than DFASLMARGIN earlier, if it is negative.")
@@ -2096,24 +2095,24 @@ Copyright (c) 1985-1988, 1990, 1994, 1998, 2018, 2020-2021 by Venue & Xerox Corp
(PUTPROPS COMPAREDIRECTORIES COPYRIGHT ("Venue & Xerox Corporation" 1985 1986 1987 1988 1990 1994 1998
2018 2020 2021))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (2856 22205 (COMPAREDIRECTORIES 2866 . 7699) (COMPAREDIRECTORIES.INFOS 7701 . 10552) (
COMPAREDIRECTORIES.CANDIDATES 10554 . 13939) (CDENTRIES.SELECT 13941 . 18716) (
COMPAREDIRECTORIES.INFOS.TYPE 18718 . 19439) (MATCHNAME 19441 . 20121) (CD.INSURECDVALUE 20123 . 21737
) (CD.UPDATEWIDTHS 21739 . 22203)) (22206 31875 (CDFILES 22216 . 27969) (CDFILES.MATCH 27971 . 29596)
(CDFILES.PATS 29598 . 31873)) (31876 46961 (CDPRINT 31886 . 34231) (CDPRINT.HEADER 34233 . 35130) (
CDPRINT.LINE 35132 . 37688) (CDPRINT.MAXWIDTHS 37690 . 41805) (CDPRINT.COLHEADERS 41807 . 42445) (
CDPRINT.COLUMNS 42447 . 46326) (CDTEDIT 46328 . 46959)) (46962 55331 (CDMAP 46972 . 48404) (CDENTRY
48406 . 48715) (CDSUBSET 48717 . 50156) (CDMERGE 50158 . 54012) (CDMERGE.COMMON 54014 . 55329)) (55332
62870 (BINCOMP 55342 . 59631) (EOLTYPE 59633 . 62195) (EOLTYPE.SHOW 62197 . 62868)) (63398 75925 (
FIND-UNCOMPILED-FILES 63408 . 67051) (FIND-UNSOURCED-FILES 67053 . 69437) (FIND-SOURCE-FILES 69439 .
71177) (FIND-COMPILED-FILES 71179 . 73056) (FIND-UNLOADED-FILES 73058 . 73911) (FIND-LOADED-FILES
73913 . 74341) (FIND-MULTICOMPILED-FILES 74343 . 75923)) (75926 84255 (CREATED-AS 75936 . 80733) (
SOURCE-FOR-COMPILED-P 80735 . 83560) (COMPILE-SOURCE-DATE-DIFF 83562 . 84253)) (84256 94562 (
FIX-DIRECTORY-DATES 84266 . 87259) (FIX-EQUIV-DATES 87261 . 88786) (COPY-COMPARED-FILES 88788 . 90609)
(COPY-MISSING-FILES 90611 . 92768) (COMPILED-ON-SAME-SOURCE 92770 . 94560)) (94756 102102 (CDBROWSER
94766 . 98693) (CDBROWSER.STRINGS 98695 . 102100)) (102264 104000 (CD.TABLEITEM 102274 . 102494) (
CD.TABLEITEM.PRINTFN 102496 . 102695) (CD.TABLEITEM.COPYFN 102697 . 103755) (
CDTABLEBROWSER.HEADING.REPAINTFN 103757 . 103998)) (104001 123245 (CDTABLEBROWSER.WHENSELECTEDFN
104011 . 104479) (CD.COMMANDSELECTEDFN 104481 . 109582) (CD-MENUFN 109584 . 115947) (CDBROWSER-COPY
115949 . 119509) (CDBROWSER-DELETE-FILE 119511 . 122724) (CD-SWAPDIRS 122726 . 123243)))))
(FILEMAP (NIL (2611 21960 (COMPAREDIRECTORIES 2621 . 7454) (COMPAREDIRECTORIES.INFOS 7456 . 10307) (
COMPAREDIRECTORIES.CANDIDATES 10309 . 13694) (CDENTRIES.SELECT 13696 . 18471) (
COMPAREDIRECTORIES.INFOS.TYPE 18473 . 19194) (MATCHNAME 19196 . 19876) (CD.INSURECDVALUE 19878 . 21492
) (CD.UPDATEWIDTHS 21494 . 21958)) (21961 31630 (CDFILES 21971 . 27724) (CDFILES.MATCH 27726 . 29351)
(CDFILES.PATS 29353 . 31628)) (31631 46716 (CDPRINT 31641 . 33986) (CDPRINT.HEADER 33988 . 34885) (
CDPRINT.LINE 34887 . 37443) (CDPRINT.MAXWIDTHS 37445 . 41560) (CDPRINT.COLHEADERS 41562 . 42200) (
CDPRINT.COLUMNS 42202 . 46081) (CDTEDIT 46083 . 46714)) (46717 55086 (CDMAP 46727 . 48159) (CDENTRY
48161 . 48470) (CDSUBSET 48472 . 49911) (CDMERGE 49913 . 53767) (CDMERGE.COMMON 53769 . 55084)) (55087
62625 (BINCOMP 55097 . 59386) (EOLTYPE 59388 . 61950) (EOLTYPE.SHOW 61952 . 62623)) (63153 75680 (
FIND-UNCOMPILED-FILES 63163 . 66806) (FIND-UNSOURCED-FILES 66808 . 69192) (FIND-SOURCE-FILES 69194 .
70932) (FIND-COMPILED-FILES 70934 . 72811) (FIND-UNLOADED-FILES 72813 . 73666) (FIND-LOADED-FILES
73668 . 74096) (FIND-MULTICOMPILED-FILES 74098 . 75678)) (75681 84112 (CREATED-AS 75691 . 80488) (
SOURCE-FOR-COMPILED-P 80490 . 83417) (COMPILE-SOURCE-DATE-DIFF 83419 . 84110)) (84113 94419 (
FIX-DIRECTORY-DATES 84123 . 87116) (FIX-EQUIV-DATES 87118 . 88643) (COPY-COMPARED-FILES 88645 . 90466)
(COPY-MISSING-FILES 90468 . 92625) (COMPILED-ON-SAME-SOURCE 92627 . 94417)) (94613 101959 (CDBROWSER
94623 . 98550) (CDBROWSER.STRINGS 98552 . 101957)) (102121 103857 (CD.TABLEITEM 102131 . 102351) (
CD.TABLEITEM.PRINTFN 102353 . 102552) (CD.TABLEITEM.COPYFN 102554 . 103612) (
CDTABLEBROWSER.HEADING.REPAINTFN 103614 . 103855)) (103858 123102 (CDTABLEBROWSER.WHENSELECTEDFN
103868 . 104336) (CD.COMMANDSELECTEDFN 104338 . 109439) (CD-MENUFN 109441 . 115804) (CDBROWSER-COPY
115806 . 119366) (CDBROWSER-DELETE-FILE 119368 . 122581) (CD-SWAPDIRS 122583 . 123100)))))
STOP

Binary file not shown.

View File

@@ -1,13 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "25-Feb-2022 18:02:24" 
{DSK}<Users>kaplan>Local>medley3.5>my-medley>lispusers>COMPARESOURCES.;121 41359
(FILECREATED "12-May-2022 10:17:13" 
{DSK}<Users>kaplan>Local>medley3.5>my-medley>lispusers>COMPARESOURCES.;123 41825
:CHANGES-TO (FNS \CS.COMPARE.MASTERS \CS.COMPARE.TYPES \CS.REC.NAME \CS.ISRECFORM)
(VARS COMPARESOURCETYPES COMPARESOURCESCOMS)
:CHANGES-TO (FNS CSBROWSER)
:PREVIOUS-DATE "28-Jan-2022 18:22:40"
{DSK}<Users>kaplan>Local>medley3.5>my-medley>lispusers>COMPARESOURCES.;118)
:PREVIOUS-DATE "11-May-2022 19:12:38"
{DSK}<Users>kaplan>Local>medley3.5>my-medley>lispusers>COMPARESOURCES.;122)
(* ; "
@@ -38,7 +37,8 @@ Copyright (c) 1985-1988, 2018, 2020-2021 by Xerox Corporation.
(DEFINEQ
(COMPARESOURCES
[LAMBDA (FILEX FILEY EXAMINE DW? LISTSTREAM) (* ; "Edited 28-Jan-2022 17:10 by rmk")
[LAMBDA (FILEX FILEY EXAMINE DW? LISTSTREAM IGNORECOMMENTS)(* ; "Edited 11-May-2022 19:12 by rmk")
(* ; "Edited 28-Jan-2022 17:10 by rmk")
(* ; "Edited 26-Dec-2021 21:32 by rmk")
(* ; "Edited 19-Apr-2018 10:49 by rmk:")
@@ -74,6 +74,11 @@ Copyright (c) 1985-1988, 2018, 2020-2021 by Xerox Corporation.
(CL:MULTIPLE-VALUE-SETQ (BODYY ENVY)
(READFILE FILEY))
(SETQ BODYY (\CS.FILTER.GARBAGE BODYY))
(CL:WHEN IGNORECOMMENTS
(LET ((*REMOVE-INTERLISP-COMMENTS* T))
(DECLARE (SPECVARS *REMOVE-INTERLISP-COMMENTS*))
(SETQ BODYX (REMOVE-COMMENTS BODYX))
(SETQ BODYY (REMOVE-COMMENTS BODYY))))
[SETQ DATECOL (PLUS 2 (CONSTANT (NCHARS "Comparing"))
(IMAX (NCHARS FILEX)
(NCHARS FILEY]
@@ -629,7 +634,8 @@ Copyright (c) 1985-1988, 2018, 2020-2021 by Xerox Corporation.
(DEFINEQ
(CSBROWSER
[LAMBDA (FILEX FILEY DW? LABEL1 LABEL2 REGION)
[LAMBDA (FILEX FILEY DW? LABEL1 LABEL2 REGION IGNORECOMMENTS)
(* ; "Edited 12-May-2022 10:16 by rmk")
(* ;; "Edited 24-Jan-2022 23:11 by rmk: EXAMINE is non-NIL, we run the compare twice. Once to get the TEDIT up as a kind of table of contents, and the second time to run through all of the SEDIT windows.")
@@ -640,12 +646,12 @@ Copyright (c) 1985-1988, 2018, 2020-2021 by Xerox Corporation.
(* ;; "Don't use the INFILEP value, because that might screw with capitalization that the caller prefers. If the file can be found that way, then lower functions will find it.")
(DECLARE (SPECVARS LABEL1 LABEL2))
(OR (INFILEP FILEX)
(SETQ FILEX (FINDFILE FILEX NIL DIRECTORIES))
(ERROR "FILE NOT FOUND" FILEX))
(OR (INFILEP FILEY)
(SETQ FILEY (FINDFILE FILEY NIL DIRECTORIES))
(ERROR "FILE NOT FOUND" FILEY))
(SETQ FILEX (OR (INFILEP FILEX)
(FINDFILE FILEX NIL DIRECTORIES)
(ERROR "FILE NOT FOUND" FILEX)))
(SETQ FILEY (OR (INFILEP FILEY)
(FINDFILE FILEY NIL DIRECTORIES)
(ERROR "FILE NOT FOUND" FILEY)))
(CL:UNLESS (LISPSOURCEFILEP FILEX)
(ERROR FILEX " is not a Medley source file"))
(CL:UNLESS (LISPSOURCEFILEP FILEY)
@@ -661,12 +667,12 @@ Copyright (c) 1985-1988, 2018, 2020-2021 by Xerox Corporation.
(GETPROMPTWINDOW WINDOW T)
(WINDOWPROP WINDOW 'UNDERSCONTRUCTION NIL)
(COMPARESOURCES FILEX FILEY '(T 2WINDOWS)
DW? WINDOW)
DW? WINDOW IGNORECOMMENTS)
(OPENW WINDOW)
WINDOW))
(TEDIT (LET ((TSTREAM (OPENTEXTSTREAM)))
(DSPFONT DEFAULTFONT TSTREAM)
(COMPARESOURCES FILEX FILEY EXAMINE DW? TSTREAM)
(COMPARESOURCES FILEX FILEY EXAMINE DW? TSTREAM IGNORECOMMENTS)
[TEDIT TSTREAM REGION NIL `(READONLY T WINDOWTYPE COMPARESOURCES-TEDIT TITLE
,TITLE]
(CL:WHEN NIL
@@ -693,16 +699,16 @@ Copyright (c) 1985-1988, 2018, 2020-2021 by Xerox Corporation.
)
(PUTPROPS COMPARESOURCES COPYRIGHT ("Xerox Corporation" 1985 1986 1987 1988 2018 2020 2021))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1970 26690 (COMPARESOURCES 1980 . 8026) (\CS.COMPARE.MASTERS 8028 . 15440) (
\CS.COMPARE.TYPES 15442 . 18708) (\CS.EXAMINE 18710 . 22937) (\CS.FIXFNS 22939 . 24441) (
\CS.SORT.DECLARES 24443 . 24786) (\CS.SORT.DECLARE1 24788 . 26208) (\CS.FILTER.GARBAGE 26210 . 26688))
(26691 31227 (\CS.ISFNFORM 26701 . 26969) (\CS.COMPARE.FNS 26971 . 27213) (\CS.FNSID 27215 . 27359) (
\CS.ISVARFORM 27361 . 27466) (\CS.COMPARE.VARS 27468 . 28130) (\CS.ISMACROFORM 28132 . 28270) (
\CS.ISRECFORM 28272 . 28600) (\CS.REC.NAME 28602 . 28921) (\CS.ISCOURIERFORM 28923 . 29023) (
\CS.ISTEMPLATEFORM 29025 . 29123) (\CS.COMPARE.TEMPLATES 29125 . 29490) (\CS.ISPROPFORM 29492 . 29647)
(\CS.PROP.NAME 29649 . 29794) (\CS.COMPARE.PROPS 29796 . 29953) (\CS.ISADDVARFORM 29955 . 30048) (
\CS.COMPARE.ADDVARS 30050 . 30215) (\CS.ISFPKGCOMFORM 30217 . 30424) (\CS.COMPARE.FPKGCOMS 30426 .
30633) (\CS.COMPARE.DEFINE-FILE-INFO 30635 . 31225)) (31228 37292 (CSOBJ.CREATE 31238 . 31651) (
CSOBJ.DISPLAYFN 31653 . 32406) (CSOBJ.IMAGEBOXFN 32408 . 34569) (CSOBJ.BUTTONEVENTINFN 34571 . 37042)
(CSOBJ.COPYBUTTONEVENTINFN 37044 . 37290)) (38173 40877 (CSBROWSER 38183 . 40875)))))
(FILEMAP (NIL (1852 26954 (COMPARESOURCES 1862 . 8290) (\CS.COMPARE.MASTERS 8292 . 15704) (
\CS.COMPARE.TYPES 15706 . 18972) (\CS.EXAMINE 18974 . 23201) (\CS.FIXFNS 23203 . 24705) (
\CS.SORT.DECLARES 24707 . 25050) (\CS.SORT.DECLARE1 25052 . 26472) (\CS.FILTER.GARBAGE 26474 . 26952))
(26955 31491 (\CS.ISFNFORM 26965 . 27233) (\CS.COMPARE.FNS 27235 . 27477) (\CS.FNSID 27479 . 27623) (
\CS.ISVARFORM 27625 . 27730) (\CS.COMPARE.VARS 27732 . 28394) (\CS.ISMACROFORM 28396 . 28534) (
\CS.ISRECFORM 28536 . 28864) (\CS.REC.NAME 28866 . 29185) (\CS.ISCOURIERFORM 29187 . 29287) (
\CS.ISTEMPLATEFORM 29289 . 29387) (\CS.COMPARE.TEMPLATES 29389 . 29754) (\CS.ISPROPFORM 29756 . 29911)
(\CS.PROP.NAME 29913 . 30058) (\CS.COMPARE.PROPS 30060 . 30217) (\CS.ISADDVARFORM 30219 . 30312) (
\CS.COMPARE.ADDVARS 30314 . 30479) (\CS.ISFPKGCOMFORM 30481 . 30688) (\CS.COMPARE.FPKGCOMS 30690 .
30897) (\CS.COMPARE.DEFINE-FILE-INFO 30899 . 31489)) (31492 37556 (CSOBJ.CREATE 31502 . 31915) (
CSOBJ.DISPLAYFN 31917 . 32670) (CSOBJ.IMAGEBOXFN 32672 . 34833) (CSOBJ.BUTTONEVENTINFN 34835 . 37306)
(CSOBJ.COPYBUTTONEVENTINFN 37308 . 37554)) (38437 41343 (CSBROWSER 38447 . 41341)))))
STOP

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -3,50 +3,90 @@ Medley GITFNS2
4
1
GITFNS
1
4
By Ron Kaplan
This document was created in January 2022.
4
By Ron Kaplan
This document was last edited in May 2022.
GITFNS provides a Medley-oriented interface for comparing the files in two different branches of a git repository. This makes it easier to understand what functions or other definitions have changed in a Lisp source file, or what text has changed in a Tedit file. This may be particularly helpful in evaluating the changes in a pull request.
Separately, GITFNS also provides tools and conventions for bridging between git's file-oriented style of development and version control and Medley's residential development style with its own version control conventions. GITFNS allows for intelligent comparisons between Lisp source files,Tedit files, and text files in a local git clone and a local Medley-style working directory, and for migrating files to and from the git clone and the working directory.
Git projects: Connecting git clones to GITFNS capabilities
The GITFNS capabilities operate on pre-existing clones of remote git repositories that have been installed at the end of some path on the local disk. The path to a clone can be used to create a "git project" for that clone:
(GIT-MAKE-PROJECT PROJECTNAME PROJECTPATH WORKINGPATH EXCLUSIONS
DEFAULTSUBDIRS) [function]
where
PROJECTNAME is the name of the project (e.g. MEDLEY, NOTECARDS, LOOPS...)
PROJECTPATH is the local path to the clone
(e.g. {dsk}<users>...>git-medley)
WORKINGPATH is optionally the local path to a corresponding Medley-residential working directory (e.g. {dsk}<users>...>my-medley>)
When the project has a WORKINGPATH:
EXCLUSIONS is a list of files and directories to be excluded from comparisons (beyond what its .GITIGNORE specifies)
DEFAULTSUBDIRS is a list of subdirectories to be use in working-path comparisons when directories are not otherwise specified.
For convenience, if PROJECTPATH is NIL or T (and not a path), then a squence of probes based on PROJECTNAME attempts to find a clone directory (with a .git subdirectory):
(UNIX-GETENV PROJECTNAME)
(UNIX-GETENV (CONCAT PROJECTNAME 'DIR)
(CONCAT MEDLEYDIR "../git-" PROJECTNAME)
(a sister of MEDLEYDIR named git-PROJECTNAME, e.g. git-notecards)
Thus:
If MEDLEYDIR is defined,
(GIT-MAKE-PROJECT 'MEDLEY) will make the MEDLEY project
If NOTECARDS is defined
(GIT-MAKE-PROJECT 'NOTECARDS) will make the NOTECARDS project
If NOTECARDS is not defined but the clone >git-notecards> is a sister of MEDLEYDIR, then the NOTECARDS project will still be created.
If a clone is discovered and a project is created, the value of GIT-MAKE-PROJECT is PROJECTNAME. Otherwise, NIL will be returned if PROJECTPATH is T, and PROJECTPATH=NIL will result in an error.
When GITFNS is loaded, GIT-MAKE-PROJECT is called for MEDLEY, NOTECARDS, and LOOPS, with PROJECTPATH=T. Thus, those projects will be created automatically, if MEDLEYDIR is defined and the relevant directories exist in their expected relative positions.
When they are created, GIT-PROJECTS are registered by name on the a-list GIT-PROJECTS, and they are otherwise referenced by their names.
The variable GIT-DEFAULT-PROJECT, initially MEDLEY, contains the project name used by the commands below when the optional projectname argument is not provided.
GIT-MAKE-PROJECT also creates a pseudohost {Gprojectname} whose path prefix is the prefix for the project's clone. If WORKINGPATH is provided, then a second pseudohost {Wprojectname} points to the working files for the project.
GITFNS also defines two directory-connecting commands for conveniently connecting to the git and working pseudohosts of a project:
cdg (projectname) (subdir) [command]
cdw (projectname) (subdir) [command
For example, cdg notecards library connects to {GNOTECARDS}/library/.
Comparing directories and files in different git branches
In its simplest application, GITFNS is just an off-to-the-side add-on to whatever work practices the user has developed with respect to a locally installed git project. Its only advantage is to allow for more interpretable git-branch comparisons, especially for pull-request approval. These comparisons are provided by the prc ("pull request compare") Medley executive command:
prc (branch) (DRAFT) (projectname) [command]
The main use-case is the Lisp-oriented file comparisons for pull-request approval. These comparisons are provided by the prc ("pull request compare") Medley executive command:
This compares the files in branch against the files in the main branch of the project (origin/master or origin/main). Thus, suppose that a pull request has been issued on github for a particular branch, say branch rmk15 of the default project. Then
prc rmk15
brings up a lispusers/COMPAREDIRECTORIES browser for the files that currently differ between origin/rmk15 and origin/master. If the selected files are Lisp source files, the Compare item on the file browser menu will show the differences in a lispusers/COMPARESOURCES browser. The differences for other file types will be shown in a lispusers/COMPARETEXT browser.
prc rmk15
If branch is not specified and the shell command gh is available, then a menu of open pull-request branches will be provided. If gh is not available, the menu will offer all known branches. If the optional DRAFT is provided, then the menu will include draft PR's as well as open ones.
If one PR, say rmk15, contains all the commits of another (rmk14), then the menu will indicate this by
rmk15 > rmk14
Note that the comparison that this provides is essentially read-only: any comments, approvals, or merges of the branch must be specified using the normal Medley-external git interfaces and commands.
Note that the prc comparison is read-only: any comments, approvals, or merges of the branch must be specified using the normal Medley-external git interfaces and commands.
prc is the special case of the more general bbc command ("branch-branch compare) for comparing the files in any two branches:
bbc branch1 branch2 (project) [command]
This compares the files in branch1 and branch2, for example
bbc rmk15 lmm12 (local)
bbc rmk15 lmm12 (local)
This will compare the files in origin/rmk15 and origin/lmm12 in the GIT-DEFAULT project. branch1 defaults to the origin files of the currently checked out branch, the second defaults to origin/master. If local is non-NIL, then a branch that has neither local/ or origin/ prepended will default to local (e.g. local/rmk15) instead of origin/. Local refers to the files that are currently in the clone directory, which may not be the same as the origin files, depending on the push/pull status.
The command cob ("check out branch") checks out a specified branch:
cob branch [command]
This checks out branch and then executes git pull. The branch parameter may also be a local branch, T (= my current branch), or NEW/NEXT (= my next branch). My current branch is a the branch named <initials>nnn, e.g. rmk15. The initials are the value of INITIALS as used for SEDIT time stamps, and nnn is the largest of the integers of all of the branches beginning with those initials. If branch is NEW or NEXT, then a new initialed branch is created and becomes the user's current branch. Its number is one greater than the largest number of previous initialed branches.
If branch is not provided, a menu of locally available branches pops up.
The currently checked out branch is obtained by the b? command:
b? [command]
The command cob ("check out branch") checks out a specified branch:
cob branch (project) [command]
This checks out branch of project and then executes git pull. The branch parameter may also be a local branch, T (= my current branch), or NEW/NEXT (= my next branch). My current branch is a the branch named <initials>nnn, e.g. rmk15. The initials are the value of INITIALS as used for SEDIT time stamps, and nnn is the largest of the integers of all of the branches beginning with those initials. If branch is NEW or NEXT, then a new initialed branch is created and becomes the user's current branch. Its number is one greater than the largest number of previous initialed branches.
If branch is not provided, a menu of locally available branches pops up.
The currently checked out branch is obtained by the b? command:
b? (project) [command]
Correlating git source control with separate Medley development
It is generally unsafe to do Medley development by operating with files in a local clone repository. Medley provides a residential development environment that integrates tightly with the local file system. It is important to have consistent access to the source files of the currently running system, especially for files whose contents have been only partially loaded. A git pull or a branch switch that introduces new versions of some files or removes old files altogether can lead to unpredictable disconnects that are hard to recover from. This is true also because development can go on in the same Medley memory image for days if not weeks, so it is important to have explicit control of any file version changes.
GITFNS mitigates the danger by conventions that separate the files in the git clone from the files in the working Medley development directory. The location of the Medley development source tree for a project is given by the WORKINGPATH argument to GIT-MAKE-PROJECT. If WORKINGPATH is T or NIL and there exists a directory >MY-projectname> as a sister to the clone, then that is taken to be the WORKINGPATH and thus the prefix for a pseudohost {Wprojectname}.
It is generally unsafe to do Medley development by operating with files in the local clone repository. Medley provides a residential development environment that integrates tightly with the local file system. It is important to have consistent access to the source files of the currently running system, especially for files whose contents have been only partially loaded. A git pull or a branch switch that introduces new versions of some files or removes old files altogether can lead to unpredictable disconnects that are hard to recover from. This is true also because development can go on in the same Medley memory image for days if not weeks, so it is important to have explicit control of any file version changes.
When Medley development is carried out in the WORKINGPATH, the variable MEDLEYDIR should point initially to the working directory, and the directory search paths (DIRECTORIES, LISPUSERSDIRECTORIES, FONTDIRECTORIES, etc.) all have MEDLEYDIR as a prefix. In that case, the clone for the project, if PROJECTPATH doesn't specify it explicitly, should be located at the >git-medley> sister directory of MEDLEYDIR.
Any back and forth transfer of information between the git clone and Medley development must be done by explicit synchronization actions. Crucially, Medley-updated files do not appear in the clone directories and new clone files do not move to the Medley directories without user intervention.
The files in Medley working tree and the git clone of a project can be compared with the gmc ("git-my-compare") command:
gmc subdirectories (project) [command]
gmc subdirectories [command]
This produces a browser for all the files in the corresponding Medley subdirectories that differ from the files in the currently checked out branch of the git clone. If subdirectories is omitted, it defaults to sources library lispusers. If it is ALL, then files in all My Medley subdirectories are examined.
In addition to the commands for comparing and viewing files, the menu for this browser also has commands for copying files from the git clone {GIT} to My Medley and deleting files from {MM}. If the master branch is current, then the menu has no commands to change the files in the clone. The browser will show those files that have been updated from a recent merge, and they can individually be copied to new My Medley versions in order to realign the two source trees. If the comparison is with a different branch, say the user's current staging branch, copying files from My Medley to git or deleting git files will set git up for future commits.
Note that the menu item for deleting My Medley files will cause all version to be removed, not just the latest one, to avoid the possibility that an earlier one is revealed. Deletion for My Medley files is also accomplished by renaming to a {MM}<deletion> subdirectory so that they can be recovered if a deletion is in error. Files in the git-clone are removed from the file system immediately, since git provides its own recovery mechanism for those files.
GITFNS does not (yet?) include functions for commits, pushes, or merges for updating the remote repository. Those have to be done outside of Medley through the usual github interfaces, as guided by the information provided by the comparisons.
(LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))4È È4ÈÈ.È.ŠŠ8.ŠŠ8JÈÈ PAGEHEADING RUNNINGHEADMODERN
This produces a browser for all the files in the corresponding WORKINGPATH subdirectories that differ from the files in the currently checked out branch of the git clone. If subdirectories is omitted, it defaults to the DEFAULTSUBDIRS or the project. If it is ALL, then files in all subdirectoriesthat are not found in the project's EXCLUSIONS are compared.
In addition to the commands for comparing and viewing files, the menu for this browser also has commands for copying files from the git clone {Gprojectname} to {Wprojectname} and deleting files from {Wprojectname}.
If master/main branch is the current branch then the menu has no commands to change the clone directory. The browser will show those files that have been updated from a recent merge, and they can individually be copied from the git branch to realign the two source trees with incremented Medley version numbers. If the comparison is with a different branch, say the user's current staging branch, copying files from the working Medley to to the git clone or deleting git files will set git up for future commits.
Note that the menu item for deleting Medley files will cause all version to be removed, not just the latest one, to avoid the possibility that an earlier one is revealed. Deletion for Medley files is also accomplished by renaming to a {Wprojectname}<deletion> subdirectory so that they can be recovered if a deletion is in error. Files in the git-clone are removed from the file system immediately, since git provides its own recovery mechanism for those files.
GITFNS does not (yet?) include functions for commits, pushes, or merges for updating the remote repository. Those have to be done outside of Medley through the usual github interfaces, as guided by the information provided by the comparisons.
(LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))
.È4 ÈÈ4 ÈÈ4ÈÈ4ÈÈ4ÈÈ4ÈÈ4È È4ÈÈ.È.ŠŠ8.ŠŠ8JÈÈ PAGEHEADING RUNNINGHEADMODERN
TIMESROMAN$TERMINALMODERN

Binary file not shown.