diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-11-09 21:35:58 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-12-19 16:58:40 +0000 |
commit | 0e02391d91eaff9f4e6432baadb6996b39b68b91 (patch) | |
tree | a980370f709b71d9b3ace7530a84de7ca793927e /Debian/Dgit.pm | |
parent | c10db95b3cf4b7232b0f204f7bacf38737abba0d (diff) |
Introduce dep14_version_quote
Removes three identical copies of this y/// rune. No functional
change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'Debian/Dgit.pm')
-rw-r--r-- | Debian/Dgit.pm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 57ae994..a3c2753 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -36,6 +36,7 @@ BEGIN { $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = qw(setup_sigwarn + dep14_version_mangle debiantags debiantag_old debiantag_new server_branch server_ref stat_exists link_ltarget @@ -144,16 +145,21 @@ sub debugcmd { printcmd(\*DEBUG,$debugprefix.$extraprefix,@_) if $debuglevel>0; } +sub dep14_version_mangle ($) { + my ($v) = @_; + # DEP-14 2014-11-05 "Version Mangling" + $v =~ y/~:/_%/; + return $v; +} + sub debiantag_old ($$) { my ($v,$distro) = @_; - $v =~ y/~:/_%/; - return "$distro/$v"; + return "$distro/". dep14_version_mangle $v; } sub debiantag_new ($$) { my ($v,$distro) = @_; - $v =~ y/~:/_%/; - return "archive/$distro/$v"; + return "archive/$distro/".dep14_version_mangle $v; } sub debiantags ($$) { |