fixup tests in README.

parent 199b20c4
...@@ -340,13 +340,6 @@ erase your local modifications by specifying the "develop" flag:: ...@@ -340,13 +340,6 @@ erase your local modifications by specifying the "develop" flag::
repository = https://example.net/example.git/ repository = https://example.net/example.git/
develop = true develop = true
Specific git binary
~~~~~~~~~~~~~~~~~~~
The default git command is `git`, if for a any reason you don't
have git in your path, you can specify git binary path with `git-command`
option::
>>> cd(sample_buildout) >>> cd(sample_buildout)
>>> write(sample_buildout, 'buildout.cfg', >>> write(sample_buildout, 'buildout.cfg',
... """ ... """
...@@ -374,12 +367,26 @@ repository:: ...@@ -374,12 +367,26 @@ repository::
>>> cd(sample_buildout) >>> cd(sample_buildout)
>>> print system(buildout) >>> print system(buildout)
Updating git-clone. Updating git-clone.
Fetching origin
>>> cd(sample_buildout, 'parts', 'git-clone') >>> cd(sample_buildout, 'parts', 'git-clone')
>>> print system('cat setup.py') >>> print system('cat setup.py')
foo foo
Then, when update occurs, nothing is done::
>>> cd(sample_buildout, 'parts', 'git-clone')
>>> print system('echo kept > local_change')
>>> print system('git remote add broken http://git.erp5.org/repos/nowhere')
...
>>> cd(sample_buildout)
>>> print system(buildout)
Updating git-clone.
>>> cd(sample_buildout, 'parts', 'git-clone')
>>> print system('cat local_change')
kept
In case of uninstall, buildout will keep the repository directory:: In case of uninstall, buildout will keep the repository directory::
>>> cd(sample_buildout) >>> cd(sample_buildout)
...@@ -403,33 +410,12 @@ In case of uninstall, buildout will keep the repository directory:: ...@@ -403,33 +410,12 @@ In case of uninstall, buildout will keep the repository directory::
Installing git-clone. Installing git-clone.
destination directory already exists. destination directory already exists.
If an error occurs during update, the error is catched to prevent buildout Specific git binary
behavior of deleting parts it failed to update. One type of possible error is ~~~~~~~~~~~~~~~~~~~
fetching from a non existant remote::
>>> write(sample_buildout, 'buildout.cfg',
... """
... [buildout]
... parts = git-clone
...
... [git-clone]
... recipe = slapos.recipe.build:gitclone
... repository = http://git.erp5.org/repos/slapos.recipe.build.git
... """)
>>> print system(buildout)
Installing git-clone.
...
>>> cd(sample_buildout, 'parts', 'git-clone')
>>> print system('echo kept > local_change')
>>> print system('git remote add broken https://git.erp5.org/repos/nowhere')
...
>>> print system(buildout)
Updating git-clone.
...
Unable to update:
...
>>> print system('cat local_change')
kept
The default git command is `git`, if for a any reason you don't
have git in your path, you can specify git binary path with `git-command`
option.
Ignore SSL certificate Ignore SSL certificate
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
......
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