summaryrefslogtreecommitdiff
path: root/morphlib/git.py
Commit message (Collapse)AuthorAgeFilesLines
* Refactor SystemBuilder and add helper classLars Wirzenius2012-03-021-1/+1
| | | | | | | | The helper class, Factory, has unit tests, which is why it's currently separate. It may later get integrated with BlobBuilder, or the other way around. Classes that don't have unit tests are marked out of coverage.
* Use "cp -a" and "git checkout" to unpack sources in the build tree.Jannis Pohlmann2012-02-221-11/+16
| | | | | | | | | This is done to keep the git repository intact with history and all that. cp + checkout turns out to be faster than a regular "git clone". In order to avoid roundtrips to the internet whenever a chunk tries to do something with submodules, we force the submodule URLs to point to our locally cached repos.
* Handle empty/short lines when validating submodulesLars Wirzenius2012-02-171-1/+1
|
* Switch to caching repos without checking them out.Jannis Pohlmann2012-02-141-5/+6
| | | | | | | | | | | | | This is almost as good as --bare. But unlike --bare, it properly sets up the 'origin' remote and creates the 'refs/remotes/origin/...' branches. When cloning with --bare, and you end up with "refs/heads/master", not "/refs/remotes/origin/master". You can re-add the remote 'origin', still no "refs/remotes/origin/master". Only after you update the remote (after re-adding it), the bare clone has "refs/remotes/origin/master"... and a "refs/heads/master" that is out of sync. An ugly mix, basically. So maybe this approach is better.
* Ignore submodules for which the parent repo has a non-commit object.Jannis Pohlmann2012-02-091-22/+26
| | | | | | This usually means that these submodules have been imported into the source tree and no longer need to be updated from their original repository.
* Change how git clones are created from bundlesLars Wirzenius2012-02-091-4/+4
| | | | | | For some reason, "git bundle unbundle" doesn't work for me, but "git clone" does. Then, adding a remote fails, because the cloned bundle already has one, so now we'll use "git remote set-url" and "git remote update".
* Extract chunk submodule repos into the build directory directly.Jannis Pohlmann2012-02-081-1/+11
| | | | | | | | | | | | | This change requires the latest version of cliapp to be installed. Rather than creating an archive from the cached git repositories, moving this tarball archive into the cache and then extracting it from there into the build directory, we now directly extract the sources into the build directory. We also recursively extract all submodules into the corresponding paths inside the build directory. (Recursing has not been tested yet, however.)
* Cache submodule repositories recursively.Jannis Pohlmann2012-02-081-6/+121
| | | | | | | | | | | | | | | | | | | | | | This commit introduces the following new classes: morphlib.git.Submodules: * takes a parent repo treeish * parses the .gitmodule file into morphlib.git.Submodule objects * provides iterator/container functionality for submodules morphlib.git.Submodule: * represents a single entry in a .gitmodules file * stores a Treeish for the corresponding repository In addition to this, the exception classes InvalidTreeish and SourceNotFound where renamed to InvalidReferenceError and RepositoryUpdateError. Several new exception classes were added for when resolving submodules fails. The SourceManager now resolves the Submodules and Submodule objects for the submodules of a Treeish in SourceManager.get_treeish() and also takes care of caching submodule repositories whenever necessary.
* Set GIT_DIR when running git archive. Drop --remote.Jannis Pohlmann2012-02-021-4/+4
| | | | | This change is necessary because upstream git no longer allows --remote to be combined with an arbitrary SHA1.
* Always specify '-l' when cloning in order to use hardlinking.Jannis Pohlmann2012-02-011-1/+1
|
* Bump copyright years, get rid of long lines and unused imports.Jannis Pohlmann2012-01-231-1/+0
|
* Improve the logging output of SourceManager.Jannis Pohlmann2012-01-231-12/+12
|
* Port everything to using Treeish objects instead of (repo, ref).Jannis Pohlmann2012-01-201-30/+37
| | | | | | | | | | | This affects pretty much every part of morph, so this might not be fully working and stable yet. This commit also introduces the "update-gits" command that can be used to update all cached repositories from the list of base URLs. The tree walk when resolving the Treeish objects in Builder.get_cache_id() is a bit similar to what we do in BuildDependencyGraph, maybe we can merge that one day.
* Document get_treeish() of the SourceManager.Jannis Pohlmann2012-01-191-2/+1
|
* Break long lines in git.py.Jannis Pohlmann2012-01-191-2/+5
|
* Fix coding style, update copyrights, drop unused imports.Jannis Pohlmann2012-01-191-1/+1
|
* Remove bad whitespaceRob Taylor2012-01-191-2/+2
|
* Fix cmdtests for SourceManager changesRob Taylor2012-01-191-11/+19
|
* Complete SourceManager testsRob Taylor2012-01-191-4/+17
|
* initial version of Sourcemanager and testsRob Taylor2012-01-181-20/+53
|
* have git export directly to a tar fileLars Wirzenius2011-12-061-6/+1
| | | | Later, add compression by piping to a gzip process.
* Always get all morphologies from gitLars Wirzenius2011-11-021-12/+2
| | | | | Previously, we've been able to get morphs for strata and systems directly from files, with uncommitted changes. No more.
* Move code to get morphology text from git into morphlib.git.Lars Wirzenius2011-10-171-1/+37
|
* Move get_git_commit_id into morphlib.git and rename.Lars Wirzenius2011-10-171-0/+12
|
* Start a git module for abstracting away git operations.Lars Wirzenius2011-10-171-0/+30