forked from lix-project/hydra
Fix Mercurial input fetching if a cached input has been GC'ed
Fixes Hydra/76.
This commit is contained in:
parent
c1653a9561
commit
4a6f798ef4
|
@ -138,7 +138,7 @@ sub fetchInputPath {
|
||||||
# (or changes back), we don't get a new "revision".
|
# (or changes back), we don't get a new "revision".
|
||||||
if (!defined $cachedInput) {
|
if (!defined $cachedInput) {
|
||||||
txn_do($db, sub {
|
txn_do($db, sub {
|
||||||
$db->resultset('CachedPathInputs')->create(
|
$db->resultset('CachedPathInputs')->update_or_create(
|
||||||
{ srcpath => $uri
|
{ srcpath => $uri
|
||||||
, timestamp => $timestamp
|
, timestamp => $timestamp
|
||||||
, lastseen => $timestamp
|
, lastseen => $timestamp
|
||||||
|
@ -567,7 +567,7 @@ sub fetchInputHg {
|
||||||
($sha256, $storePath) = split ' ', $stdout;
|
($sha256, $storePath) = split ' ', $stdout;
|
||||||
|
|
||||||
txn_do($db, sub {
|
txn_do($db, sub {
|
||||||
$db->resultset('CachedHgInputs')->create(
|
$db->resultset('CachedHgInputs')->update_or_create(
|
||||||
{ uri => $uri
|
{ uri => $uri
|
||||||
, branch => $branch
|
, branch => $branch
|
||||||
, revision => $revision
|
, revision => $revision
|
||||||
|
|
Loading…
Reference in a new issue