Skip to content

Timestamp of embedded-git-config.GSC is always the current time if not yet imported, preventing import #794

Open
@raymond-rebbeck

Description

@raymond-rebbeck

If the config file has yet to be loaded (because for example I only just installed git-source-control and did nothing else) then the %RoutineMgr.TS() timestamp for embedded-git-config.GSC is always returned as the current time. This results in not being able to then subsequently import the config file as it is never considered outdated (at least without using force=1).

The following code appears to be the reason for this, if ^SYS("SourceControl","Git","settings","TS") is not set then the current time is returned as the default $get value. The comments for this class method seem to be suggesting that the default should be "", with the referenced $zdatetime($horolog,3) being what would be in the global if it existed.

/// Return the timestamp of routine 'name' in %TimeStamp format. This is used to determine if the routine has
/// been updated on the server and so needs reloading from Studio. So the format should be $zdatetime($horolog,3),
/// or "" if the routine does not exist.
ClassMethod TimeStamp(name As %String) As %TimeStamp
{
return $get(@##class(SourceControl.Git.Utils).#Storage@("settings","TS"), $zdatetime($h,3))
}

The reason for being in this situation in the first place is that I want to automate the setup of Embedded Git for end user developers. I already do this in 2.7.1 by setting a selection of ^SYS("SourceControl","Git","settings",...) globals via a script, including mappings, and then executing SourceControl.Git.Utils.ImportAll() to import all of the code. It works great.

However as part of exploring a transition from 2.7.1 to 2.12+ I want to use the config file for the mappings and ran into this issue while trying to perform an initial import of the config file.

IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2024.1.4 (Build 516_1U) Sat May 31 2025 12:35:51 EDT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions