You are here: Foswiki>Tasks Web>Item9238 (03 Jan 2011, GeorgeClark)Edit Attach

Item9238: Add %REPO macro in Repository Plugin

pencil
Priority: Enhancement
Current State: Being Worked On
Released In: 1.0.0
Target Release: n/a
Applies To: Extension
Component: RepositoryPlugin
Branches:
Reported By: GeorgeClark
Waiting For: Main.GeorgeClark
Last Change By: GeorgeClark
There is no easy way to see from a Running svn or git checkout what actual rev number is being tested.

Add a small Plugin to BuildContrib lib/Foswiki/Plugins/BuildContribPlugin.pm It will implement the %REPO macro to query the git or svn repository:
  • REPO{"lastlog"} Report log from most recent commit
  • REPO{"rev"} Pull the "Revision" field from git svn info or svn info command
  • REPO{"isodate"} Report the date/timestamp from the repository in iso format
  • REPO{"lastauthor"} Report the Author of the most recent commit

Another option might be to pull the info and log data into tokens for use in a format string.

  • REPO{"info" format="$isodate, $rev, $lastauthor, $lastrev, $root, $uuid"}
  • REPO{"log" number="n"} - report the last n log messages, default = 1

Any other requests, objections or suggestions?

-- GeorgeClark - 02 Jul 2010

Sounds good, as discussed on IRC - although a small part of me is thinking that this might be less useful than I think, particularly when testing in mod_perl environments.

I wouldn't be too fussed about formatting tokens, although it would be nice.

Really need to get BuildContrib to work happily from a git checkout during build :/

-- PaulHarvey - 02 Jul 2010

I changed status to "Being worked on" because it needs a specific name in Waiting for Feedback. This is interesting, though I don't think I'd find it that useful. Because my test runs are almost always preceded by an svn update, I have a good idea what rev I'm testing.

Changed from Normal to Enhancement

-- CrawfordCurrie - 28 Aug 2010

Changing this to a separate extension - RepositoryPlugin.

-- GeorgeClark - 03 Jan 2011
 
Topic revision: r6 - 03 Jan 2011, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy