#828761 hours_since should not update flag file after an error

#828761#5
Date:
2016-06-27 14:46:03 UTC
From:
To:
Hi,

if hours_since is used, and an mr command fails with an error, the flag
is still touched, so a retry will not try again:

$ mr update
mr update: /home/e13itfe/.config/vcsh/repo.d/repo.git
mr update: command failed

mr update: finished (1 failed; 5 skipped)
[5/502]e13itfe@atln71628:~$ mr update
mr update: finished (6 skipped)
[6/502]e13itfe@atln71628:~$

The flag should not be touched if there was an error so that one can
immediately retry the operation.

Greetings
Marc

#828761#10
Date:
2019-11-12 07:12:34 UTC
From:
To:
There doesn't appear to be any way to fix this, because the skip
command that runs hours_since which touches the flag file runs before
the update commands.

You can immediately retry the operation using the force option, which
will ignore the skip command where the hours_since flag was run.

   $ mr --force update

#828761#15
Date:
2019-11-12 07:12:34 UTC
From:
To:
There doesn't appear to be any way to fix this, because the skip
command that runs hours_since which touches the flag file runs before
the update commands.

You can immediately retry the operation using the force option, which
will ignore the skip command where the hours_since flag was run.

   $ mr --force update

#828761#18
Date:
2019-11-12 07:12:34 UTC
From:
To:
There doesn't appear to be any way to fix this, because the skip
command that runs hours_since which touches the flag file runs before
the update commands.

You can immediately retry the operation using the force option, which
will ignore the skip command where the hours_since flag was run.

   $ mr --force update

#828761#21
Date:
2019-11-12 07:12:34 UTC
From:
To:
There doesn't appear to be any way to fix this, because the skip
command that runs hours_since which touches the flag file runs before
the update commands.

You can immediately retry the operation using the force option, which
will ignore the skip command where the hours_since flag was run.

   $ mr --force update

#828761#26
Date:
2019-11-12 08:54:36 UTC
From:
To:
Check hours_since
Do command, bail out if unsuccessful
update flag file

I know, but that's not pretty.

Greetings
Marc

#828761#31
Date:
2019-11-12 08:54:36 UTC
From:
To:
Check hours_since
Do command, bail out if unsuccessful
update flag file

I know, but that's not pretty.

Greetings
Marc

#828761#34
Date:
2019-11-12 08:54:36 UTC
From:
To:
Check hours_since
Do command, bail out if unsuccessful
update flag file

I know, but that's not pretty.

Greetings
Marc

#828761#39
Date:
2019-11-13 04:11:04 UTC
From:
To:
Hmm, I suppose that could work, but right now there is no way for
hours_since to communicate to the parent mr process that the flag file
should be updated and which flag file to update.

The stdout channel is already used so that would mean opening a pipe
from the child to the parent and telling hours_since which file
descriptor to write to using an environment variable.

I'm not proficient enough with file descriptors and Perl to be able to
implement this but I could add it to the myrepos codebase if I were to
get an example of how to do this.