Commit 5b69b5c6 authored by Ayush Tiwari's avatar Ayush Tiwari

More robust check for update

parent de170a56
......@@ -325,7 +325,7 @@ and branch parameter is ignored::
Setup a "develop" repository
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you need to setup a repository that will be manually alterated over time for
If you need to setup a repository that will be manually alterate over time for
development purposes, you need to make sure buildout will NOT alter it and NOT
erase your local modifications by specifying the "develop" flag::
......
......@@ -284,6 +284,16 @@ revision = %s
head_commit_submodule_after_first_revision = self.getRepositoryHeadCommit(
submodule_repo_path)
# Change the HEAD of the cloned repository and then run buildout
check_call(['git', 'reset', '--hard', 'HEAD'], cwd=main_repo_path)
# Update buildout. This should fetch and reset to the revision given in
# the buildout
check_call([buildout])
head_commit_parent_repo_after_update = self.getRepositoryHeadCommit(
main_repo_path)
self.assertEqual(head_commit_parent_repo_after_update,
self.getRepositoryHeadCommit(self.project_dir))
# Update main repo with changes of submodule
submodule_dir_main_repo = os.path.join(self.project_dir, 'dir1',
'submodule_repo')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment