There's really no reason that one wouldn't want to BOTH react to scripts and run log fetches on cron. We don't need it on d.o, but it's still quite legit. Consequently, the way that VersioncontrolRepository::update_method works right now is stupid, or at least the way we describe how it works (and present options on the repo editing page) is stupid. There should just be a simple flag indicating whether to fetch logs on cron, and a checkbox for it. There's no reason for it to be any more complicated than that.

Comments

sdboyer’s picture

i would actually like to have this done for release. here's what's needed

  • change {versioncontrol_repositories}.update_method to {versioncontrol_repositories}.cron, which is 1 if it should run on cron and 0 if not
  • implement hook_cron() in versioncontrol.module and have it do basically exactly what's done in versioncontrol_git_cron() right now
  • update the repository editing form to use a checkbox instead of a radio.
marvil07’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Status: Active » Needs review
Issue tags: +needs backport to 6.x
StatusFileSize
new23.52 KB

I think this patch does it:

  • Changes {versioncontrol_repositories} update_method field to be named cron and be a simple flag.
  • Removes VersioncontrolBackend::update_methods data member.
  • Renames VersioncontrolRepository update_method data member to cron.
  • Removes versioncontrol_handler_field_repository_update_method views field handler.
  • Updates views implementation, views default view for repository listing and tests to follow the schema changes.
  • Implements hook_cron() to process syncronizations of repositories marked to do it on cron.

Let's see what bot thinks.

PS: I have two commits locally for this patch to differentiate views re-export change.

marvil07’s picture

Version: 7.x-1.x-dev » 6.x-2.x-dev
Status: Needs review » Fixed
Issue tags: -needs backport to 6.x
StatusFileSize
new16.94 KB

Last patch added to 7.x-1.x

I reworked the change for 6.x-2.x as in the patch an added it.

Copying conflict section from commit message:

    Conflicts:
      Some changes needed to be done manually: change hook_update_N() to use
      D6 api and change hook_views_handlers() which exists on D6 but not on
      D7.
      includes/views/versioncontrol.views_default.inc
        This needed to be changed/re-exported manually, since D7 ad D6 views
        exports are different.
      versioncontrol.admin.inc
        Minor string conflict.
      versioncontrol.info
        Minor: On D6 handlers are not declared here.
      versioncontrol.module
        Minor Implemented/Implements docblock conflict.

Status: Fixed » Closed (fixed)
Issue tags: -versioncontrol-6.x-2.0-release-blocker

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit c9d7450 on 7.x-1.x, drush-vc-sync-unlock by marvil07:
    Issue #1045742: Change VersioncontrolRepository::update_method to be a...

  • Commit c9d7450 on 7.x-1.x by marvil07:
    Issue #1045742: Change VersioncontrolRepository::update_method to be a...