Skip to content

Conversation

rmkaplan
Copy link
Contributor

prc status is C if changes requested, prc comparison runs in its own process, initial changes for gwc to treat the clone as UNIX, not DSK, so branch-switching doesn't cause files from other branches to pile up.

prc status is C if changes requested, prc comparison runs in its own process, initial changes for gwc to treat the clone as UNIX, not DSK, so branch-switching doesn't cause files from other branches to pile up.
@pamoroso
Copy link
Contributor

On Linux Mint 22.1 Cinnamon I checked out this branch up to commit 301c4f7, ran PRC, clicked on the first line #1960 fgh_lfg-loadup of the PR menu, and got this error:

FILE-NOT-FOUND
In \OPENFILE:
File not found: {FROMGIT1}<pr>scripts>loadup-app-setup.sh;1
gitfns-error

The backtrace:

prc/7(debug)BTV
OPENSTREAM
   DIR "{FROMGIT1}<pr>"
   INCLUDEDFILES (*.* *>*.* .* *>.*)
   EXCLUDEDFILES ("EXPORTS.ALL" "RDSYS" "RDSYS.LCOM" 
"loadups/" "patches/" "tmp/" "fontsold/" "clos/" 
"cltl2/" "deleted/" --)
   ALLVERSIONS NIL
   DEPTH NIL
   USEDIRECTORYDATE NIL
   INCLUDEAUTHOR NIL
   STARTPOS 15
   FULLNAME 
"{FROMGIT1}<pr>scripts>loadup-app-setup.sh;1"
   TYPE NIL
   LDATE NIL
   STREAM NIL
COMPAREDIRECTORIES.INFOS
   DIR1 "{FROMGIT1}<master>"
   DIR2 "{FROMGIT1}<pr>"
   SELECT (> < ~= -* *-)
   INCLUDEDFILES (*.* *>*.* .* *>.*)
   EXCLUDEDFILES ("EXPORTS.ALL" "RDSYS" "RDSYS.LCOM" 
"loadups/" "patches/" "tmp/" "fontsold/" "clos/" 
"cltl2/" "deleted/" --)
   USEDIRECTORYDATE NIL
   OUTPUTFILE NIL
   ALLVERSIONS NIL
   FIXDIRECTORYDATES NIL
   SHORTDIRNAMES (master pr)
   DATE "21-Oct-2025 18:50:08"
   INFOS1 NIL
   INFOS2 NIL
   CDENTRIES NIL
   DEPTH1 NIL
   DEPTH2 NIL
   CDVALUE NIL
COMPAREDIRECTORIES
   BRANCH1 origin/master
   BRANCH2 "origin/fgh¬lfg-loadup"
   LOCAL NIL
   PROJECT (GIT-PROJECT MEDLEY {MEDLEY} NIL (
"EXPORTS.ALL" "RDSYS" "RDSYS.LCOM" "loadups/" "patches/"
 "tmp/" "fontsold/" "clos/" "cltl2/" --) (greetfiles 
scripts sources library lispusers internal doctools 
rooms) "{UNIX}/home/paolo/medley/medley" origin/master)
   SHORT1 "origin/master"
   SHORT2 "origin/fgh¬lfg-loadup"
   CDVALUE NIL
   DIRS ("{FROMGIT1}<master>" "{FROMGIT1}<pr>" NIL)
   NENTRIES NIL
   MAPPINGS NIL
GIT-BRANCHES-COMPARE-DIRECTORIES
   RB "origin/fgh¬lfg-loadup"
   PROJECT MEDLEY
GIT-PR-COMPARE
   *FORM* (GIT-PR-COMPARE "origin/fgh¬lfg-loadup" (QUOTE
 MEDLEY))
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* GIT-PR-COMPARE
\EVALFORM
   %#FORM# (GIT-PR-COMPARE "origin/fgh¬lfg-loadup" (
QUOTE MEDLEY))
   *CURRENT-PROCESS* #<Process prc/173,116000>
   HELPFLAG BREAK!
   \CURRENTDISPLAYLINE 8
   \#DISPLAYLINES 13
   \LINEBUF.OFD #<IO Linebuffer Stream/127,5700>
   *READTABLE* #<ReadTable INTERLISP/173,152714>
   \PRIMTERMTABLE {TERMTABLEP}#173,145740
   \PRIMTERMSA {CHARTABLE}#173,146000
   TtyDisplayStream #<Output Display Stream/173,47700>
   SI::*RESETFORMS* NIL
   \INTERRUPTABLE T
   \TTYWINDOW {WINDOW}#120,101570
   READBUF NIL
   \TERM.OFD #<Output Display Stream/145,125500>
   *STANDARD-OUTPUT* #<Output Display Stream/145,125500>
   *STANDARD-INPUT* #<IO Linebuffer Stream/127,5700>
\MAKE.PROCESS0
T

The loadup* files in the Medley scripts directory:

paolo@lispmachine:~/medley/medley$ ls scripts/loadup*
scripts/loadup         scripts/loadup-db.sh
scripts/loadup-all.sh  scripts/loadup-full.sh

scripts/loadups:
loadup                    loadup-db.sh              loadup-mid-from-init.sh
loadup-all.sh             loadup-full-from-lisp.sh  loadup-setup.sh
loadup-apps-from-full.sh  loadup-full.sh            obsolete
loadup-aux.sh             loadup-init.sh            thin_loadups.sh
loadup-db-from-full.sh    loadup-lisp-from-mid.sh

I use the apps sysout and I'm on nhb-rewrite-version-parser-v2/60e12da of Maiko.

@nbriggs
Copy link
Contributor

