c8f3ef912f63007961da179e06f2d6d96ea4cf34 braney Thu Oct 1 08:31:35 2026 -0700 docent rm38456: name the share checkbox's shadow variable in full, refs #38456 diff --git src/hg/utils/docent/tests/regress/rm38456.docent.yaml src/hg/utils/docent/tests/regress/rm38456.docent.yaml index 3d0aec0b1a7..b6432ed1593 100644 --- src/hg/utils/docent/tests/regress/rm38456.docent.yaml +++ src/hg/utils/docent/tests/regress/rm38456.docent.yaml @@ -1,29 +1,29 @@ # #38456 -- a request to hgSession's classic Save action (hgS_doNewSession) that left out one # of the Save form's inputs stopped with a stack dump. doNewSession() read the session name # with cartString() and the share flag with cartBoolean(), and both abort when the variable is # missing: # hashMustFindVal: 'hgS_newSessionShare' not found # hashMustFindVal: 'hgS_newSessionName' not found # The Save form always sends both, so only a hand-made request reached it. outDefaultTracks() # also read db with cartString(), and a brand-new cart has no db. # # The fix reads the name and db with defaults. For the share flag it asks the REQUEST, not the # cart: the cart keeps hgS_newSessionShare on purpose (cleanHgSessionFromCart), so it is still # there long after the form that set it. When the request carries neither the flag nor the -# checkbox's boolshad. shadow, an existing session keeps its own sharing level and a new one -# is saved private. +# checkbox's shadow, boolshad.hgS_newSessionShare, an existing session keeps its own sharing +# level and a new one is saved private. # # Three checks, in this order: # 1. Fresh cart, no share flag: the original stack dump. The fixed build adds the session # and says it "may not be shared". # 2. The cart now holds hgS_newSessionShare=on, set by a plain page load, and the request # still has no flag. The session is private, so the overwrite must say "may not be # shared". An early version of the fix tested cartVarExists() and failed here: it read # the stored "on" and made the private session shared by link. # 3. No name at all: the fixed build gives its own "without a name" message. # Step 1 needs a cart that has never held hgS_newSessionShare. reset: true gives a fresh # browser, and nothing before step 1 visits the classic Save form. # # No hg.conf gate. It saves under the docentTest account of whichever central the target # reads, so it needs a [section] for that central in ~/.docentLogin. The session is deleted # at the start, in case an earlier run died before its own cleanup, and again at the end.