Skip to content

Commit 297cc6c

Browse files
authored
Update port-prod.xml
1 parent 87f3ddd commit 297cc6c

File tree

1 file changed

+43
-230
lines changed

1 file changed

+43
-230
lines changed

port-prod.xml

Lines changed: 43 additions & 230 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ Defaults to "UTF8".</Description>
248248
<ClassMethod>1</ClassMethod>
249249
<FormalSpec>extension:%String</FormalSpec>
250250
<ReturnType>%String</ReturnType>
251-
<Implementation><![CDATA[ return $get(^Port.Configuration("source.charset.internal", $$$ucase(extension)), "UTF8")
251+
<Implementation><![CDATA[ return $get(^Port.Configuration("source.charset.internal", $$$ucase(extension)), "UTF8")
252252
]]></Implementation>
253253
</Method>
254254

@@ -259,7 +259,7 @@ Defaults to "UTF8".</Description>
259259
<ClassMethod>1</ClassMethod>
260260
<FormalSpec>extension:%String</FormalSpec>
261261
<ReturnType>%String</ReturnType>
262-
<Implementation><![CDATA[ return $get(^Port.Configuration("source.charset.external", $$$ucase(extension)), "UTF8")
262+
<Implementation><![CDATA[ return $get(^Port.Configuration("source.charset.external", $$$ucase(extension)), "UTF8")
263263
]]></Implementation>
264264
</Method>
265265

@@ -270,8 +270,8 @@ Set the character set to be used when saving a document to Caché with the provi
270270
<FormalSpec>extension:%String,charset:%String</FormalSpec>
271271
<ReturnType>%Status</ReturnType>
272272
<Implementation><![CDATA[
273-
set ^Port.Configuration("source.charset.internal", $$$ucase(extension)) = charset
274-
return $$$OK
273+
set ^Port.Configuration("source.charset.internal", $$$ucase(extension)) = charset
274+
return $$$OK
275275
]]></Implementation>
276276
</Method>
277277

@@ -282,8 +282,8 @@ Set the character set to be used when retrieving a document from Caché with the
282282
<FormalSpec>extension:%String,charset:%String</FormalSpec>
283283
<ReturnType>%Status</ReturnType>
284284
<Implementation><![CDATA[
285-
set ^Port.Configuration("source.charset.external", $$$ucase(extension)) = charset
286-
return $$$OK
285+
set ^Port.Configuration("source.charset.external", $$$ucase(extension)) = charset
286+
return $$$OK
287287
]]></Implementation>
288288
</Method>
289289

@@ -342,6 +342,28 @@ Returns the selected test format. It can be "UDL" or "XML".</Description>
342342
return translatedPath
343343
]]></Implementation>
344344
</Method>
345+
346+
<Method name="AllowEmptyFileName">
347+
<Description>
348+
Enable or disable enqueing files that follow the format ".name". When disabled
349+
Port will ignore these files altogether. Useful if you don't want to import directories
350+
that there supposed to be internal or hidden.</Description>
351+
<ClassMethod>1</ClassMethod>
352+
<FormalSpec>value:%Integer</FormalSpec>
353+
<Implementation><![CDATA[
354+
if '$lf($lb(0,1), value) quit
355+
set ^Port.Configuration("files.allowEmptyName") = value
356+
]]></Implementation>
357+
</Method>
358+
359+
<Method name="IsAllowEmptyFileNameEnabled">
360+
<Description>
361+
Returns if Port is allowed to enqueue files on which the name follows the format ".name".</Description>
362+
<ClassMethod>1</ClassMethod>
363+
<ReturnType>%Boolean</ReturnType>
364+
<Implementation><![CDATA[ return $get(^Port.Configuration("files.allowEmptyName"), 0)
365+
]]></Implementation>
366+
</Method>
345367
</Class>
346368

347369

@@ -919,15 +941,6 @@ Returns the selected test format. It can be "UDL" or "XML".</Description>
919941
</Class>
920942

921943

922-
<Routine name="Port" type="MAC" languagemode="0"><![CDATA[
923-
Install
924-
do ##class(Port.Installer).Install()
925-
quit
926-
927-
Wizard
928-
do ##class(Port.Wizard).Start()
929-
quit
930-
]]></Routine>
931944

932945

933946
<Class name="Port.Project.Backup">
@@ -1851,15 +1864,15 @@ Export a class to the workspace's 'cls' folder. Each class package is treated li
18511864
<Implementation><![CDATA[
18521865
18531866
set fileName = ##class(%File).GetFilename(origin)
1854-
set emptyName = ($piece(fileName, ".") = "")
1867+
set allowEmptyName = ##class(Port.Configuration).IsAllowEmptyFileNameEnabled() && ($piece(fileName, ".") = "")
18551868
set pathType = ##class(Port.Util).GetPathType(origin)
18561869
18571870
set isOutdated = 1
18581871
set itemName = ##class(Port.Util).PathToItem(origin)
18591872
set itemType = ##class(Port.Util).GetItemType(itemName)
18601873
set priority = ..GetTypePriority(itemType)
18611874
1862-
if emptyName || (pathType '= itemType && (pathType '= "PUBLIC")) {
1875+
if allowEmptyName || (pathType '= itemType && (pathType '= "PUBLIC")) {
18631876
set itemName = ""
18641877
set itemType = ""
18651878
set priority = -1
@@ -2050,10 +2063,10 @@ Export a class to the workspace's 'cls' folder. Each class package is treated li
20502063
<ReturnType>%Status</ReturnType>
20512064
<Implementation><![CDATA[
20522065
set extension = $$$ucase($piece(origin, ".", *))
2053-
set itt = ##class(Port.Configuration).GetInternalCharset(extension)
2054-
set ett = ##class(Port.Configuration).GetExternalCharset(extension)
2066+
set itt = ##class(Port.Configuration).GetInternalCharset(extension)
2067+
set ett = ##class(Port.Configuration).GetExternalCharset(extension)
20552068
2056-
if (itemType = "CLS") {
2069+
if (itemType = "CLS") {
20572070
set fs = ##class(%Stream.FileCharacter).%New()
20582071
set fs.TranslateTable = ett
20592072
$$$QuitOnError(fs.LinkToFile(origin))
@@ -2083,20 +2096,20 @@ Export a class to the workspace's 'cls' folder. Each class package is treated li
20832096
20842097
/// We can't use any translation table when importing a binary, so we do a bit-to-bit copy.
20852098
if bin {
2086-
set localSource = ""
2087-
set code = ""
2088-
$$$QuitOnError(##class(%File).CopyFile(origin, destination))
2089-
quit $$$OK
2099+
set localSource = ""
2100+
set code = ""
2101+
$$$QuitOnError(##class(%File).CopyFile(origin, destination))
2102+
quit $$$OK
20902103
}
20912104
} else {
2092-
set routine = ##class(%RoutineMgr).%New(itemName)
2093-
set code = routine.Code
2094-
do code.Clear()
2105+
set routine = ##class(%RoutineMgr).%New(itemName)
2106+
set code = routine.Code
2107+
do code.Clear()
20952108
}
20962109
20972110
$$$QuitOnError(code.CopyFrom(localSource))
2098-
$$$QuitOnError(code.%Save())
2099-
set routine = ""
2111+
$$$QuitOnError(code.%Save())
2112+
set routine = ""
21002113
}
21012114
quit $$$OK
21022115
]]></Implementation>
@@ -3634,7 +3647,7 @@ Returns if the className is a qualified test case class.</Description>
36343647
set baseTestPath = $$$RTrimProvidedSlash(baseTestPath, "/")
36353648
36363649
if isUsingUDL set baseTestPath = ""
3637-
return baseTestPath_"/cls/"_$piece($replace(testableClass, ".", "/"), "/", 1, *-1)_":"_testableClass
3650+
return baseTestPath_$piece($replace(testableClass, ".", "/"), "/", 1, *-1)_":"_testableClass
36383651
]]></Implementation>
36393652
</Method>
36403653
</Class>
@@ -4457,204 +4470,4 @@ Menu
44574470
]]></Implementation>
44584471
</Method>
44594472
</Class>
4460-
4461-
4462-
<Routine name="portmd" type="INC"><![CDATA[
4463-
#define PCWGoBackChoice -7999
4464-
#define PCWPathNew -7985
4465-
#define PCWPathCurrent -7984
4466-
#define PCWPathDefault -7983
4467-
#define PCWPathOSSchemes -7982
4468-
#define PCWPathAbsolute -7981
4469-
#define PCWPathRelative -7980
4470-
#define PCWPlaceholdersInstallDir -7974
4471-
#define PCWPlaceholdersUsername -7973
4472-
#define PCWPlaceholdersNamespace -7972
4473-
#define PCWPlaceholdersProject -7971
4474-
#define PCWPlaceholdersAnnounce -7970
4475-
#define PCWExit -7600
4476-
#define PCWSetLogLevelStatusChoice2 -7420
4477-
#define PCWSetLogLevelStatusChoice1 -7410
4478-
#define PCWSetLogLevelStatusPrompt -7404
4479-
#define PCWSetLogLevelStatusNow -7403
4480-
#define PCWSetLogLevelStatusCurrent -7402
4481-
#define PCWSetLogLevelDescription -7401
4482-
#define PCWSetLogLevelChoice -7400
4483-
#define PCWToggleAutoExportChoice2 -7320
4484-
#define PCWToggleAutoExportChoice1 -7310
4485-
#define PCWToggleAutoExportChoice1StatusNow -7303
4486-
#define PCWToggleAutoExportChoice1StatusCurrent -7302
4487-
#define PCWToggleAutoExportDescription -7301
4488-
#define PCWToggleAutoExportChoice -7300
4489-
#define PCWManageChangeTestSettingsChoice3StatusNow -7232
4490-
#define PCWManageChangeTestSettingsChoice3Description -7231
4491-
#define PCWManageChangeTestSettingsChoice3 -7230
4492-
#define PCWManageChangeTestSettingsChoice2StatusNow -7225
4493-
#define PCWManageChangeTestSettingsChoice2Prompt -7224
4494-
#define PCWManageChangeTestSettingsChoice2Description3 -7223
4495-
#define PCWManageChangeTestSettingsChoice2Description2 -7222
4496-
#define PCWManageChangeTestSettingsChoice2Description -7221
4497-
#define PCWManageChangeTestSettingsChoice2 -7220
4498-
#define PCWManageChangeTestSettingsChoice1StatusCurrent -7214
4499-
#define PCWManageChangeTestSettingsChoice1Choice2 -7213
4500-
#define PCWManageChangeTestSettingsChoice1Choice1 -7212
4501-
#define PCWManageChangeTestSettingsChoice1Description -7211
4502-
#define PCWManageChangeTestSettingsChoice1 -7210
4503-
#define PCWManageChangeTestSettingsDescription -7201
4504-
#define PCWManageChangeTestSettingsChoice -7200
4505-
#define PCWManageWorkspaceChoice2StatusNow -7128
4506-
#define PCWManageWorkspaceChoice2Prompt2 -7127
4507-
#define PCWManageWorkspaceChoice2CurrentWorskpaceWarn -7126
4508-
#define PCWManageWorkspaceChoice2StatusCurrent -7125
4509-
#define PCWManageWorkspaceChoice2Warning -7124
4510-
#define PCWManageWorkspaceChoice2Prompt -7123
4511-
#define PCWManageWorkspaceChoice2Description2 -7122
4512-
#define PCWManageWorkspaceChoice2Description -7121
4513-
#define PCWManageWorkspaceChoice2 -7120
4514-
#define PCWManageWorkspaceChoice1StatusNow -7113
4515-
#define PCWManageWorkspaceChoice1StatusCurrent -7112
4516-
#define PCWManageWorkspaceChoice1Description -7111
4517-
#define PCWManageWorkspaceChoice1 -7110
4518-
#define PCWManageWorkspaceDescription -7101
4519-
#define PCWManageWorkspaceChoice -7100
4520-
#define PCWBye -7007
4521-
#define PCWToggleDisabled -7006
4522-
#define PCWToggleEnabled -7005
4523-
#define PCWAborted -7004
4524-
#define PCWChoicePrompt -7003
4525-
#define PCWChoiceQuestion -7002
4526-
#define PCWInvalidChoice -7001
4527-
#define PCWWelcome -7000
4528-
#define CMLRunActiveTest -6002
4529-
#define CMLImportActive -6001
4530-
#define CMLExportActive -6000
4531-
#define NoCompatibleApplicationForPublicFile -119
4532-
#define FailedWhileRunningExtendedHook -118
4533-
#define CannotSaveConflictingItems -117
4534-
#define CouldNotDetermineWorkspace -116
4535-
#define LogLevelIsOutOfRange -115
4536-
#define ErrorsWhileImportingType -114
4537-
#define ExportingProjectNotFound -113
4538-
#define NoTestSuitesWereFound -112
4539-
#define PortIsNotInstalled -111
4540-
#define UnableToDescribeItem -110
4541-
#define UnableToRemoveDirectory -109
4542-
#define SupressedAttemptToExportFromOutside -108
4543-
#define AmbiguousPartialToWorkspace -107
4544-
#define ErrorsWhileImporting -106
4545-
#define UnableToExportInvalidItem -105
4546-
#define UnableToCopySource -104
4547-
#define CannotUseRelativePath -103
4548-
#define CannotCreateDirectory -102
4549-
#define NamespaceDoesntHaveAppWithPath -101
4550-
#define InvalidPhysicalPath -100
4551-
#define HookReturnedError -1102
4552-
#define HookReturnedOK -1101
4553-
#define RunningCustomHook -1100
4554-
#define ConflictingItemDetected2 -1001
4555-
#define ConflictingItemDetected -1000
4556-
#define ExportingTestClassToXML -902
4557-
#define XMLExportedTo -901
4558-
#define ExportingXML -900
4559-
#define FileGroupType -813
4560-
#define CLSGroupType -812
4561-
#define DFIGroupType -811
4562-
#define MVIGroupType -810
4563-
#define MVBGroupType -809
4564-
#define BASGroupType -808
4565-
#define INTGroupType -807
4566-
#define INCGroupType -806
4567-
#define MACGroupType -805
4568-
#define DirectoryType -804
4569-
#define FileType -803
4570-
#define RoutineType -802
4571-
#define ProjectType -801
4572-
#define ClassType -800
4573-
#define CannotUseDefault2 -701
4574-
#define CannotUseDefault -700
4575-
#define ProjectSaved -614
4576-
#define FatalFailedToRestoreBackup -613
4577-
#define FatalApplyingBackup -612
4578-
#define FatalRollingBackTransaction -611
4579-
#define FatalProjectIntegrityRiskWarning -610
4580-
#define FatalRollbackAlert -609
4581-
#define FatalErrorAlert -608
4582-
#define NewProject -607
4583-
#define NoPendingItemsToImport -606
4584-
#define TotalItemsToImport -605
4585-
#define EnqueueingItems -604
4586-
#define ImportingProject -603
4587-
#define NothingToImport -602
4588-
#define EnqueingType -601
4589-
#define ImportingType -600
4590-
#define OvewriteWithExtension -504
4591-
#define UpToDate -503
4592-
#define AllDone -502
4593-
#define Failed -501
4594-
#define Done -500
4595-
#define TotalExtraneousItemsRemoved -406
4596-
#define RemovingDirectory -405
4597-
#define RemovingFile -404
4598-
#define NoExtraneousItems -403
4599-
#define TotalExtraneousItems -402
4600-
#define CheckingExtraneousItems -401
4601-
#define SynchronizingProject -400
4602-
#define NewWorkspaceDetected -304
4603-
#define ExportingType -303
4604-
#define SourceExportedToPath -302
4605-
#define ExportingProject -301
4606-
#define NoItemsToExport -300
4607-
#define RemovingBackupMirror -203
4608-
#define BackupMirror -202
4609-
#define BackupAlert -201
4610-
#define BackupStart -200
4611-
#define MLForceImport -5010
4612-
#define MLForceExport -5009
4613-
#define MLImport -5008
4614-
#define MLRunTests -5007
4615-
#define MLScanAndFix -5006
4616-
#define MLRemoveRoutines -5005
4617-
#define MLRemoveFiles -5004
4618-
#define MLRemoveClasses -5003
4619-
#define MLExportTests -5002
4620-
#define MLExportToXML -5001
4621-
#define MLExport -5000
4622-
]]></Routine>
4623-
4624-
4625-
<Routine name="portutils" type="INC"><![CDATA[
4626-
#include %occStatus
4627-
#include %occMessages
4628-
#include %occErrors
4629-
4630-
#include portmd
4631-
4632-
#define NULL $s($$$isWINDOWS : "//./nul", 1: "/dev/null")
4633-
#define PathTypes $listbuild("inc", "int", "cls", "mac", "mvi", "mvb", "bas", "public", "dfi")
4634-
#define ImportTypes $listbuild("INC", "INT", "CLS", "MAC", "MVI", "MVB", "BAS", "CSR", "CSP")
4635-
#define ImportTypeDescriptions $listbuild("include files", "intermediate routines", "classes", "macro routines", "MV Intermediate routines", "MV Basic routines", "Basic routines", "DFI XML", "CSP Rules", "files")
4636-
#define RoutineExtensions $listbuild(".MAC", ".INT", ".INC", ".MVB", ".MVI", ".BAS", ".DFI")
4637-
#define RoutineGroups "MAC,INT,INC,MVB,MVI,BAS,DFI"
4638-
#define IsRoutine(%type) ($$$RoutineGroups[%type)
4639-
#define GetTypeDescription(%type) $select($$$IsRoutine(%type)=1:$$$RoutineType,(%type = "CLS"):$$$ClassType,(%type = "PRJ"):$$$ProjectType,1:$$$FileType)
4640-
#define GetGroupTypeDescription(%type) $case(%type,"MAC":$$$MACGroupType,"INC":$$$INCGroupType,"INT":$$$INTGroupType,"BAS":$$$BASGroupType,"MVB":$$$MVBGroupType,"MVI":$$$MVIGroupType,"DFI":$$$DFIGroupType,"CLS":$$$CLSGroupType,:$$$FileGroupType)
4641-
#def1arg PERROR(%errorArgs) $$$ERROR($$$GeneralError, $$$FormatMsg("Port Errors", %errorArgs))
4642-
#def1arg FormatWizardMsg(%args) $$$FormatMsg("Port Configuration Wizard", %args)
4643-
#define RemoveClassExtension(%iname) $select($piece(%iname, ".", $$$ucase(%iname), *) [ "CLS" : $piece(%iname, ".", 1, *-1), 1: %iname)
4644-
#define Slash(%path) $select($$$IsRemoteAware : $select(%path [ "\" : "\", 1: "/"), 1: $$$OSSlash)
4645-
#define OSSlash $select($$$isWINDOWS : "\", 1: "/")
4646-
#define OSFromSlash(%path) $select(%path [ "\" : 2, 1: 3)
4647-
#define PathSlash(%path) $select(%path [ "\" : "\", 1: "/")
4648-
#define NFN(%path) $select($$$IsRemoteAware : ##class(Port.Util).TranslatePath(%path, $$$OSFromSlash(%path)), 1: ##class(Port.Util).TranslatePath(%path))
4649-
#define IsRemoteAware $get(^||Port.Internals.Configuration("remote")) = 1
4650-
#define LTrimSlash(%p) $s($e(%p) = $$$Slash(%p) : $e(%p, 2, *), 1: %p)
4651-
#define RTrimSlash(%p) $s($e(%p, *) = $$$Slash(%p) : $e(%p, 1, *-1), 1: %p)
4652-
#define LTrimProvidedSlash(%p, %slash) $s($e(%p) = %slash : $e(%p, 2, *), 1: %p)
4653-
#define RTrimProvidedSlash(%p, %slash) $s($e(%p, *) = %slash : $e(%p, 1, *-1), 1: %p)
4654-
#define LPadSlash(%p) $s($e(%p) '= $$$Slash(%p) : $$$Slash(%p)_%p, 1: %p)
4655-
#define RPadSlash(%p) $s($e(%p, *) '= $$$Slash(%p) : %p_$$$Slash(%p), 1: %p)
4656-
#define LPadProvidedSlash(%p, %slash) $s($e(%p) '= %slash : %slash_%p, 1: %p)
4657-
#define RPadProvidedSlash(%p, %slash) $s($e(%p, *) '= %slash : %p_%slash, 1: %p)
4658-
4659-
]]></Routine>
46604473
</Export>

0 commit comments

Comments
 (0)