| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Created two tests for the creation of appropriate local git repos
from folders of raw files.
1. One raw file. Verify that the desired form of the .lorry file creates
a corresponding git repo with the correct relative paths.
2. Multiple raw files. Verify all the above, plus the additon of all raw
files and the updating of the realtive paths upon changes of the .lorry
file.
|
|
|
|
|
| |
Use tarball-dest since test is checking creation works, not default
location behaviour
|
| |
|
| |
|
|
|
|
|
| |
This currently fails because git cvsimport doesn't really work with
bare repositories.
|
|
|
|
|
|
|
|
|
| |
git cvsimport uses cvsps, which creates state files under ~/.cvsps.
This means the cache may become inconsistent with the git repository.
I observed this to happen when adding a second test case for cvs
conversion.
Set $HOME to the git directory so that this doesn't happen.
|
|
|
|
|
| |
Redirecting lorry's stderr to /dev/null just makes test failures
harder to debug. Only do that when we expect it to fail.
|
|
|
|
|
|
|
|
|
|
| |
Some tests have a teardown script that removes their temporary files,
but most do not.
To avoid interference or dependencies between tests, use a global
teardown script that removes almost everything in $DATADIR. It
excludes git-upstream, which is intentionally set up once and read by
multiple tests.
|
|
|
|
|
|
|
|
|
|
| |
These will currently fail:
* gitify_cvs creates non-bare repositories
* gitify_svn creates non-bare repositories and changes them to bare,
but leaves ref-logs enabled
Related to #12.
|
| |
|
|
|
|
|
| |
Make sure migration of existing working directories to the A/B scheme
works properly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lorry currently updates a git repository in its working area like this:
1. Delete old backup and debug repositories
2. Copy active repository (git) to backup (git-pre-update)
3. Perform conversion in active repository
4. If conversion failed, restore the backup:
1. Copy active repository to debug (git-post-fail)
2. Delete active repository
3. Copy backup repository to active
5. If conversion succeeded: delete git-pre-update
If step 3 or 4 is interrupted, for example because of a system reboot,
the active repository may be left missing or broken. On the next
update, the backup will be deleted.
Replace this with the following process:
1. Look for repositories 'git-a' and 'git-b'. The one with a higher
update count (or the only one that exists and has an update count
file) is the active repository. The other is the the temporary
repository. In case neither exists, 'git-a' is the temporary
repository.
2. Delete old temporary repository, if it exists
3. Copy active repository, if it exists, to temporary repository
(excluding the update count file)
4. Perform conversion in temporary repository
5. If conversion succeeded, make the temporary repository active by
writing the new update count file
6. If conversion failed, move the temporary repository to debug as
before
We need to migrate the working state, so if there is a 'git' and no
'git-a', add an update count of 1 to 'git' and move it to 'git-a'.
Also delete the old-style backup repository.
Update test cases to expect the new filenames.
lorry should now be crash-proof, in the sense that killing it at any
point will leave the last successful update in place. However, an
unclean system shutdown (e.g. kernel crash) that does not flush all
writes to persistent storage may still result in the active repository
being left broken.
Closes: #8.
|
|
|
|
|
|
|
|
|
|
| |
Logging each pruned commit can result in very long logs for some
repositories. This is a problem for Lorry Controller because job
status updates result in copying the entire log and not just the new
log lines.
There's not much value in listing all the commit hashes, so log the
number of commits instead. Update the test case accordingly.
|
|
|
|
|
|
| |
Test that we can cope with conversion of unnamed heads now.
Related to #7.
|
|
|
|
|
| |
Also add a teardown script for hg-single-commit so these two don't
get in each other's way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cvs-single-commit test actually involves two commits: one made by
'cvs init', and another by 'cvs commit'. Occasionally these commit
appear in the wrong order in the git repository, apparently because
they ended up with the same timestamp.
This seems to be a similar issue to
<https://bugs.launchpad.net/ubuntu/+source/cvs/+bug/12230>, which has
a workaround (a 20 ms sleep after checkout). However, this issue is
not readily reproducible - I had to use libfaketime to do it - and I
can't tell whether that will work for us.
Instead, add a 1 second sleep after checkout.
Closes #6.
|
|
|
|
|
| |
* lorry.gzip-importer was missing a copyright notice
* Various changes were not included in the copyright dates
|
|
|
|
|
|
| |
This mostly reverts commit 5f5435647ada "Update copyright notices",
which changed all copyright dates to 2013. Most files were added in
2011 and 2012.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original Bazaar implementation (bzr) only runs on Python 2, but
there is a fork known as Breezy (brz) that has been ported to Python 3.
To support environments without Python 2, allow using Breezy:
* Add a setting 'bazaar-command' that specifies which command to run
* Set the default based on a path search, preferring 'bzr' but using
'brz' if only 'brz' is found
* Implement a similar fallback in the test setup for Bazaar import
* Update README to mention Breezy as an alternative. The
'fastimport' extension is included in it rather than being a
separate package.
Closes #3.
|
|
|
|
|
|
| |
When comparing the repository file list with the expected list, ignore
objects/pack/pack-*.bitmap (created by default since 2.22) and
objects/info/commit-graph (created by default since 2.24).
|
|
|
|
|
|
|
| |
Any extended headers present (such as those created by bsd tar)
should be ignored.
Change-Id: Ic1c0831c349fc7192892fbf487427dac3b320366
|
|
|
|
| |
Change-Id: I8158e53ff64e7ed68e469971b15ba78b0d5fef1c
|
|
|
|
|
|
|
|
| |
Add a fake mirror-base-url-fetch for running make-tarball test.
This was broken because if mirror-base-url-fetch is empty
lorry avoids to create the bundle and the tar file.
Change-Id: I606226fb26739a366641b8f3ac9c9969860abcb0
|
|
|
|
|
| |
The 'compression' and 'strip' fields seem to have been obsolete since
commit a7f8b1b63a97c66aea6f39342313d7a5b919cfa7 in 2012.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
git://git.baserock.org/baserock/lorry
Includes a fixup of quoting uses of $SRCDIR, so it may include
paths with spaces.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Git has a garbage collection 'porcelain' command called 'gc' which does more
than just repack the repository. Use that in preference to 'git repack' and
also configure the repositories so that they don't use too much RAM whilst
repacking.
Also, we allow gitify_* routines to set self.needs_aggressive on their initial
imports so that we aggressively repack the first clone.
|
|/
|
|
|
|
|
|
| |
This patch makes Lorry always create bare repositories where it can (Note that
it cannot for CVS imports) and to create tarballs of bare repositories (if not
disabled) which will be more efficient than bundles for creation and cloning.
We may be able to disable bundles later.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Changing from gitorious to gitano showed that it generates a bundle.
This causes the test to produce different output, so is deemed a
failure.
|
|
|
|
|
| |
As annoying as it is to have non-fast-forward commits, it is still
a valid workflow, so it has to be allowed.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
If refspecs are listed, pass them to push_to_mirror_server, if not
allow push_to_mirror_server to use its default refspecs
Also fix test cases:
- refs/tags/rc* is not a valid refspec,
* can only substitute a whole directory
- git-for-each-ref needs the whole ref path, master is not the
same as refs/heads/master
|
|
|
|
|
|
|
|
| |
Add a test for only pushing the refs specified. This checks whether
the set of pushed refs is the same as those specified
Also move no-pushspec-pushall.setup to setup_once as both pushspec
tests share the same setup
|
|
|
|
| |
If no push refspecs are given then every ref should be pushed
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This is why the test might be broken.
|