[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Changes in meta.git/.mrconfig and dpt-salsa-mrconfig



A quick heads-up for people who have all our repos checked out and
manage them with mr and the .mrconfig in meta.git [0]:

Previously, dpt-salsa-mrconfig would write a file per repository to
.git.hashes, containing the hashes of each branch, and then compare-hashes
(in meta.git), called from .mrconfig, would check these values
against the hashes of the local repo to decide if an update is
necessary.

I've changed this so that dpt-salsa-mrconfig (starting with
pkg-perl-tools 0.49 which reached testing today) saves the
last_activity_at timestamp from salsa to a file in a new directory
.lastactivity, and then a new script compare-lastactivity (in
meta.git, merged and pushed right now), called from .mrconfig,
compares the timestamp against the timestamp of the last fetch in the
local repo.

This approach saves a previously necessary API call for each
repository, hereby sparing the salsa API thousands of hits, and in my
tests saving roughly 1/3 of the time as well (the last_activity_at
value is already in the list of repos we need to fetch anyway).

Some notes:
- the first `mr up' will take a bit, as for some reason the
  last_activity_at value is rather new for a couple of repos;
- the approach leads to a few unnecessary pulls, e.g.
  + when last_activity_at gets bumped on salsa because of merge
    requests;
  + after a push/an upload, as compare-lastactivity looks at the last
    _fetch_ in a repo (we might instead check the timestamp of the
    last commit but so far it didn't bother me enough)

I'm happily using this setup since the end of September; I hope
you'll like it as well :)

Thanks to alexm for testing that it doesn't only work for me locally!


Cheers,
gregor


[0] https://perl-team.pages.debian.net/git.html#tracking_all_repositories_with_mr(1)
-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   NP: Pink Floyd: Yet Another Movie/Round And Ar

Attachment: signature.asc
Description: Digital Signature


Reply to: