From: Ian Jackson Date: Sun, 15 Feb 2015 18:32:49 +0000 (+0000) Subject: Introduce Debian/Dgit.pm X-Git-Tag: debian/0.30~271 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=1f0e14f2af07576c71e674a946b84f60f594e653 Introduce Debian/Dgit.pm --- diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm new file mode 100644 index 00000000..2be936b8 --- /dev/null +++ b/Debian/Dgit.pm @@ -0,0 +1,27 @@ +# + +package Debian::Dgit; + +use strict; +use warnings; + +BEGIN { + use Exporter (); + our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); + + $VERSION = 1.00; + @ISA = qw(Exporter); + @EXPORT = qw(debiantag); + %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], + @EXPORT_OK = qw(); +} + +our @EXPORT_OK; + +sub debiantag ($) { + my ($v) = @_; + $v =~ y/~:/_%/; + return "debian/$v"; +} + +1; diff --git a/dgit b/dgit index 02ed55d1..bd8507cd 100755 --- a/dgit +++ b/dgit @@ -33,6 +33,8 @@ use Digest::SHA; use Digest::MD5; use Config; +use Debian::Dgit; + our $our_version = 'UNRELEASED'; ###substituted### our $rpushprotovsn = 2; @@ -110,11 +112,6 @@ my $lbranch_re = '^refs/heads/'.$branchprefix.'/([^/.]+)$'; sub lref () { return "refs/heads/".lbranch(); } sub lrref () { return "refs/remotes/$remotename/$branchprefix/$csuite"; } sub rrref () { return "refs/$branchprefix/$csuite"; } -sub debiantag ($) { - my ($v) = @_; - $v =~ y/~:/_%/; - return "debian/$v"; -} sub stripepoch ($) { my ($vsn) = @_; diff --git a/tests/using-intree b/tests/using-intree index f20ec9df..26d5812c 100755 --- a/tests/using-intree +++ b/tests/using-intree @@ -1,4 +1,5 @@ #!/bin/bash set -e -export DGIT_TEST_INTREE=`pwd` +pwd=`pwd` +export DGIT_TEST_INTREE="$pwd" PERLLIB="$pwd${PERLLIB:+:}${PERLLIB}" exec "$@"