Package: devscripts
Version: 2.8.14
Severity: wishlist
To go along with svnpath in current trunk, here's an archpath. It works
with either tla or baz, and has a fairly similar interface to svnpath
except that the branch handling is a bit different to support the way
one normally works in arch (or at least how I normally work).
Thanks,
--
Colin Watson [EMAIL PROTECTED]
Index: debian/control
===================================================================
--- debian/control (revision 166)
+++ debian/control (working copy)
@@ -11,12 +11,13 @@
Conflicts: debmake (<< 3.5), dupload (<< 2.1), suidmanager (<< 0.51)
Depends: dpkg-dev, debianutils (>= 2.0), perl (>= 5.8), sed (>= 2.95),
${shlibs:Depends}, ${misc:Depends}
Recommends: fakeroot
-Suggests: devscripts-el, build-essential, cvs-buildpackage, cvs | svn,
debian-keyring, dupload (>=2.1) | dput, gnupg (>= 1.0.7), gnuplot,
libdigest-md5-perl, libtimedate-perl, libwww-perl, lintian | linda, mailx,
patch, patchutils, ssh, strace, wdiff, wget, www-browser
+Suggests: devscripts-el, build-essential, cvs-buildpackage, cvs | svn, tla |
bazaar, debian-keyring, dupload (>=2.1) | dput, gnupg (>= 1.0.7), gnuplot,
libdigest-md5-perl, libtimedate-perl, libwww-perl, lintian | linda, mailx,
patch, patchutils, ssh, strace, wdiff, wget, www-browser
Description: Scripts to make the life of a Debian Package maintainer easier
Contains the following scripts, dependencies/recommendations shown in
brackets afterwards:
- annotate: prepend time and stream (O for stdout E for sterr) for every
line of output
+ - archpath: print tla/Bazaar package names [tla | bazaar]
- bts: a command-line tool for manipulating the BTS [www-browser,
libwww-perl, mailx]
- checkbashisms: check whether a /bin/sh script contains any common
Index: Makefile
===================================================================
--- Makefile (revision 166)
+++ Makefile (working copy)
@@ -8,7 +8,7 @@
SH_FILES = cvs-debi.sh cvs-debrelease.sh debclean.sh debrelease.sh \
debrsign.sh debsign.sh dpkg-genbuilddeps.sh mergechanges.sh \
tagpending.sh uscan.sh uupdate.sh wnpp-alert.sh whodepends.sh \
- annotate.sh
+ annotate.sh archpath.sh
LIBS = libvfork.so.0
Index: archpath.1
===================================================================
--- archpath.1 (revision 0)
+++ archpath.1 (revision 0)
@@ -0,0 +1,63 @@
+.TH ARCHPATH 1 "Debian Utilities" "DEBIAN" \" -*- nroff -*-
+.SH NAME
+archpath \- output arch (tla/Bazaar) archive names, with support for branches
+.SH SYNOPSIS
+.B archpath
+.br
+.B archpath
+.I branch
+.br
+.B archpath
+.IR branch -- version
+.SH DESCRIPTION
+.B archpath
+is intended to be run in an arch (tla or Bazaar) working copy.
+.PP
+In its simplest usage,
+.B archpath
+with no parameters outputs the package name
+(archive/category--branch--version) associated with the working copy.
+.PP
+If a parameter is given, it may either be a branch--version, in which case
+.B archpath
+will output a corresponding package name in the current archive and
+category, or a plain branch name (without \(oq--\(dq), in which case
+.B archpath
+will output a corresponding package name in the current archive and
+category and with the same version as the current working copy.
+.PP
+This is useful for branching.
+For example, if you're using Bazaar and you want to create a branch for a
+new feature, you might use a command like this:
+.PP
+.RS
+.nf
+.ft CW
+baz branch $(archpath) $(archpath new-feature)
+.ft R
+.fi
+.RE
+.PP
+Or if you want to tag your current code onto a \(oqreleases\(cq branch as
+version 1.0, you might use a command like this:
+.PP
+.RS
+.nf
+.ft CW
+baz branch $(archpath) $(archpath releases--1.0)
+.ft R
+.fi
+.RE
+.PP
+That's much easier than using \(oqbaz tree-version\(cq to look up the
+package name and manually modifying the result.
+.SH AUTHOR
+.B archpath
+was written by
+.na
+Colin Watson <[EMAIL PROTECTED]>.
+.ad
+Like
+.BR archpath ,
+this manual page is released under the GNU General Public License,
+version 2 or later.
Index: archpath.sh
===================================================================
--- archpath.sh (revision 0)
+++ archpath.sh (revision 0)
@@ -0,0 +1,45 @@
+#! /bin/sh -e
+
+# Output arch (tla/Bazaar) archive names, with support for branches
+
+# Copyright (C) 2005 Colin Watson <[EMAIL PROTECTED]>
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Which arch implementation should we use?
+if type baz >/dev/null 2>&1; then
+ PROGRAM=baz
+else
+ PROGRAM=tla
+fi
+
+WANTED="$1"
+ME="$($PROGRAM tree-version)"
+
+if [ "$WANTED" ]; then
+ ARCHIVE="$($PROGRAM parse-package-name --arch "$ME")"
+ CATEGORY="$($PROGRAM parse-package-name --category "$ME")"
+ case $WANTED in
+ *--*)
+ echo "$ARCHIVE/$CATEGORY--$WANTED"
+ ;;
+ *)
+ VERSION="$($PROGRAM parse-package-name --vsn "$ME")"
+ echo "$ARCHIVE/$CATEGORY--$WANTED--$VERSION"
+ ;;
+ esac
+else
+ echo "$ME"
+fi
Property changes on: archpath.sh
___________________________________________________________________
Name: svn:executable
+ *
Index: README
===================================================================
--- README (revision 166)
+++ README (working copy)
@@ -20,6 +20,9 @@
- annotate: prepend time and stream (O for stdout E for sterr) for
every line of output
+- archpath: Prints arch (tla/Bazaar) package names. Also supports
+ calculating the package names for other branches.
+
- bts [www-browser, libwww-perl, mailx]: A command-line tool for
accessing the BTS, both to send mails to [EMAIL PROTECTED] and
to access the web pages of the BTS.