I keep a master repo (named "MI-upstream") that a cron job pulls and updates every hour. (I didn't use to update, but it's sometimes nice to have a more-or-less current copy of the code available at all times.) My other repositories are cloned from this, or at least I've edited their .hg/hgrc files to have this in [paths] default. I used to set [paths] default-push to mozilla-inbound, but these days I just use a global ~/.hgrc [paths] mi alias:
[paths] try = ssh://sf...@mozilla.com@hg.mozilla.org/try/ mi = ssh://sf...@mozilla.com@hg.mozilla.org/integration/mozilla-inbound I then have a shell function that updates the local "upstream" repo, in this case MI-upstream: function pullup () { ( cd $(hg path default) && hg pull ) } So my usual landing dance looks like this: % cd ~/src/MI-GC # MI-GC is a "child" repo of MI-upstream % pullup # Does an hg pull in ~/src/MI-upstream % hg pull --rebase % hg qfin -a % hg push mi -r . The |-r .| is because I sometimes pull extra heads into my local repos. If you don't do that, then you don't need the |-r .|. Then I have a nightly cron job that runs |hg relink| in all of my repos, to hard link as much as I can to the upstream repo. (Occasionally, I'll set a different relink target with [paths] default-relink just for that repo. But it doesn't matter much.) Nothing too crazy in there, I hope. I only pull from the remote upstream repo once an hour because I'm going to have to run 'pullup' just before landing anything anyway. Pulling once an hour via cron means that my 'pullup' jobs need to pull down at most an hour's worth of changes, which is fine. I could have cron pull more often, but I want to do a manual pullup before landing as a sanity check anyway. (And I'd have to pull every 30 seconds or so to be sure I'm close enough to the latest, which would be antisocial and probably stall out my machine all the time.) I've gotten corruption once in my MI-upstream repo since starting this a year or two ago. On Thu 19 Sep 2013 10:02:20 PM PDT, Dave Townsend wrote: > I would expect that the total server load on hg.mozilla.org is high enough > that whatever you do as a single person isn't going to be even a blip on > the radar so I'd expect just a "hg pull" with a reasonable frequency would > be just fine. If you want to be sure you're up to date make a simple script > that pulls first from your local clone then from the real repo. > > Downside? I've had a cronjob doing this frequently for a while and the > local repo gets corrupt data in it about every other week and I have to go > manually strip the offending changesets and repull. No idea why. > > > On Thu, Sep 19, 2013 at 9:31 PM, Blair McBride <bmcbr...@mozilla.com> wrote: > >> Ohai! >> >> I have numerous copies of mozilla-central (and other repos) for various >> purposes - spread around physical boxes and VMs. Some of them I use >> regularly and update regularly, others not-regularly. I've been thinking >> about the amount of time and bandwidth I waste updating them all from a >> remote server (hg.mozilla.org, github, etc). I suspect I'm not alone in >> this. >> >> So, I was thinking of setting up a local mirror of mozilla-central (and >> other repos) - and update my development repos from the local mirror. >> Obviously, I'd like to automatically keep the mirror up to date, but >> without hammering the remote server. I was thinking regularly scheduled >> updates from the remote, as well as on-demand updates whenever I pull from >> the local mirror if the last scheduled update was greater than X hours ago. >> >> Has anyone setup this type of system before? Or know of any tools that >> already handle this? It'd be nice to save some time by working from >> previous art, as well as document the process for others. >> >> - Blair >> ______________________________**_________________ >> dev-platform mailing list >> dev-platform@lists.mozilla.org >> https://lists.mozilla.org/**listinfo/dev-platform<https://lists.mozilla.org/listinfo/dev-platform> >> > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform