| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This was done to ensure tests.branching/branch-fails-if-branch-exists
always passes, but also seems like the right approach in general.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously some code used `git show-ref`, which is wrong -- given two
refs named 'alpha/master' and 'master', `git show-ref master` will
return both, sorted alphabetically. This can lead to build failures,
etc. due to refs resolving to the wrong SHAs.
We should also use `git rev-parse --verify` to verify SHA1s, which
we previously did with `git rev-list`.
Finally, `git rev-parse --verify` is more than twice as fast as
`git show-ref`.
|
|
|
|
|
| |
Currently the message is still displayed "Updating xxx" but no
update is actually done.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scenario: a repository contains a ref: refs/heads/foo and we
have that in our repository cache.
Action: upstream deletes that ref and then pushes a new refs
at refs/heads/foo/bar.
Action: we attempt to update the git and the update fails because
git remote update cannot cope with the 'kind' change of
refs/heads/foo from ref to directory.
Remedy: If we get an exception from the remote update --prune we
try the less efficient but more resilient combination of
first pruning and then updating.
Reviewed-By: Lars Wirzenius (over the shoulder)
Reviewed-By: Richard Maw (over the shoulder)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The origin/ refs in the system branch checkout repos may or may not be
up to date, and may or may not have been tampered with by the user.
Much better to use our central cache for everything other than changes
to the system branch ref itself, where we should indeed be honouring
the user's local changes.
At a later date we could warn if the user modifies refs other than
the system branch ref but does not push, as these changes will have no
effect.
NOTE: this commit breaks 'morph merge'. It is fixed in the next commit.
|
| |
|
|
|
|
|
|
|
|
| |
This reworks the code for managing and using the git caches in morph to treat
the caches as bare repositories which are mirrors of where we clone from. In
addition we correctly prune the branches during updates, so that we don't end
up accumulating pointless branches over and over. This is even more important
with branch-and-merge generating temporary build refs for things.
|
| |
|
|
|
|
| |
Adjust all other parts and the tests to work with this.
|
| |
|
|
|
|
|
|
|
|
|
| |
This was done with the aid of the pep8 script, available by running
`easy_install pep8`.
It may be worth making this part of ./check, but that will require
putting pep8 into the development tools stratum.
This should be easy, given pep8 has no external dependencies.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This requires changing CachedRepo.checkout to handle non-sha1 refs,
which resulted in some further changes in tests and their expected
outputs.
Also, a fix to CachedRepo to use the cwd keyword argument instead
of pwd.
|
| |
|
|
|
|
|
|
| |
This is done to avoid a nasty mix of SourcePool lookups using CachedRepo
objects (e.g. for strata within a system) versus lookups using repo names
(e.g for sources within a stratum).
|
| |
|
| |
|
| |
|
| |
|
|
|