From 17936a0dc7d75eb1e93a37bcf5959f03add53c10 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Tue, 10 Dec 2013 11:43:01 +0000 Subject: Fix git-backup-on-error test This test didn't have the correct expected output. This commit corrects the expected output and amends the test so that it fails if there are no pack files in the test backup repo. --- tests/git-backup-on-error.script | 1 + tests/git-backup-on-error.stdout | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/tests/git-backup-on-error.script b/tests/git-backup-on-error.script index fbb3368..544a392 100755 --- a/tests/git-backup-on-error.script +++ b/tests/git-backup-on-error.script @@ -30,6 +30,7 @@ normalize() { DATETIMESPEC='[0-9]*-[0-9]*-[0-9]*-[0-9]*:[0-9]*:[0-9]*' sed -r -e "s|git-pre-update-$DATETIMESPEC|git-pre-update-DATETIME|g" \ -e "s|git-post-fail-$DATETIMESPEC|git-post-fail-DATETIME|g" \ + -e "s/pack-[0-9a-z]+\.(idx|pack)$/pack-file/" \ -e '/hooks\/.*\.sample/d' \ -e "s|$DATADIR|DATADIR|g" "$@" } diff --git a/tests/git-backup-on-error.stdout b/tests/git-backup-on-error.stdout index b284701..d918599 100644 --- a/tests/git-backup-on-error.stdout +++ b/tests/git-backup-on-error.stdout @@ -12,6 +12,11 @@ DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/info DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/info/exclude DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/info/refs DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/info +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/info/packs +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/pack +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/pack/pack-file DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/packed-refs DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/refs DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/refs/heads @@ -27,6 +32,11 @@ DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/info DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/info/exclude DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/info/refs DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/info +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/info/packs +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/pack +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/pack/pack-file DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/packed-refs DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/refs DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/refs/heads @@ -41,6 +51,11 @@ DATADIR/work-dir/git-backup-test-repo/git/info DATADIR/work-dir/git-backup-test-repo/git/info/exclude DATADIR/work-dir/git-backup-test-repo/git/info/refs DATADIR/work-dir/git-backup-test-repo/git/objects +DATADIR/work-dir/git-backup-test-repo/git/objects/info +DATADIR/work-dir/git-backup-test-repo/git/objects/info/packs +DATADIR/work-dir/git-backup-test-repo/git/objects/pack +DATADIR/work-dir/git-backup-test-repo/git/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git/objects/pack/pack-file DATADIR/work-dir/git-backup-test-repo/git/packed-refs DATADIR/work-dir/git-backup-test-repo/git/refs DATADIR/work-dir/git-backup-test-repo/git/refs/heads -- cgit v1.2.1 From c0be9a2dd38fa73e2b0f0958361fd3a1234d3f01 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Tue, 10 Dec 2013 17:46:57 +0000 Subject: Modify lorry backup behaviour and rename tests --- lorry | 51 ++++++++++++------- tests/git-backup-on-error-multiple-backups.script | 52 +++++++++++++++++++ tests/git-backup-on-error-multiple-backups.setup | 47 +++++++++++++++++ tests/git-backup-on-error-multiple-backups.stderr | 0 tests/git-backup-on-error-multiple-backups.stdout | 62 +++++++++++++++++++++++ tests/git-backup-on-error.script | 52 ------------------- tests/git-backup-on-error.setup | 47 ----------------- tests/git-backup-on-error.stderr | 0 tests/git-backup-on-error.stdout | 62 ----------------------- 9 files changed, 195 insertions(+), 178 deletions(-) create mode 100755 tests/git-backup-on-error-multiple-backups.script create mode 100755 tests/git-backup-on-error-multiple-backups.setup create mode 100644 tests/git-backup-on-error-multiple-backups.stderr create mode 100644 tests/git-backup-on-error-multiple-backups.stdout delete mode 100755 tests/git-backup-on-error.script delete mode 100755 tests/git-backup-on-error.setup delete mode 100644 tests/git-backup-on-error.stderr delete mode 100644 tests/git-backup-on-error.stdout diff --git a/lorry b/lorry index a48daf7..b941f4f 100755 --- a/lorry +++ b/lorry @@ -89,6 +89,9 @@ class Lorry(cliapp.Application): self.settings.string(['tarball-dest'], 'put created tarballs in TARBALLS', metavar='TARBALLS') + self.settings.boolean(['keep-multiple-backups'], + 'keep multiple (time-stamped) backups (disabled by default)', + default=False) def process_args(self, args): status = 0 @@ -189,7 +192,31 @@ class Lorry(cliapp.Application): if not os.path.exists(dirname): os.mkdir(dirname) gitdir = os.path.join(dirname, 'git') - backupdir = self.backup_gitdir(name, dirname, gitdir) + + time = datetime.now().strftime('%F-%T') + + pre_update_name = 'git-pre-update' + pre_update_backup_suffix = (pre_update_name + '-' + time + if self.settings['keep-multiple-backups'] else pre_update_name) + + pre_update_backup_dir = os.path.join(dirname, pre_update_backup_suffix) + + post_fail_name = 'git-post-fail' + post_fail_backup_suffix = (post_fail_name + '-' + time + if self.settings['keep-multiple-backups'] else post_fail_name) + + post_fail_backup_dir = os.path.join(dirname, post_fail_backup_suffix) + + if not self.settings['keep-multiple-backups']: + # remove previous backups if they exist + if os.path.exists(pre_update_backup_dir): + shutil.rmtree(pre_update_backup_dir) + + if os.path.exists(post_fail_backup_dir): + shutil.rmtree(post_fail_backup_dir) + + backupdir = self.backup_gitdir(name, gitdir, pre_update_backup_dir) + try: self.needs_aggressive = False table[vcstype](name, dirname, gitdir, spec) @@ -206,8 +233,8 @@ class Lorry(cliapp.Application): self.make_tarball(name, gitdir) except: if backupdir is not None: - faildir = self.save_failgit(name, dirname, gitdir) - self.restore_backup(name, dirname, gitdir, backupdir) + faildir = self.backup_gitdir(name, gitdir, post_fail_backup_dir) + self.restore_backup(name, backupdir, gitdir) self.output.write('Mirror of %s failed, state before mirror ' 'is saved at %s and state after mirror is ' 'saved at %s\n' % (name, backupdir, faildir)) @@ -226,7 +253,7 @@ class Lorry(cliapp.Application): self.progress('.. removing %s git repository backup' % name) shutil.rmtree(backupdir) - def restore_backup(self, name, dirname, gitdir, backupdir): + def restore_backup(self, name, backupdir, gitdir): self.progress('.. restoring %s good git repository' % name) dotgit = os.path.join(gitdir, '.git') if not os.path.exists(dotgit): @@ -234,23 +261,13 @@ class Lorry(cliapp.Application): shutil.rmtree(dotgit) self.copy_gitdir(backupdir, dotgit) - def save_failgit(self, name, dirname, gitdir): - self.progress('.. saving failed %s mirror git repository' % name) + def backup_gitdir(self, name, gitdir, backupdir): dotgit = os.path.join(gitdir, '.git') if not os.path.exists(dotgit): dotgit = gitdir - time = datetime.now().strftime('%F-%T') - backupdir = os.path.join(dirname, "git-post-fail-%s" % time) - return self.copy_gitdir(dotgit, backupdir) - def backup_gitdir(self, name, dirname, gitdir): - dotgit = os.path.join(gitdir, '.git') - if not os.path.exists(dotgit): - dotgit = gitdir - time = datetime.now().strftime('%F-%T') - backupdir = os.path.join(dirname, "git-pre-update-%s" % time) - self.progress('.. backing up %s git repository to %s' % - (name, backupdir)) + self.progress('.. backing up %s git repository to %s' % (name, backupdir)) + return self.copy_gitdir(dotgit, backupdir) def copy_gitdir(self, source, dest): diff --git a/tests/git-backup-on-error-multiple-backups.script b/tests/git-backup-on-error-multiple-backups.script new file mode 100755 index 0000000..8bda5ad --- /dev/null +++ b/tests/git-backup-on-error-multiple-backups.script @@ -0,0 +1,52 @@ +#!/bin/bash +# +# Tests when a git mirror fails that it keeps the backups around +# +# Copyright (C) 2012 Codethink Limited +# +# 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; version 2 of the License. +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +set -e +set -o pipefail + + +logfile="$DATADIR/git-backup-test-repo.log" +workdir="$DATADIR/work-dir" +repo="$DATADIR/git-backup-test-repo" + +normalize() { + DATETIMESPEC='[0-9]*-[0-9]*-[0-9]*-[0-9]*:[0-9]*:[0-9]*' + sed -r -e "s|git-pre-update-$DATETIMESPEC|git-pre-update-DATETIME|g" \ + -e "s|git-post-fail-$DATETIMESPEC|git-post-fail-DATETIME|g" \ + -e "s/pack-[0-9a-z]+\.(idx|pack)$/pack-file/" \ + -e '/hooks\/.*\.sample/d' \ + -e "s|$DATADIR|DATADIR|g" "$@" +} + +# mirror some history +"${SRCDIR}/test-lorry" --pull-only --log="$logfile" --working-area="$workdir" --bundle=never \ + "$DATADIR/git-backup-test-repo.lorry" | normalize + +# make upstream disappear to cause errors +rm -rf "$repo" +if "${SRCDIR}/test-lorry" --pull-only --log="$logfile" --working-area="$workdir" \ + "$DATADIR/git-backup-test-repo.lorry" --bundle=never 2>/dev/null \ + --keep-multiple-backups | normalize +then + echo Previous lorry command should have failed >&2 + exit 1 +else + find "$workdir/git-backup-test-repo" | LC_ALL=C sort | normalize +fi diff --git a/tests/git-backup-on-error-multiple-backups.setup b/tests/git-backup-on-error-multiple-backups.setup new file mode 100755 index 0000000..03a8dad --- /dev/null +++ b/tests/git-backup-on-error-multiple-backups.setup @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Creates a git repository with a single file and a single commit. +# +# Copyright (C) 2012 Codethink Limited +# +# 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; version 2 of the License. +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +set -e + +# create the repository +repo="$DATADIR/git-backup-test-repo" +mkdir "$repo" +cd "$repo" +git init --quiet + +# add the test file +echo "first line" > test.txt +git add test.txt + +# make a commit +git commit --quiet -m "first commit" + +# create the .lorry file for the repository +cat < $DATADIR/git-backup-test-repo.lorry +{ + "git-backup-test-repo": { + "type": "git", + "url": "file://$repo" + } +} +EOF + +# create the working directory +test -d "$DATADIR/work-dir" || mkdir "$DATADIR/work-dir" diff --git a/tests/git-backup-on-error-multiple-backups.stderr b/tests/git-backup-on-error-multiple-backups.stderr new file mode 100644 index 0000000..e69de29 diff --git a/tests/git-backup-on-error-multiple-backups.stdout b/tests/git-backup-on-error-multiple-backups.stdout new file mode 100644 index 0000000..d918599 --- /dev/null +++ b/tests/git-backup-on-error-multiple-backups.stdout @@ -0,0 +1,62 @@ +Mirror of git-backup-test-repo failed, state before mirror is saved at DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME and state after mirror is saved at DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME +DATADIR/work-dir/git-backup-test-repo +DATADIR/work-dir/git-backup-test-repo/git +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/FETCH_HEAD +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/HEAD +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/branches +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/config +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/description +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/hooks +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/info +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/info/exclude +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/info/refs +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/info +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/info/packs +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/pack +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/packed-refs +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/refs +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/refs/heads +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/refs/tags +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/FETCH_HEAD +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/HEAD +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/branches +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/config +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/description +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/hooks +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/info +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/info/exclude +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/info/refs +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/info +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/info/packs +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/pack +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/packed-refs +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/refs +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/refs/heads +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/refs/tags +DATADIR/work-dir/git-backup-test-repo/git/FETCH_HEAD +DATADIR/work-dir/git-backup-test-repo/git/HEAD +DATADIR/work-dir/git-backup-test-repo/git/branches +DATADIR/work-dir/git-backup-test-repo/git/config +DATADIR/work-dir/git-backup-test-repo/git/description +DATADIR/work-dir/git-backup-test-repo/git/hooks +DATADIR/work-dir/git-backup-test-repo/git/info +DATADIR/work-dir/git-backup-test-repo/git/info/exclude +DATADIR/work-dir/git-backup-test-repo/git/info/refs +DATADIR/work-dir/git-backup-test-repo/git/objects +DATADIR/work-dir/git-backup-test-repo/git/objects/info +DATADIR/work-dir/git-backup-test-repo/git/objects/info/packs +DATADIR/work-dir/git-backup-test-repo/git/objects/pack +DATADIR/work-dir/git-backup-test-repo/git/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git/packed-refs +DATADIR/work-dir/git-backup-test-repo/git/refs +DATADIR/work-dir/git-backup-test-repo/git/refs/heads +DATADIR/work-dir/git-backup-test-repo/git/refs/tags diff --git a/tests/git-backup-on-error.script b/tests/git-backup-on-error.script deleted file mode 100755 index 544a392..0000000 --- a/tests/git-backup-on-error.script +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# Tests when a git mirror fails that it keeps the backups around -# -# Copyright (C) 2012 Codethink Limited -# -# 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; version 2 of the License. -# -# 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., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - -set -e -set -o pipefail - - -logfile="$DATADIR/git-backup-test-repo.log" -workdir="$DATADIR/work-dir" -repo="$DATADIR/git-backup-test-repo" - -normalize() { - DATETIMESPEC='[0-9]*-[0-9]*-[0-9]*-[0-9]*:[0-9]*:[0-9]*' - sed -r -e "s|git-pre-update-$DATETIMESPEC|git-pre-update-DATETIME|g" \ - -e "s|git-post-fail-$DATETIMESPEC|git-post-fail-DATETIME|g" \ - -e "s/pack-[0-9a-z]+\.(idx|pack)$/pack-file/" \ - -e '/hooks\/.*\.sample/d' \ - -e "s|$DATADIR|DATADIR|g" "$@" -} - -# mirror some history -"${SRCDIR}/test-lorry" --pull-only --log="$logfile" --working-area="$workdir" --bundle=never \ - "$DATADIR/git-backup-test-repo.lorry" | normalize - -# make upstream disappear to cause errors -rm -rf "$repo" -if "${SRCDIR}/test-lorry" --pull-only --log="$logfile" --working-area="$workdir" \ - "$DATADIR/git-backup-test-repo.lorry" --bundle=never 2>/dev/null | \ - normalize -then - echo Previous lorry command should have failed >&2 - exit 1 -else - find "$workdir/git-backup-test-repo" | LC_ALL=C sort | normalize -fi diff --git a/tests/git-backup-on-error.setup b/tests/git-backup-on-error.setup deleted file mode 100755 index 03a8dad..0000000 --- a/tests/git-backup-on-error.setup +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# Creates a git repository with a single file and a single commit. -# -# Copyright (C) 2012 Codethink Limited -# -# 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; version 2 of the License. -# -# 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., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - -set -e - -# create the repository -repo="$DATADIR/git-backup-test-repo" -mkdir "$repo" -cd "$repo" -git init --quiet - -# add the test file -echo "first line" > test.txt -git add test.txt - -# make a commit -git commit --quiet -m "first commit" - -# create the .lorry file for the repository -cat < $DATADIR/git-backup-test-repo.lorry -{ - "git-backup-test-repo": { - "type": "git", - "url": "file://$repo" - } -} -EOF - -# create the working directory -test -d "$DATADIR/work-dir" || mkdir "$DATADIR/work-dir" diff --git a/tests/git-backup-on-error.stderr b/tests/git-backup-on-error.stderr deleted file mode 100644 index e69de29..0000000 diff --git a/tests/git-backup-on-error.stdout b/tests/git-backup-on-error.stdout deleted file mode 100644 index d918599..0000000 --- a/tests/git-backup-on-error.stdout +++ /dev/null @@ -1,62 +0,0 @@ -Mirror of git-backup-test-repo failed, state before mirror is saved at DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME and state after mirror is saved at DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME -DATADIR/work-dir/git-backup-test-repo -DATADIR/work-dir/git-backup-test-repo/git -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/FETCH_HEAD -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/HEAD -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/branches -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/config -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/description -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/hooks -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/info -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/info/exclude -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/info/refs -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/info -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/info/packs -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/pack -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/pack/pack-file -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/pack/pack-file -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/packed-refs -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/refs -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/refs/heads -DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/refs/tags -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/FETCH_HEAD -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/HEAD -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/branches -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/config -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/description -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/hooks -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/info -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/info/exclude -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/info/refs -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/info -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/info/packs -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/pack -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/pack/pack-file -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/pack/pack-file -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/packed-refs -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/refs -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/refs/heads -DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/refs/tags -DATADIR/work-dir/git-backup-test-repo/git/FETCH_HEAD -DATADIR/work-dir/git-backup-test-repo/git/HEAD -DATADIR/work-dir/git-backup-test-repo/git/branches -DATADIR/work-dir/git-backup-test-repo/git/config -DATADIR/work-dir/git-backup-test-repo/git/description -DATADIR/work-dir/git-backup-test-repo/git/hooks -DATADIR/work-dir/git-backup-test-repo/git/info -DATADIR/work-dir/git-backup-test-repo/git/info/exclude -DATADIR/work-dir/git-backup-test-repo/git/info/refs -DATADIR/work-dir/git-backup-test-repo/git/objects -DATADIR/work-dir/git-backup-test-repo/git/objects/info -DATADIR/work-dir/git-backup-test-repo/git/objects/info/packs -DATADIR/work-dir/git-backup-test-repo/git/objects/pack -DATADIR/work-dir/git-backup-test-repo/git/objects/pack/pack-file -DATADIR/work-dir/git-backup-test-repo/git/objects/pack/pack-file -DATADIR/work-dir/git-backup-test-repo/git/packed-refs -DATADIR/work-dir/git-backup-test-repo/git/refs -DATADIR/work-dir/git-backup-test-repo/git/refs/heads -DATADIR/work-dir/git-backup-test-repo/git/refs/tags -- cgit v1.2.1 From aa13f5347d3c4bdb7797e2a2f5b53f8101200375 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Tue, 10 Dec 2013 21:30:31 +0000 Subject: Add multi-backup tear down and single backup test --- .../git-backup-on-error-multiple-backups.teardown | 21 ++++++++ tests/git-backup-on-error-single-backup.script | 51 ++++++++++++++++++ tests/git-backup-on-error-single-backup.setup | 47 ++++++++++++++++ tests/git-backup-on-error-single-backup.stderr | 0 tests/git-backup-on-error-single-backup.stdout | 62 ++++++++++++++++++++++ tests/git-backup-on-error-single-backup.teardown | 21 ++++++++ 6 files changed, 202 insertions(+) create mode 100755 tests/git-backup-on-error-multiple-backups.teardown create mode 100755 tests/git-backup-on-error-single-backup.script create mode 100755 tests/git-backup-on-error-single-backup.setup create mode 100644 tests/git-backup-on-error-single-backup.stderr create mode 100644 tests/git-backup-on-error-single-backup.stdout create mode 100755 tests/git-backup-on-error-single-backup.teardown diff --git a/tests/git-backup-on-error-multiple-backups.teardown b/tests/git-backup-on-error-multiple-backups.teardown new file mode 100755 index 0000000..7c73c04 --- /dev/null +++ b/tests/git-backup-on-error-multiple-backups.teardown @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Tests when a git mirror fails that it keeps the backups around +# +# Copyright (C) 2012 Codethink Limited +# +# 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; version 2 of the License. +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +rm -r "$DATADIR/git-backup-test-repo.log" "$DATADIR/work-dir" diff --git a/tests/git-backup-on-error-single-backup.script b/tests/git-backup-on-error-single-backup.script new file mode 100755 index 0000000..f721461 --- /dev/null +++ b/tests/git-backup-on-error-single-backup.script @@ -0,0 +1,51 @@ +#!/bin/bash +# +# Tests when a git mirror fails that it keeps the backups around +# +# Copyright (C) 2012 Codethink Limited +# +# 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; version 2 of the License. +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +set -e +set -o pipefail + +repo_name="git-backup-test-repo" +logfile="$DATADIR/$repo_name.log" +workdir="$DATADIR/work-dir" +repo="$DATADIR/$repo_name" +prebackup="$workdir/$repo_name/git-pre-update" +postbackup="$workdir/$repo_name/git-post-fail" + +normalize() { + sed -r -e '/hooks\/.*\.sample/d' \ + -e "s/pack-[0-9a-z]+\.(idx|pack)$/pack-file/" \ + -e "s|$DATADIR|DATADIR|g" "$@" +} + +# mirror some history +"${SRCDIR}/test-lorry" --pull-only --log="$logfile" --working-area="$workdir" --bundle=never \ + "$DATADIR/git-backup-test-repo.lorry" | normalize + +# make upstream disappear to cause errors +rm -rf "$repo" +if "${SRCDIR}/test-lorry" --pull-only --log="$logfile" --working-area="$workdir" \ + "$DATADIR/git-backup-test-repo.lorry" --bundle=never 2>/dev/null \ + | normalize +then + echo Previous lorry command should have failed >&2 + exit 1 +else + find "$workdir/git-backup-test-repo" | LC_ALL=C sort | normalize +fi diff --git a/tests/git-backup-on-error-single-backup.setup b/tests/git-backup-on-error-single-backup.setup new file mode 100755 index 0000000..81c0a49 --- /dev/null +++ b/tests/git-backup-on-error-single-backup.setup @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Creates a git repository with a single file and a single commit. +# +# Copyright (C) 2012 Codethink Limited +# +# 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; version 2 of the License. +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +set -e + +# create the repository +repo="$DATADIR/git-backup-test-repo" +mkdir "$repo" +cd "$repo" +git init --quiet + +# add the test file +echo "first line" > test.txt +git add test.txt + +# make a commit +git commit --quiet -m "first commit" + +# create the .lorry file for the repository +cat < $DATADIR/git-backup-test-repo.lorry +{ + "git-backup-test-repo": { + "type": "git", + "url": "file://$repo" + } +} +EOF + +# create the working directory +test -d "$DATADIR/work-dir" || mkdir "$DATADIR/work-dir" diff --git a/tests/git-backup-on-error-single-backup.stderr b/tests/git-backup-on-error-single-backup.stderr new file mode 100644 index 0000000..e69de29 diff --git a/tests/git-backup-on-error-single-backup.stdout b/tests/git-backup-on-error-single-backup.stdout new file mode 100644 index 0000000..db622ef --- /dev/null +++ b/tests/git-backup-on-error-single-backup.stdout @@ -0,0 +1,62 @@ +Mirror of git-backup-test-repo failed, state before mirror is saved at DATADIR/work-dir/git-backup-test-repo/git-pre-update and state after mirror is saved at DATADIR/work-dir/git-backup-test-repo/git-post-fail +DATADIR/work-dir/git-backup-test-repo +DATADIR/work-dir/git-backup-test-repo/git +DATADIR/work-dir/git-backup-test-repo/git-post-fail +DATADIR/work-dir/git-backup-test-repo/git-post-fail/FETCH_HEAD +DATADIR/work-dir/git-backup-test-repo/git-post-fail/HEAD +DATADIR/work-dir/git-backup-test-repo/git-post-fail/branches +DATADIR/work-dir/git-backup-test-repo/git-post-fail/config +DATADIR/work-dir/git-backup-test-repo/git-post-fail/description +DATADIR/work-dir/git-backup-test-repo/git-post-fail/hooks +DATADIR/work-dir/git-backup-test-repo/git-post-fail/info +DATADIR/work-dir/git-backup-test-repo/git-post-fail/info/exclude +DATADIR/work-dir/git-backup-test-repo/git-post-fail/info/refs +DATADIR/work-dir/git-backup-test-repo/git-post-fail/objects +DATADIR/work-dir/git-backup-test-repo/git-post-fail/objects/info +DATADIR/work-dir/git-backup-test-repo/git-post-fail/objects/info/packs +DATADIR/work-dir/git-backup-test-repo/git-post-fail/objects/pack +DATADIR/work-dir/git-backup-test-repo/git-post-fail/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git-post-fail/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git-post-fail/packed-refs +DATADIR/work-dir/git-backup-test-repo/git-post-fail/refs +DATADIR/work-dir/git-backup-test-repo/git-post-fail/refs/heads +DATADIR/work-dir/git-backup-test-repo/git-post-fail/refs/tags +DATADIR/work-dir/git-backup-test-repo/git-pre-update +DATADIR/work-dir/git-backup-test-repo/git-pre-update/FETCH_HEAD +DATADIR/work-dir/git-backup-test-repo/git-pre-update/HEAD +DATADIR/work-dir/git-backup-test-repo/git-pre-update/branches +DATADIR/work-dir/git-backup-test-repo/git-pre-update/config +DATADIR/work-dir/git-backup-test-repo/git-pre-update/description +DATADIR/work-dir/git-backup-test-repo/git-pre-update/hooks +DATADIR/work-dir/git-backup-test-repo/git-pre-update/info +DATADIR/work-dir/git-backup-test-repo/git-pre-update/info/exclude +DATADIR/work-dir/git-backup-test-repo/git-pre-update/info/refs +DATADIR/work-dir/git-backup-test-repo/git-pre-update/objects +DATADIR/work-dir/git-backup-test-repo/git-pre-update/objects/info +DATADIR/work-dir/git-backup-test-repo/git-pre-update/objects/info/packs +DATADIR/work-dir/git-backup-test-repo/git-pre-update/objects/pack +DATADIR/work-dir/git-backup-test-repo/git-pre-update/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git-pre-update/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git-pre-update/packed-refs +DATADIR/work-dir/git-backup-test-repo/git-pre-update/refs +DATADIR/work-dir/git-backup-test-repo/git-pre-update/refs/heads +DATADIR/work-dir/git-backup-test-repo/git-pre-update/refs/tags +DATADIR/work-dir/git-backup-test-repo/git/FETCH_HEAD +DATADIR/work-dir/git-backup-test-repo/git/HEAD +DATADIR/work-dir/git-backup-test-repo/git/branches +DATADIR/work-dir/git-backup-test-repo/git/config +DATADIR/work-dir/git-backup-test-repo/git/description +DATADIR/work-dir/git-backup-test-repo/git/hooks +DATADIR/work-dir/git-backup-test-repo/git/info +DATADIR/work-dir/git-backup-test-repo/git/info/exclude +DATADIR/work-dir/git-backup-test-repo/git/info/refs +DATADIR/work-dir/git-backup-test-repo/git/objects +DATADIR/work-dir/git-backup-test-repo/git/objects/info +DATADIR/work-dir/git-backup-test-repo/git/objects/info/packs +DATADIR/work-dir/git-backup-test-repo/git/objects/pack +DATADIR/work-dir/git-backup-test-repo/git/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git/packed-refs +DATADIR/work-dir/git-backup-test-repo/git/refs +DATADIR/work-dir/git-backup-test-repo/git/refs/heads +DATADIR/work-dir/git-backup-test-repo/git/refs/tags diff --git a/tests/git-backup-on-error-single-backup.teardown b/tests/git-backup-on-error-single-backup.teardown new file mode 100755 index 0000000..7c73c04 --- /dev/null +++ b/tests/git-backup-on-error-single-backup.teardown @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Tests when a git mirror fails that it keeps the backups around +# +# Copyright (C) 2012 Codethink Limited +# +# 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; version 2 of the License. +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +rm -r "$DATADIR/git-backup-test-repo.log" "$DATADIR/work-dir" -- cgit v1.2.1 From 7d1e928ec4fad95ba0293d68803f7a4c7b833c3c Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Fri, 13 Dec 2013 15:58:13 +0000 Subject: Add test: existing backup is removed by default --- ...error-single-backup-is-removed-if-exists.script | 43 ++++++++++++++++++++ ...-error-single-backup-is-removed-if-exists.setup | 47 ++++++++++++++++++++++ ...ror-single-backup-is-removed-if-exists.teardown | 21 ++++++++++ 3 files changed, 111 insertions(+) create mode 100755 tests/git-backup-on-error-single-backup-is-removed-if-exists.script create mode 100755 tests/git-backup-on-error-single-backup-is-removed-if-exists.setup create mode 100755 tests/git-backup-on-error-single-backup-is-removed-if-exists.teardown diff --git a/tests/git-backup-on-error-single-backup-is-removed-if-exists.script b/tests/git-backup-on-error-single-backup-is-removed-if-exists.script new file mode 100755 index 0000000..2730003 --- /dev/null +++ b/tests/git-backup-on-error-single-backup-is-removed-if-exists.script @@ -0,0 +1,43 @@ +#!/bin/bash +# +# Tests when a git mirror fails that it keeps the backups around +# +# Copyright (C) 2012 Codethink Limited +# +# 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; version 2 of the License. +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +set -e +set -o pipefail + +repo_name="git-backup-test-repo" +logfile="$DATADIR/$repo_name.log" +workdir="$DATADIR/work-dir" +repo="$DATADIR/$repo_name" +prebackup="$workdir/$repo_name/git-pre-update" +postbackup="$workdir/$repo_name/git-post-fail" + +# create backup dirs +#(lorry must not fail to make a new backup if backup dirs already exist) +mkdir -p "$prebackup" "$postbackup" + +# mirror some history +"${SRCDIR}/test-lorry" --pull-only --log="$logfile" --working-area="$workdir" --bundle=never \ + "$DATADIR/git-backup-test-repo.lorry" + +if [ -e "$prebackup" ] || [ -e "$postbackup" ] +then + echo "Lorry should remove existing backup directories" >&2 + exit 1 +fi diff --git a/tests/git-backup-on-error-single-backup-is-removed-if-exists.setup b/tests/git-backup-on-error-single-backup-is-removed-if-exists.setup new file mode 100755 index 0000000..81c0a49 --- /dev/null +++ b/tests/git-backup-on-error-single-backup-is-removed-if-exists.setup @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Creates a git repository with a single file and a single commit. +# +# Copyright (C) 2012 Codethink Limited +# +# 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; version 2 of the License. +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +set -e + +# create the repository +repo="$DATADIR/git-backup-test-repo" +mkdir "$repo" +cd "$repo" +git init --quiet + +# add the test file +echo "first line" > test.txt +git add test.txt + +# make a commit +git commit --quiet -m "first commit" + +# create the .lorry file for the repository +cat < $DATADIR/git-backup-test-repo.lorry +{ + "git-backup-test-repo": { + "type": "git", + "url": "file://$repo" + } +} +EOF + +# create the working directory +test -d "$DATADIR/work-dir" || mkdir "$DATADIR/work-dir" diff --git a/tests/git-backup-on-error-single-backup-is-removed-if-exists.teardown b/tests/git-backup-on-error-single-backup-is-removed-if-exists.teardown new file mode 100755 index 0000000..7c73c04 --- /dev/null +++ b/tests/git-backup-on-error-single-backup-is-removed-if-exists.teardown @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Tests when a git mirror fails that it keeps the backups around +# +# Copyright (C) 2012 Codethink Limited +# +# 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; version 2 of the License. +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +rm -r "$DATADIR/git-backup-test-repo.log" "$DATADIR/work-dir" -- cgit v1.2.1 From 5f5435647ada1d0ef612552e1ecacfbafc71543e Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Tue, 17 Dec 2013 10:11:58 +0000 Subject: Update copyright notices --- README | 2 +- check | 2 +- lorry | 2 +- lorry.1.in | 2 +- setup.py | 2 +- tests/bzr-single-commit.script | 2 +- tests/bzr-single-commit.setup | 2 +- tests/cvs-single-commit.script | 2 +- tests/cvs-single-commit.setup | 2 +- tests/git-backup-on-error-multiple-backups.script | 2 +- tests/git-backup-on-error-multiple-backups.setup | 2 +- tests/git-backup-on-error-multiple-backups.teardown | 2 +- tests/git-backup-on-error-single-backup-is-removed-if-exists.script | 2 +- tests/git-backup-on-error-single-backup-is-removed-if-exists.setup | 2 +- tests/git-backup-on-error-single-backup-is-removed-if-exists.teardown | 2 +- tests/git-backup-on-error-single-backup.script | 2 +- tests/git-backup-on-error-single-backup.setup | 2 +- tests/git-backup-on-error-single-backup.teardown | 2 +- tests/git-single-commit.script | 2 +- tests/git-single-commit.setup | 2 +- tests/hg-single-commit.script | 2 +- tests/hg-single-commit.setup | 2 +- tests/make-tarball.script | 2 +- tests/make-tarball.setup | 2 +- tests/no-pushspec-pushall.script | 2 +- tests/pushspecs-only.script | 2 +- tests/setup_once | 2 +- tests/svn-single-commit.script | 2 +- tests/svn-single-commit.setup | 2 +- tests/tar-single-commit.script | 2 +- tests/tar-single-commit.setup | 2 +- 31 files changed, 31 insertions(+), 31 deletions(-) diff --git a/README b/README index 0241532..07b43bf 100644 --- a/README +++ b/README @@ -215,7 +215,7 @@ Tips Legal stuff ----------- -Copyright (C) 2011, 2012 Codethink Limited +Copyright (C) 2013 Codethink Limited 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 diff --git a/check b/check index 2b27ade..53039a4 100755 --- a/check +++ b/check @@ -2,7 +2,7 @@ # # Run test suite for lorry. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/lorry b/lorry index b941f4f..03041ad 100755 --- a/lorry +++ b/lorry @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright (C) 2011 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/lorry.1.in b/lorry.1.in index d474ac9..5d24dd6 100644 --- a/lorry.1.in +++ b/lorry.1.in @@ -1,4 +1,4 @@ -.\" Copyright (C) 2011 Codethink Limited +.\" Copyright (C) 2013 Codethink Limited .\" .\" 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 diff --git a/setup.py b/setup.py index 63bd431..811c727 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2011, 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/bzr-single-commit.script b/tests/bzr-single-commit.script index 9b38552..7de3d0a 100755 --- a/tests/bzr-single-commit.script +++ b/tests/bzr-single-commit.script @@ -2,7 +2,7 @@ # # Tests converting a simple bzr repository to git. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/bzr-single-commit.setup b/tests/bzr-single-commit.setup index 1e966c8..dcd70cf 100755 --- a/tests/bzr-single-commit.setup +++ b/tests/bzr-single-commit.setup @@ -2,7 +2,7 @@ # # Creates a bzr repository with a single file and a single commit. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/cvs-single-commit.script b/tests/cvs-single-commit.script index 4ce2587..56dd280 100755 --- a/tests/cvs-single-commit.script +++ b/tests/cvs-single-commit.script @@ -2,7 +2,7 @@ # # Tests converting a simple CVS repository to git. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/cvs-single-commit.setup b/tests/cvs-single-commit.setup index 537de81..0fb4d3a 100755 --- a/tests/cvs-single-commit.setup +++ b/tests/cvs-single-commit.setup @@ -2,7 +2,7 @@ # # Creates a CVS repository with a single file and a single commit. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/git-backup-on-error-multiple-backups.script b/tests/git-backup-on-error-multiple-backups.script index 8bda5ad..bcc165b 100755 --- a/tests/git-backup-on-error-multiple-backups.script +++ b/tests/git-backup-on-error-multiple-backups.script @@ -2,7 +2,7 @@ # # Tests when a git mirror fails that it keeps the backups around # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/git-backup-on-error-multiple-backups.setup b/tests/git-backup-on-error-multiple-backups.setup index 03a8dad..692223a 100755 --- a/tests/git-backup-on-error-multiple-backups.setup +++ b/tests/git-backup-on-error-multiple-backups.setup @@ -2,7 +2,7 @@ # # Creates a git repository with a single file and a single commit. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/git-backup-on-error-multiple-backups.teardown b/tests/git-backup-on-error-multiple-backups.teardown index 7c73c04..7627f88 100755 --- a/tests/git-backup-on-error-multiple-backups.teardown +++ b/tests/git-backup-on-error-multiple-backups.teardown @@ -2,7 +2,7 @@ # # Tests when a git mirror fails that it keeps the backups around # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/git-backup-on-error-single-backup-is-removed-if-exists.script b/tests/git-backup-on-error-single-backup-is-removed-if-exists.script index 2730003..61e1535 100755 --- a/tests/git-backup-on-error-single-backup-is-removed-if-exists.script +++ b/tests/git-backup-on-error-single-backup-is-removed-if-exists.script @@ -2,7 +2,7 @@ # # Tests when a git mirror fails that it keeps the backups around # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/git-backup-on-error-single-backup-is-removed-if-exists.setup b/tests/git-backup-on-error-single-backup-is-removed-if-exists.setup index 81c0a49..fa312c3 100755 --- a/tests/git-backup-on-error-single-backup-is-removed-if-exists.setup +++ b/tests/git-backup-on-error-single-backup-is-removed-if-exists.setup @@ -2,7 +2,7 @@ # # Creates a git repository with a single file and a single commit. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/git-backup-on-error-single-backup-is-removed-if-exists.teardown b/tests/git-backup-on-error-single-backup-is-removed-if-exists.teardown index 7c73c04..7627f88 100755 --- a/tests/git-backup-on-error-single-backup-is-removed-if-exists.teardown +++ b/tests/git-backup-on-error-single-backup-is-removed-if-exists.teardown @@ -2,7 +2,7 @@ # # Tests when a git mirror fails that it keeps the backups around # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/git-backup-on-error-single-backup.script b/tests/git-backup-on-error-single-backup.script index f721461..23d0f36 100755 --- a/tests/git-backup-on-error-single-backup.script +++ b/tests/git-backup-on-error-single-backup.script @@ -2,7 +2,7 @@ # # Tests when a git mirror fails that it keeps the backups around # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/git-backup-on-error-single-backup.setup b/tests/git-backup-on-error-single-backup.setup index 81c0a49..fa312c3 100755 --- a/tests/git-backup-on-error-single-backup.setup +++ b/tests/git-backup-on-error-single-backup.setup @@ -2,7 +2,7 @@ # # Creates a git repository with a single file and a single commit. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/git-backup-on-error-single-backup.teardown b/tests/git-backup-on-error-single-backup.teardown index 7c73c04..7627f88 100755 --- a/tests/git-backup-on-error-single-backup.teardown +++ b/tests/git-backup-on-error-single-backup.teardown @@ -2,7 +2,7 @@ # # Tests when a git mirror fails that it keeps the backups around # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/git-single-commit.script b/tests/git-single-commit.script index 7a980b2..87a66a7 100755 --- a/tests/git-single-commit.script +++ b/tests/git-single-commit.script @@ -2,7 +2,7 @@ # # Tests converting a simple git repository to git. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/git-single-commit.setup b/tests/git-single-commit.setup index f93884d..e2bb255 100755 --- a/tests/git-single-commit.setup +++ b/tests/git-single-commit.setup @@ -2,7 +2,7 @@ # # Creates a git repository with a single file and a single commit. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/hg-single-commit.script b/tests/hg-single-commit.script index e9814b9..1ce3919 100755 --- a/tests/hg-single-commit.script +++ b/tests/hg-single-commit.script @@ -2,7 +2,7 @@ # # Tests converting a simple hg repository to hg. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/hg-single-commit.setup b/tests/hg-single-commit.setup index a50284f..eb8ce7f 100755 --- a/tests/hg-single-commit.setup +++ b/tests/hg-single-commit.setup @@ -2,7 +2,7 @@ # # Creates a hg repository with a single file and a single commit. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/make-tarball.script b/tests/make-tarball.script index 95eacaa..7a25e01 100755 --- a/tests/make-tarball.script +++ b/tests/make-tarball.script @@ -2,7 +2,7 @@ # # Test that we can create a tarball of the git trees. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/make-tarball.setup b/tests/make-tarball.setup index 2032610..76f751c 100755 --- a/tests/make-tarball.setup +++ b/tests/make-tarball.setup @@ -2,7 +2,7 @@ # # Creates gzip/bzip2/lzma tarballs, each with a single file. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/no-pushspec-pushall.script b/tests/no-pushspec-pushall.script index a649122..a1956ce 100755 --- a/tests/no-pushspec-pushall.script +++ b/tests/no-pushspec-pushall.script @@ -2,7 +2,7 @@ # # Tests that all refs are pushed if no push-refspecs are given # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/pushspecs-only.script b/tests/pushspecs-only.script index 80aa8de..989a936 100755 --- a/tests/pushspecs-only.script +++ b/tests/pushspecs-only.script @@ -2,7 +2,7 @@ # # Tests that only the specified refs are pushed # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/setup_once b/tests/setup_once index ec039b7..d2605ad 100755 --- a/tests/setup_once +++ b/tests/setup_once @@ -2,7 +2,7 @@ # # Create an upstream git repository with multiple branches and tags # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/svn-single-commit.script b/tests/svn-single-commit.script index 32a9cca..89da06d 100755 --- a/tests/svn-single-commit.script +++ b/tests/svn-single-commit.script @@ -2,7 +2,7 @@ # # Tests converting a simple SVN repository to git. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/svn-single-commit.setup b/tests/svn-single-commit.setup index 182f0e5..00c1838 100755 --- a/tests/svn-single-commit.setup +++ b/tests/svn-single-commit.setup @@ -2,7 +2,7 @@ # # Creates an SVN repository with a single file and a single commit. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/tar-single-commit.script b/tests/tar-single-commit.script index 1562446..098a1a5 100755 --- a/tests/tar-single-commit.script +++ b/tests/tar-single-commit.script @@ -2,7 +2,7 @@ # # Tests converting tarballs into to git repositories. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 diff --git a/tests/tar-single-commit.setup b/tests/tar-single-commit.setup index bfc99f8..d520a94 100755 --- a/tests/tar-single-commit.setup +++ b/tests/tar-single-commit.setup @@ -2,7 +2,7 @@ # # Creates gzip/bzip2/lzma tarballs, each with a single file. # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2013 Codethink Limited # # 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 -- cgit v1.2.1