diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-28 21:58:15 -0500 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-08-13 21:09:15 +0200 |
commit | f20e043dae4e8a465855d7a861c50e6fb28c303e (patch) | |
tree | 354de743dbcda652c274bc1f76876258abc3875f | |
parent | c26ba3ccee6700bc0be0031df959d96918f7800f (diff) |
db-move: remove one svn commit per package
Precondition: trunk/ directory never has any subdirectories. This is
true across our entire svn-packages repository, although I did not check
svn-community. The following command was used:
find -mindepth 3 -type d ! -wholename '*/.svn*' -wholename *trunk*
This should really help a variety of things- reduce the number of
commits, reduce the number of emails to arch-commits, make mass package
moves faster, etc.
The entire dbscripts test suite still passes after this change.
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
-rwxr-xr-x | db-move | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -78,11 +78,18 @@ for pkgbase in ${args[@]:2}; do pkgver=$(. "${svnrepo_from}/PKGBUILD"; echo $(get_full_version ${epoch:-0} ${pkgver} ${pkgrel})) if [ -d "${svnrepo_to}" ]; then - /usr/bin/svn rm --force -q "${svnrepo_to}" - /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "$(basename $0): ${pkgbase} removed by $(id -un) for move to [${repo_to}] (${pkgarch})" + for file in $(svn ls "${svnrepo_to}"); do + svn rm -q "$file" + done + else + mkdir "${svnrepo_to}" + svn add "${svnrepo_to}" fi - /usr/bin/svn mv -q -r HEAD "${svnrepo_from}" "${svnrepo_to}" + for file in $(svn ls "${svnrepo_from}"); do + svn mv -q -r HEAD "${svnrepo_from}/$file" "${svnrepo_to}/" + done + /usr/bin/svn rm --force -q "${svnrepo_from}" /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "$(basename $0): moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${pkgarch})" for pkgname in ${pkgnames[@]}; do |