summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Debian/Dgit.pm27
-rwxr-xr-xdgit7
-rwxr-xr-xtests/using-intree3
3 files changed, 31 insertions, 6 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm
new file mode 100644
index 0000000..2be936b
--- /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 02ed55d..bd8507c 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 f20ec9d..26d5812 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 "$@"