Skip to content

Commit

Permalink
ignore git when computing signature of a recipe develop egg
Browse files Browse the repository at this point in the history
When a recipe is developed in a git working copy, .git administrative
database folder should be ignored, like we did with CVS and svn.

fixes #522
  • Loading branch information
perrinjerome authored and gotcha committed May 24, 2020
1 parent f5eec30 commit 86818e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/zc/buildout/buildout.py
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,7 @@ def _open(base, filename, seen, dl_options, override, downloaded):
return result


ignore_directories = '.svn', 'CVS', '__pycache__'
ignore_directories = '.svn', 'CVS', '__pycache__', '.git'
_dir_hashes = {}
def _dir_hash(dir):
dir_hash = _dir_hashes.get(dir, None)
Expand Down
4 changes: 3 additions & 1 deletion src/zc/buildout/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ def changes_in_svn_or_CVS_dont_affect_sig():
"""
If we have a develop recipe, it's signature shouldn't be affected to
changes in .svn or CVS directories.
changes in .git, .svn or CVS directories.
>>> mkdir('recipe')
>>> write('recipe', 'setup.py',
Expand Down Expand Up @@ -1268,12 +1268,14 @@ def changes_in_svn_or_CVS_dont_affect_sig():
Develop: '/sample-buildout/recipe'
Installing foo.
>>> mkdir('recipe', '.git')
>>> mkdir('recipe', '.svn')
>>> mkdir('recipe', 'CVS')
>>> print_(system(join(sample_buildout, 'bin', 'buildout')), end='')
Develop: '/sample-buildout/recipe'
Updating foo.
>>> write('recipe', '.git', 'x', '1')
>>> write('recipe', '.svn', 'x', '1')
>>> write('recipe', 'CVS', 'x', '1')
Expand Down

0 comments on commit 86818e5

Please sign in to comment.