C7CXMZ66BZTI5ABDJNPL2JKSHSKDQ645GXUKN7OTQBPEQJ452KQAC
VM3TQZ65HGSQEJ4XU276RHJBRVMEPD5A42OKK52T3MFPZBE4VOHQC
CHQEG6WY44VSOTLNH5KDZWJCCHNHRUCX6BEREXUUO56VOKHNSUZAC
O25D52TAMOPAK45N4II5XMWOBMPQJNHLW22M37COVY43EKNQBWJAC
T4LLYESZ2HUXSLKZ6GNBLVWUVG7R5IDFHYHYO773QIZ6QTOOXR2AC
YQWH4POV22KYCCKOTZXD36QKUOWEQ2DSPYPO5DNZDZ344RI25OAAC
OOQ2D3KCLFPYNAN253PHWLBQMB6OMO2KYQWQXLTP65SQAYZWQ5LAC
BK24VA6QHPE6XLXUXPLJMOT75WEXHZ6PPOFLYFUP4U4NYS5FVGWAC
5DZPBNDEZYHCHYNEGOV5HBYQIP2RIMJU7TN22REDQADAC7UK7AVQC
KQS7DSKJHTEHALCPTXMWRX2IBOVC5BWU7RWJ4GP5A2JJSBR7HPKAC
JTRG7RDQXKPSO4ESGDLSVAT5WIFGKDL424MN6YYCVTKCOR2FTXRQC
WWUOQ7V4KWGGHG22G22G6FWRHZEDLP3UZHA2C2FOMNT3UU4PFT4AC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
("git", "ls-remote", $uri, "refs/heads/".$branch));
die "Cannot get head revision of Git branch '$branch' at `$uri':\n$stderr" unless $res;
("git", "pull"));
die "Error pulling latest change git repo at `$uri':\n$stderr" unless $res;
(my $res1, $stdout, $stderr) = captureStdoutStderr(600,
("git", "ls-remote", $clonePath, "refs/heads/".$branch));
die "Cannot get head revision of Git branch '$branch' at `$uri':\n$stderr" unless $res1;
if (! defined $cachedInput ) {
($cachedInput) = $db->resultset('CachedGitInputs')->search(
{uri => $uri, branch => $branch, lastseen => {">", $timestamp - 3600}},
{rows => 1, order_by => "lastseen DESC"});
}
if (!defined $cachedInput) {
txn_do($db, sub {
$db->resultset('CachedGitInputs')->update_or_create(
{ uri => $uri
, branch => $branch
, revision => $revision
, timestamp => $timestamp
, lastseen => $timestamp
, sha256hash => $sha256
, storepath => $storePath
});
txn_do($db, sub {
$db->resultset('CachedGitInputs')->update_or_create(
{ uri => $uri
, branch => $branch
, revision => $revision
, sha256hash => $sha256
, storepath => $storePath