Rmk40 shakedown gitfns projects (#774)
* GITFNS: smoothed out some project glitches Also added "titlestring" to cob command when creating a new branch. cob next "fixed a bug" will create the next branch for the current initials with the title string appended. * MACHINEINDEPENDENT: DOFILESLOAD tries packing on DIRECTORY as well as DIRECTORIES
This commit is contained in:
@@ -14,7 +14,7 @@ where
|
||||
|
||||
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
|
||||
@@ -59,8 +59,9 @@ This compares the files in branch1 and branch2, for example
|
||||
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 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.
|
||||
|
||||
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)
|
||||
@@ -69,13 +70,13 @@ b? (project) [command]
|
||||
The command cob ("check out branch") checks out a specified branch:
|
||||
cob branch (titlestring) (project) [command]
|
||||
This checks out branch of project and then executes git pull. The branch parameter may also be a local branch, T (= the current working branch), or NEW/NEXT (= the next working branch). The current working branch is 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.
|
||||
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 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 titlestring is provided, then that string will be appended to the name of the branch, after the initials and next number, and two hyphens. Spaces in titlestring will also be replaced by hyphens, according to git conventions.
|
||||
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]
|
||||
|
||||
The currently checked out branch is obtained by the b? command:
|
||||
b? (project) [command]
|
||||
|
||||
Correlating git source control with separate Medley development
|
||||
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}.
|
||||
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 (or {WMEDLEY}) 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.
|
||||
@@ -85,8 +86,8 @@ TIMESROMAN | ||||