Ticket #1845 (closed bug: fixed)
Need comparable revision information in parrot_config output
Reported by: | moritz | Owned by: | dukeleto |
---|---|---|---|
Priority: | blocker | Milestone: | 2.10 |
Component: | configure | Version: | 2.10.0 |
Severity: | medium | Keywords: | |
Cc: | gerd | Language: | |
Patch status: | Platform: |
Description
Currently parrot-on-git doesn't provide revision information besides the SHA1 hash, which is not suitable for comparing it to other revisions if no parrot git repo is available.
We should have the following config keys available * revision - last svn revision * sha1 - git SHA1 * git_revision - output from git describe --tags
Before we decided that we want all three, I wrote a small patch to change the 'revision' key to git-describe output.
From 63833e6a9b47bba9ed7d678544cb6c71135f0ae0 Mon Sep 17 00:00:00 2001 From: Moritz Lenz <moritz@faui2k3.org> Date: Tue, 9 Nov 2010 19:14:12 +0100 Subject: [PATCH] switch revision config to "git describe" output The rationale is that it allows HLL devs to compare parrot revisions without having a git repo of parrot available. --- config/auto/revision.pm | 2 +- lib/Parrot/Revision.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/auto/revision.pm b/config/auto/revision.pm index efbc014..870c3df 100644 --- a/config/auto/revision.pm +++ b/config/auto/revision.pm @@ -32,7 +32,7 @@ sub runstep { my $revision = $Parrot::Revision::current; - if ( defined($revision) and $revision !~ /^[a-z0-9]+$/i ) { + if ( defined($revision) and $revision !~ /^[-\w]+-\d+-g[a-f0-9]+$/i ) { die "Invalid Parrot revision (SHA1): $!"; } diff --git a/lib/Parrot/Revision.pm b/lib/Parrot/Revision.pm index f7efa8f..560797c 100644 --- a/lib/Parrot/Revision.pm +++ b/lib/Parrot/Revision.pm @@ -84,7 +84,7 @@ sub _analyze_sandbox { # Avoid locale troubles local $ENV{LANG} = 'C'; local $ENV{LC_ALL} = 'C'; - chomp($revision = qx/git rev-parse HEAD/); + chomp($revision = qx/git describe --tags/); return $revision; } -- 1.7.2.3
Change History
Note: See
TracTickets for help on using
tickets.