nbriggs commented Oct 21, 2025

I notice that the branch it's working with is BRANCH2 "origin/fgh¬lfg-loadup", though the actual name is fgh_lfg-loadup -- notice the underscore (0x5F) vs logical not (0xC2AC). I'm guessing that the MCCS translations are somehow involved (unexpectedly missing, or unexpectedly present)

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Oct 21, 2025 via email

@rmkaplan
Copy link
Contributor Author

The low-level function is issuing a git command to retrieve the contents of a particular file, which it then stores in a local tmp/ file. It is called first to obtain the file from master, then to obtain the corresponding file from the pr. For this particular pr, PROCESS-COMMAND gets an error code 128 when it tries to retrieve the master but it gets a code 0 when it asks for the version of the file in the pr. Here are the actual (MCCS) command strings given to PROCESS-COMMAND:

For the master file (fails):
"cd /Users/kaplan/Local/medley3.5/git-medley/ && git show %"origin/master:scripts/loadup-app-setup.sh%" > /tmp/medley-1791044136-55954-result 2> /tmp/medley-1791044136-55954-error"

For the pr file (succeeds):
"cd /Users/kaplan/Local/medley3.5/git-medley/ && git show %"origin/fgh_lfg-loadup:scripts/loadup-app-setup.sh%" > /tmp/medley-1791044219-36169-result 2> /tmp/medley-1791044219-36169-error"

Note the (MCCS) underscore (0,255) in the string passed to PROCESS-COMMAND for the pr but not for the master, so you would think that that one might fail. But streams on the SHELL-DEVICE default to :UTF-8, and that appears to be working as expected--it does seem to find the file.

I don't understand why the master command fails just for this pr. Any ideas?

@rmkaplan
Copy link
Contributor Author

I inserted the offending command in a terminal window, and finally got a helpful error message: the path scripts/loadup-app-setup.sh does not exist. So it the problem is probably at a higher level, where it is interpreting the ADD return from the difference function, not at the bottom character level. Another mystery: how did it ever work?

@nbriggs
Copy link
Contributor

nbriggs commented Oct 21, 2025

That's a new file, it doesn't exist in master, so git is saying (try it in a Terminal in the medley directory)

 % git show origin/master:scripts/loadup-app-setup.sh 
fatal: path 'scripts/loadup-app-setup.sh' does not exist in 'origin/master'

and if we just look at what changed between the two branches --

briggs@macrobiotic medley % git whatchanged origin/master..origin/fgh_lfg-loadup 
commit d91176bc908b851289abdde0f768d4a297372ef1 (origin/fgh_lfg-loadup)
Author: Frank Halasz <[email protected]>
Date:   Mon Jan 6 23:59:20 2025 -0800

    Minor fixes to loadup-lfg and related scripts as result of debugging.

:100644 100644 fde59bf6 76c574d9 M      scripts/loadup-app-setup.sh
:100755 100755 a0d84bbc 590a9dab M      scripts/loadup-lfg.sh

commit a55246bc5937d93e8f843ac6ea1d3926f792c9ae
Author: Frank Halasz <[email protected]>
Date:   Mon Jan 6 22:49:21 2025 -0800

    Create loadup-lfg.sh script and helper script loadup-app-setup.sh.  The former is intended to be installed in the LFG directory (in the scripts subfolder).  The later is to remain in the medley scripts direcory.

:000000 100644 00000000 fde59bf6 A      scripts/loadup-app-setup.sh
:000000 100755 00000000 a0d84bbc A      scripts/loadup-lfg.sh

So in one commit he added the files, then in the second commit he modified them. Did GITFNS get confused by the modification vs addition?

@rmkaplan
Copy link
Contributor Author

This is what comes back from the call to GIT-BRANCH-DIFF in GIT-GET-DIFFERENT-FILES:
((ADDED scripts/loadup-app-setup.sh) (COPIED scripts/loadup-apps-from-full.sh 64))

This is based on the result of the ind-copies-harder command, which returns a file with lines
"A scripts/loadup-app-setup.sh"
"C064 scripts/loadup-apps-from-full.sh scripts/loadup-lfg.sh"

So I don't see any residue of the modify commit.

So suppose that it is correct that the modify is not relevant and the Add is the only thing it should pay attention to. Then what may be special about this particular pr is that the app-setup file exists only in that pr subdirectory and not in the master (because it was added). Since this pr has no other files in that subdirectory, the later attempt at enumeration sees a nonexistent directory and fails.

@nbriggs
Copy link
Contributor

nbriggs commented Oct 21, 2025

Something is being too smart --

"C064 scripts/loadup-apps-from-full.sh scripts/loadup-lfg.sh"

If you copy a file to a different name, the target name may well be a new file. I don't know that it's guaranteed to be new (it could be being replaced, I suppose) but... in this case it IS a new file based on a old file.

@rmkaplan
Copy link
Contributor Author

On reflection, the most obvious approach would be for GITFNS to treat git-copy as a git-add of the target file. The comparison won't tell you where the new file came from (presumably git transfers the history on a copy?), but that's not relevant for the compare. The merge would do whatever it would do wrt history.

That now behaves well in my working directory, and I can commit an updated GITFNS. But I think that, because of the underscore, it won't work for Frank's old pr until the MCCS filename pr gets approved and merged.

@rmkaplan
Copy link
Contributor Author

I committed the updated GITFNS and related updated COMPAREDIRECTORIES. prc should work for all PR's except for the #1960 (with the underscore). That will work when #2320 is merged.

@pamoroso
Copy link
Contributor

I updated to commit bde0b3d and PRC works fine except for PR #1960 as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants