List for cgit developers and users
 help / color / mirror / Atom feed
* Cgit v0.9.2 problem with get_repo_modtime
       [not found] <mailman.32.1376510774.1307.cgit@lists.zx2c4.com>
@ 2013-08-14 20:12 ` esajine
  2013-08-14 21:14   ` cgit
  0 siblings, 1 reply; 4+ messages in thread
From: esajine @ 2013-08-14 20:12 UTC (permalink / raw)


I have a minor problem with Cgit v 0.9.2 (upgraded from 0.8.3.3)

Since i have updated the installation yesterday all repositories that 
were shown as idle before for some time are now shown to be idle for 4 
days - all of them except for very recent ones. This amount changes as 
the time passes (yesterday it was 3), but the problem is that it is 
different from the actual time the repos were touched. I.e. it is 
different from what i can see inside each repo.

Can it be that get_repo_modtime function from repolist.c calculates the 
idle time differently than whatever function does that for the 
references inside the repo?

Please make sure i'm in the reply list as i'm not subscribed to the list.

Thanks,
Eugene


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Cgit v0.9.2 problem with get_repo_modtime
  2013-08-14 20:12 ` Cgit v0.9.2 problem with get_repo_modtime esajine
@ 2013-08-14 21:14   ` cgit
  2013-08-15 14:42     ` esajine
  0 siblings, 1 reply; 4+ messages in thread
From: cgit @ 2013-08-14 21:14 UTC (permalink / raw)


On Wed, Aug 14, 2013 at 04:12:09PM -0400, Eugene Sajine wrote:
> I have a minor problem with Cgit v 0.9.2 (upgraded from 0.8.3.3)
> 
> Since i have updated the installation yesterday all repositories
> that were shown as idle before for some time are now shown to be
> idle for 4 days - all of them except for very recent ones. This
> amount changes as the time passes (yesterday it was 3), but the
> problem is that it is different from the actual time the repos were
> touched. I.e. it is different from what i can see inside each repo.

What does "touched" mean here? Did you really leave them untouched for
more than four days? No `git push`, `git gc` or anything similar?

> 
> Can it be that get_repo_modtime function from repolist.c calculates
> the idle time differently than whatever function does that for the
> references inside the repo?

Not sure what "the references inside the repo" means. If you refer to
the time of the last commit, that is indeed different from the idle time
by default. Please make sure you read [1] and replies for details.

> 
> Please make sure i'm in the reply list as i'm not subscribed to the list.
> 
> Thanks,
> Eugene
> _______________________________________________
> CGit mailing list
> CGit at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/cgit

[1] http://lists.zx2c4.com/pipermail/cgit/2013-July/001443.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Cgit v0.9.2 problem with get_repo_modtime
  2013-08-14 21:14   ` cgit
@ 2013-08-15 14:42     ` esajine
  2013-08-15 17:56       ` Jason
  0 siblings, 1 reply; 4+ messages in thread
From: esajine @ 2013-08-15 14:42 UTC (permalink / raw)


On 8/14/2013 5:14 PM, Lukas Fleischer wrote:
> On Wed, Aug 14, 2013 at 04:12:09PM -0400, Eugene Sajine wrote:
>> I have a minor problem with Cgit v 0.9.2 (upgraded from 0.8.3.3)
>>
>> Since i have updated the installation yesterday all repositories
>> that were shown as idle before for some time are now shown to be
>> idle for 4 days - all of them except for very recent ones. This
>> amount changes as the time passes (yesterday it was 3), but the
>> problem is that it is different from the actual time the repos were
>> touched. I.e. it is different from what i can see inside each repo.
> What does "touched" mean here? Did you really leave them untouched for
> more than four days? No `git push`, `git gc` or anything similar?

Well, we have more than 1300 repos, so some of them don't get any 
updates for quite a while, so it is possible to see no git push for 
weeks or months
I didn't know that "git gc" is counted as "touch" or "modification", so 
that makes now perfect sense - we do have weekly gc running. I don't 
think it was counted as such before (at v 0.8.3.3)

I will take a close look at the agefile

Thanks!

[1] http://lists.zx2c4.com/pipermail/cgit/2013-July/001443.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Cgit v0.9.2 problem with get_repo_modtime
  2013-08-15 14:42     ` esajine
@ 2013-08-15 17:56       ` Jason
  0 siblings, 0 replies; 4+ messages in thread
From: Jason @ 2013-08-15 17:56 UTC (permalink / raw)


Keep in mind that when agefile is not specified and its default of
"info/web/last-modified" does not exist, then it falls back to using
"refs/heads/$defbranch", and by default $defbranch is "master", so any
git command that affects refs/heads/master will influence the time
stamp.

Using agefile is a good way of making things more specific.

Another way is keeping refs/heads/$blah up to date with something like
one of these scripts after your gc or maintenance operations:

> for i in *.git; do
>         cd "$i"
>         touch -d "$(git log -1 --format=format:'%aD%n' $(cat refs/heads/master))" refs/heads/master
>         cd ..
> done

or

> for i in *.git; do
>         cd "$i"
>         for j in refs/heads/*; do
>                 touch -d "$(git log -1 --format=format:'%aD%n' $(cat $j))" $j
>         done
>         cd ..
> done


This isn't necessarily as good as using an agefile and a post-receive
hook, but it does ensure that those particular filesystem files
metadata contain useful correlations to the git repos.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-15 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.32.1376510774.1307.cgit@lists.zx2c4.com>
2013-08-14 20:12 ` Cgit v0.9.2 problem with get_repo_modtime esajine
2013-08-14 21:14   ` cgit
2013-08-15 14:42     ` esajine
2013-08-15 17:56       ` Jason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).