From fda394f1a054e58f146e942b5971944e562583a0 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 10 Jun 2012 11:35:39 +0200 Subject: Gracefully handle files containing an "@" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "@" sign in file names in SVN marks the beginning of a pegged version number -- from the Subversion book: Peg revisions are specified to the Subversion command-line client using at syntax, so called because the syntax involves appending an “at sign” (@) and the peg revision to the end of the path with which the revision is associated. The trivial workaround is to always append an at sign to the end of the path in the version control checks. Before: $ community-stagingpkg 'Add systemd units.' ==> ERROR: exim-submission@.service is not under version control $ svn status -v | grep 'exim-submission@.service' A - ? ? exim-submission@.service After: $ community-stagingpkg 'Add systemd units.' ==> Committing changes to trunk...done ==> Signing package exim-4.80-2-x86_64.pkg.tar.xz... [...] Signed-off-by: Lukas Fleischer Signed-off-by: Pierre Schmitz --- archrelease.in | 3 +++ commitpkg.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/archrelease.in b/archrelease.in index 5bc2c90..533a547 100644 --- a/archrelease.in +++ b/archrelease.in @@ -54,6 +54,9 @@ for file in "${known_files[@]}"; do fi done +# gracefully handle files containing an "@" character +known_files=("${known_files[@]/%/@}") + for tag in "$@"; do stat_busy "Copying ${trunk} to ${tag}" diff --git a/commitpkg.in b/commitpkg.in index b5cf043..8b87426 100644 --- a/commitpkg.in +++ b/commitpkg.in @@ -57,7 +57,7 @@ esac # check if all local source files are under version control for s in "${source[@]}"; do - if [[ $s != *://* ]] && ! svn status -v "$s" | grep -q '^[ AMRX~]'; then + if [[ $s != *://* ]] && ! svn status -v "$s@" | grep -q '^[ AMRX~]'; then die "$s is not under version control" fi done -- cgit v1.2.3-70-g09d2