automatic remote repos updates

Issue #109 resolved
skenizen created an issue

I would like to be able of giving external address of a repository and being able of cloning it. Then doing some kind of modification (like local patch) and still updating the base automatically (everyday for example) with the original repository.

At the moment I do this locally. I clone a repository on my computer, I create my changelists or queues and I push it on my distant rhodecode base. Everyday, I update my local base from the official repository and push it to my rhodecode server.

I think that it would be nice to have such option for being able of doing it directly from rhodecode :)

Comments (9)

  1. Marcin Kuzminski repo owner

    SO from what i understand You would like to make a clone out of an given url, for example when creating a repository, and then be able to update it on regular basis (via web) ?

    What If there's a conflict and You need to merge ?

  2. skenizen reporter

    yes, you understood well, but in fact it wouldn't be an "update" on the website but a pull for getting the new changes. that way no conflict and on local repository I would just have to pull the repository of rhodecode to get the last changes on the original repository.

    For resuming :

    rhode. : original clone of the distant repository.

    rhode. : automatic pull (each day or weeks) of the distant repository (creating branches if it differ)

    local : clone and pull from rhodecode

    local : each day pulling from rhodecode and eventually merging the difference into local branch and pushing the new additions.

    I think it would be a great addition to your already great software :)

  3. Marcin Kuzminski repo owner
    • changed milestone to 1.2

    I like this idea also, VCS have already prepared function to do this, but only problem I see is to run scheduled tasks from within rhodecode, options to use are:

    • celerybeat
    • cron function
    • manual

    I'll take manual option for first implementation since it will also bee handy to trigger such action "by hand", then I'll think how to schedule jobs the easiest way.

    will try to aim at version 1.2 for manual pull (since it's quite easy), and 1.3 for automatic scheduled jobs.

  4. Marcin Kuzminski repo owner
    • changed milestone to 1.3

    Ok in rev > 1182 there is optional creation of repository from an remote location, and manually from admin pannel it's possible to pull in changes, and such pull also logs what revision was pulled in journal.

    Scheduled pull I'll leave for 1.3

  5. Marcin Kuzminski repo owner

    I'm thinking about two solutions, an webhook driver update, can be done via crontab or script, it's simple and it'll do the job. it can be even implemented in current version with a real small change.

    Other option is celerybeat, since we have celery already packed in RhodeCode. I'll see also APScheduler, as a final alternative.

  6. Marcin Kuzminski repo owner

    Happy to announce that this was implemented right now in 1.2

    As a first method of API implementation for rhodecode automated pulls can be done right now using the build in API: A simple crontab entry issuing such command will take care of auto updating content of remote repos:

    curl -i -H "Content-Type: application/json" -X GET -d '{"api_key":"<api_key>","method":"pull","args":{"repo":"<repo_name>"}}' http://rhodecode.server/_admin/api

  7. Log in to comment