From 1cd36825c13f33782499ce49407e836d8ad65f8c Mon Sep 17 00:00:00 2001 From: David-Wobrock Date: Mon, 30 Oct 2017 17:47:39 +0100 Subject: [PATCH 1/4] Start large refactoring of tests and project structure * Put tests in tests/ diretory * Write functional tests * Create setup.py * Put sources into django_migration_linter folder (for future PyPi publishing) --- .gitignore | 5 + README.md | 12 +- django_migration_linter/__init__.py | 1 + .../migration_linter.py | 0 setup.py | 65 ++++++++++ tests/__init__.py | 0 tests/fixtures.py | 40 ++++++ tests/functional/__init__.py | 0 tests/functional/test_migration_linter.py | 79 ++++++++++++ .../test_django_without_git_project/manage.py | 22 ++++ .../test_app/__init__.py | 0 .../test_app/admin.py | 3 + .../test_app/apps.py | 5 + .../test_app/migrations/__init__.py | 0 .../test_app/models.py | 1 + .../test_app/tests.py | 3 + .../test_app/views.py | 3 + .../__init__.py | 0 .../settings.py | 121 ++++++++++++++++++ .../test_django_without_git_project/urls.py | 21 +++ .../test_django_without_git_project/wsgi.py | 16 +++ tests/test_project_fixtures/test_git_project | 1 + .../test_project_add_not_null_column | 1 + ...ct_add_not_null_column_followed_by_default | 1 + ..._project_create_table_with_not_null_column | 1 + .../test_project_drop_column | 1 + .../test_project_multi_commit | 1 + .../test_project_rename_column | 1 + .../test_project_rename_table | 1 + tests/unit/__init__.py | 0 .../unit/test_utils.py | 14 +- 31 files changed, 408 insertions(+), 11 deletions(-) create mode 100644 django_migration_linter/__init__.py rename migration_linter.py => django_migration_linter/migration_linter.py (100%) create mode 100644 setup.py create mode 100644 tests/__init__.py create mode 100644 tests/fixtures.py create mode 100644 tests/functional/__init__.py create mode 100644 tests/functional/test_migration_linter.py create mode 100644 tests/test_project_fixtures/test_django_without_git_project/manage.py create mode 100644 tests/test_project_fixtures/test_django_without_git_project/test_app/__init__.py create mode 100644 tests/test_project_fixtures/test_django_without_git_project/test_app/admin.py create mode 100644 tests/test_project_fixtures/test_django_without_git_project/test_app/apps.py create mode 100644 tests/test_project_fixtures/test_django_without_git_project/test_app/migrations/__init__.py create mode 100644 tests/test_project_fixtures/test_django_without_git_project/test_app/models.py create mode 100644 tests/test_project_fixtures/test_django_without_git_project/test_app/tests.py create mode 100644 tests/test_project_fixtures/test_django_without_git_project/test_app/views.py create mode 100644 tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/__init__.py create mode 100644 tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/settings.py create mode 100644 tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/urls.py create mode 100644 tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/wsgi.py create mode 160000 tests/test_project_fixtures/test_git_project create mode 160000 tests/test_project_fixtures/test_project_add_not_null_column create mode 160000 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default create mode 160000 tests/test_project_fixtures/test_project_create_table_with_not_null_column create mode 160000 tests/test_project_fixtures/test_project_drop_column create mode 160000 tests/test_project_fixtures/test_project_multi_commit create mode 160000 tests/test_project_fixtures/test_project_rename_column create mode 160000 tests/test_project_fixtures/test_project_rename_table create mode 100644 tests/unit/__init__.py rename test_migration_linter.py => tests/unit/test_utils.py (69%) diff --git a/.gitignore b/.gitignore index b5dd1eb..9b5aca5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,8 @@ tags __pycache__/ *.pyc +build/ +dist/ +*.egg-info/ +.cache/ +env/ diff --git a/README.md b/README.md index b86c956..8a87528 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Detect backward incompatible migrations for your django project. Needed software (in PATH): -* `python` (only tested on python2.7 (yet)) +* `python` * `git` * UNIX command line tools like `tail` @@ -27,12 +27,6 @@ The linter will try to detect if the project is a django project and is versione ## Tests -Launch the tests with: `python -m unittest test_migration_linter` +The easiest way to run the tests is to invoke [py.test](https://docs.pytest.org/en/latest/). -More test are to be written. - -## Improvements - -* More tests (always!) -* Detect data migration (not only scheme migrations) -* Detection dependent on specified database (mysql, postgresql, ...) +More tests are always welcome. diff --git a/django_migration_linter/__init__.py b/django_migration_linter/__init__.py new file mode 100644 index 0000000..7d5a0bc --- /dev/null +++ b/django_migration_linter/__init__.py @@ -0,0 +1 @@ +from migration_linter import * # noqa diff --git a/migration_linter.py b/django_migration_linter/migration_linter.py similarity index 100% rename from migration_linter.py rename to django_migration_linter/migration_linter.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..22017db --- /dev/null +++ b/setup.py @@ -0,0 +1,65 @@ +# Copyright 2017 3YOURMIND GmbH + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from codecs import open +from os import path +from setuptools import setup, find_packages + + +PROJECT_DIR = path.abspath(path.dirname(__file__)) + +with open(path.join(PROJECT_DIR, 'README.md'), encoding='utf-8') as f: + long_description = f.read() + +install_requirements = [ +] + +test_requirements = [ + 'pytest', + 'django', + 'django-fake-database-backends' +] + +setup( + name='django-migration-linter', + version='0.0.1', + + description='Fetect backward incompatible migrations for your django project', + long_description=long_description, + url='https://github.com/3YOURMIND/django-migration-linter', + author='3YOURMIND GmbH', + license='Apache License 2.0', + + packages=find_packages(exclude=['tests/']), + install_requires=install_requirements, + extras_require={ + 'test': test_requirements + }, + + keywords='django migration lint linter database backward compatibility', + classifiers=[ + 'Development Status :: 3 - Alpha', + 'Intended Audience :: Developers', + 'Environment :: Web Environment', + 'Framework :: Django', + + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + # TODO verify Python 3 compatible + # 'Programming Language :: Python :: 3', + # 'Programming Language :: Python :: 3.3', + # 'Programming Language :: Python :: 3.4', + # 'Programming Language :: Python :: 3.5', + ] +) diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/fixtures.py b/tests/fixtures.py new file mode 100644 index 0000000..e49a080 --- /dev/null +++ b/tests/fixtures.py @@ -0,0 +1,40 @@ +# Copyright 2017 3YOURMIND GmbH + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os + +_BASE_DIR = os.path.join( + os.path.dirname(os.path.dirname(os.path.abspath(__file__))), + 'tests/') +_FIXTURES_FOLDER = os.path.join(_BASE_DIR, 'test_project_fixtures/') + +ADD_NOT_NULL_COLUMN_PROJECT = os.path.join( + _FIXTURES_FOLDER, 'test_project_add_not_null_column/') +CREATE_TABLE_WITH_NOT_NULL_COLUMN_PROJECT = os.path.join( + _FIXTURES_FOLDER, 'test_project_create_table_with_not_null_column/') +DROP_COLUMN_PROJECT = os.path.join( + _FIXTURES_FOLDER, 'test_project_drop_column/') +RENAME_COLUMN_PROJECT = os.path.join( + _FIXTURES_FOLDER, 'test_project_rename_column/') +RENAME_TABLE_PROJECT = os.path.join( + _FIXTURES_FOLDER, 'test_project_rename_table/') +ADD_NOT_NULL_COLUMN_FOLLOWED_BY_DEFAULT_PROJECT = os.path.join( + _FIXTURES_FOLDER, 'test_project_add_not_null_column_followed_by_default/') +MULTI_COMMIT_PROJECT = os.path.join( + _FIXTURES_FOLDER, 'test_project_multi_commit/') + +NOT_DJANGO_GIT_PROJECT = os.path.join( + _FIXTURES_FOLDER, 'test_git_project/') +NOT_GIT_DJANGO_PROJECT = os.path.join( + _FIXTURES_FOLDER, 'test_django_without_git_project/') diff --git a/tests/functional/__init__.py b/tests/functional/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/functional/test_migration_linter.py b/tests/functional/test_migration_linter.py new file mode 100644 index 0000000..8943398 --- /dev/null +++ b/tests/functional/test_migration_linter.py @@ -0,0 +1,79 @@ +# Copyright 2017 3YOURMIND GmbH + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import unittest + +from django_migration_linter import MigrationLinter +from tests import fixtures + + +class BackwardcompatibilityDetectionTest(unittest.TestCase): + def setUp(self, *args, **kwargs): + return super( + BackwardcompatibilityDetectionTest, self).setUp(*args, **kwargs) + + def test_create_table_with_not_null_column(self): + linter = MigrationLinter( + fixtures.CREATE_TABLE_WITH_NOT_NULL_COLUMN_PROJECT) + has_errors = linter.lint_migrations() + self.assertFalse(has_errors) + + def test_detect_adding_not_null_column(self): + linter = MigrationLinter( + fixtures.ADD_NOT_NULL_COLUMN_PROJECT) + has_errors = linter.lint_migrations() + self.assertTrue(has_errors) + + def test_detect_drop_column(self): + linter = MigrationLinter( + fixtures.DROP_COLUMN_PROJECT) + has_errors = linter.lint_migrations() + self.assertTrue(has_errors) + + def test_detect_rename_column(self): + linter = MigrationLinter( + fixtures.RENAME_COLUMN_PROJECT) + has_errors = linter.lint_migrations() + self.assertTrue(has_errors) + + def test_detect_rename_table(self): + linter = MigrationLinter( + fixtures.RENAME_TABLE_PROJECT) + has_errors = linter.lint_migrations() + self.assertTrue(has_errors) + + def test_accept_not_null_column_followed_by_adding_default(self): + linter = MigrationLinter( + fixtures.ADD_NOT_NULL_COLUMN_FOLLOWED_BY_DEFAULT_PROJECT) + has_errors = linter.lint_migrations() + self.assertFalse(has_errors) + + def test_specify_git_hash(self): + linter = MigrationLinter( + fixtures.MULTI_COMMIT_PROJECT, + commit_id=None) + has_errors = linter.lint_migrations() + self.assertTrue(has_errors) + + linter = MigrationLinter( + fixtures.MULTI_COMMIT_PROJECT, + commit_id='44330921696018f8f1480df897b38310549982cb') + has_errors = linter.lint_migrations() + self.assertFalse(has_errors) + + linter = MigrationLinter( + fixtures.MULTI_COMMIT_PROJECT, + commit_id='tag1') + has_errors = linter.lint_migrations() + self.assertFalse(has_errors) diff --git a/tests/test_project_fixtures/test_django_without_git_project/manage.py b/tests/test_project_fixtures/test_django_without_git_project/manage.py new file mode 100644 index 0000000..1462610 --- /dev/null +++ b/tests/test_project_fixtures/test_django_without_git_project/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_django_without_git_project.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) diff --git a/tests/test_project_fixtures/test_django_without_git_project/test_app/__init__.py b/tests/test_project_fixtures/test_django_without_git_project/test_app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_django_without_git_project/test_app/admin.py b/tests/test_project_fixtures/test_django_without_git_project/test_app/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/tests/test_project_fixtures/test_django_without_git_project/test_app/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/tests/test_project_fixtures/test_django_without_git_project/test_app/apps.py b/tests/test_project_fixtures/test_django_without_git_project/test_app/apps.py new file mode 100644 index 0000000..fc04070 --- /dev/null +++ b/tests/test_project_fixtures/test_django_without_git_project/test_app/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class TestAppConfig(AppConfig): + name = 'test_app' diff --git a/tests/test_project_fixtures/test_django_without_git_project/test_app/migrations/__init__.py b/tests/test_project_fixtures/test_django_without_git_project/test_app/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_django_without_git_project/test_app/models.py b/tests/test_project_fixtures/test_django_without_git_project/test_app/models.py new file mode 100644 index 0000000..137941f --- /dev/null +++ b/tests/test_project_fixtures/test_django_without_git_project/test_app/models.py @@ -0,0 +1 @@ +from django.db import models diff --git a/tests/test_project_fixtures/test_django_without_git_project/test_app/tests.py b/tests/test_project_fixtures/test_django_without_git_project/test_app/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/tests/test_project_fixtures/test_django_without_git_project/test_app/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/tests/test_project_fixtures/test_django_without_git_project/test_app/views.py b/tests/test_project_fixtures/test_django_without_git_project/test_app/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/tests/test_project_fixtures/test_django_without_git_project/test_app/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/__init__.py b/tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/settings.py b/tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/settings.py new file mode 100644 index 0000000..b91306d --- /dev/null +++ b/tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/settings.py @@ -0,0 +1,121 @@ +""" +Django settings for test_django_without_git_project project. + +Generated by 'django-admin startproject' using Django 1.11.6. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.11/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'gtb+mohs%gf0+#fr89vw7e&#edmv=q8!iv+n&j_soawk$tkj3^' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'test_app' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'test_django_without_git_project.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'test_django_without_git_project.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.11/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.11/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.11/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/urls.py b/tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/urls.py new file mode 100644 index 0000000..735de5d --- /dev/null +++ b/tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/urls.py @@ -0,0 +1,21 @@ +"""linter_test_project URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.11/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url +from django.contrib import admin + +urlpatterns = [ + url(r'^admin/', admin.site.urls), +] diff --git a/tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/wsgi.py b/tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/wsgi.py new file mode 100644 index 0000000..6741b31 --- /dev/null +++ b/tests/test_project_fixtures/test_django_without_git_project/test_django_without_git_project/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for linter_test_project project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_add_not_null_column.settings") + +application = get_wsgi_application() diff --git a/tests/test_project_fixtures/test_git_project b/tests/test_project_fixtures/test_git_project new file mode 160000 index 0000000..7be2007 --- /dev/null +++ b/tests/test_project_fixtures/test_git_project @@ -0,0 +1 @@ +Subproject commit 7be2007c11ae031c7749e1fb1be9e41a8bfc1bdd diff --git a/tests/test_project_fixtures/test_project_add_not_null_column b/tests/test_project_fixtures/test_project_add_not_null_column new file mode 160000 index 0000000..13ddff9 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column @@ -0,0 +1 @@ +Subproject commit 13ddff99f80afca39dc64eaa65928244584a88d3 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default new file mode 160000 index 0000000..16fd55a --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default @@ -0,0 +1 @@ +Subproject commit 16fd55a08b9ad1af4282cafccf5c14adf1f2a1dc diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column b/tests/test_project_fixtures/test_project_create_table_with_not_null_column new file mode 160000 index 0000000..ba1eccf --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column @@ -0,0 +1 @@ +Subproject commit ba1eccf45ea15453cdb70eccb93febdfeb020b5b diff --git a/tests/test_project_fixtures/test_project_drop_column b/tests/test_project_fixtures/test_project_drop_column new file mode 160000 index 0000000..24f18b5 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column @@ -0,0 +1 @@ +Subproject commit 24f18b5897f6361405dd5c1c900869d693430801 diff --git a/tests/test_project_fixtures/test_project_multi_commit b/tests/test_project_fixtures/test_project_multi_commit new file mode 160000 index 0000000..dc16039 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit @@ -0,0 +1 @@ +Subproject commit dc16039b7458a98bcf9be2b92389e176ae1d9461 diff --git a/tests/test_project_fixtures/test_project_rename_column b/tests/test_project_fixtures/test_project_rename_column new file mode 160000 index 0000000..0a898aa --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column @@ -0,0 +1 @@ +Subproject commit 0a898aa4fac2fd21adeabfa9a0f89df447b0b55e diff --git a/tests/test_project_fixtures/test_project_rename_table b/tests/test_project_fixtures/test_project_rename_table new file mode 160000 index 0000000..cd1aa87 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table @@ -0,0 +1 @@ +Subproject commit cd1aa87abf1095d2ca6b9b64308931ab52e598c8 diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test_migration_linter.py b/tests/unit/test_utils.py similarity index 69% rename from test_migration_linter.py rename to tests/unit/test_utils.py index 3dfbe92..40cc1bb 100644 --- a/test_migration_linter.py +++ b/tests/unit/test_utils.py @@ -14,10 +14,11 @@ import unittest -from migration_linter import MigrationLinter +from tests import fixtures +from django_migration_linter import MigrationLinter, valid_folder -class LinterTest(unittest.TestCase): +class UtilityFunctionTest(unittest.TestCase): def test_split_migration_path(self): input_path = 'apps/the_app/migrations/0001_stuff.py' app, mig = MigrationLinter._split_migration_path(input_path) @@ -29,3 +30,12 @@ class LinterTest(unittest.TestCase): app, mig = MigrationLinter._split_migration_path(input_path) self.assertEqual(app, 'the_app') self.assertEqual(mig, '0001_stuff') + + def test_detect_valid_folder(self): + self.assertTrue(valid_folder(fixtures.ADD_NOT_NULL_COLUMN_PROJECT)) + + def test_detect_not_django_project(self): + self.assertFalse(valid_folder(fixtures.NOT_DJANGO_GIT_PROJECT)) + + def test_detect_not_git_project(self): + self.assertFalse(valid_folder(fixtures.NOT_GIT_DJANGO_PROJECT)) From c5fc3ae89689d0814d2420d3c244da49e798f6e1 Mon Sep 17 00:00:00 2001 From: David-Wobrock Date: Tue, 31 Oct 2017 17:24:14 +0100 Subject: [PATCH 2/4] Add entry point for console script in setup.py --- django_migration_linter/migration_linter.py | 6 +++++- setup.py | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/django_migration_linter/migration_linter.py b/django_migration_linter/migration_linter.py index 9e755c6..84c8746 100644 --- a/django_migration_linter/migration_linter.py +++ b/django_migration_linter/migration_linter.py @@ -238,7 +238,7 @@ def split_path(path): return (split_path(a) if len(a) > 0 else []) + [b] -if __name__ == '__main__': +def _main(): parser = argparse.ArgumentParser( description='Detect backward incompatible django migrations.') parser.add_argument( @@ -310,3 +310,7 @@ if __name__ == '__main__': sys.exit(1) else: sys.exit(1) + + +if __name__ == '__main__': + _main() diff --git a/setup.py b/setup.py index 22017db..ae711ef 100644 --- a/setup.py +++ b/setup.py @@ -46,6 +46,11 @@ setup( extras_require={ 'test': test_requirements }, + entry_points={ + 'console_scripts': [ + 'django-migration-linter = django_migration_linter.migration_linter:_main' + ] + }, keywords='django migration lint linter database backward compatibility', classifiers=[ From 6f84056aebf478501c799bd08280030e04f22876 Mon Sep 17 00:00:00 2001 From: David-Wobrock Date: Tue, 31 Oct 2017 17:55:05 +0100 Subject: [PATCH 3/4] Change git fixtures, do not use submodule or subtree Just rename git folder when testing and delete them at the end --- .gitignore | 1 + tests/fixtures.py | 30 ++++ tests/functional/test_migration_linter.py | 77 ++++---- tests/test_project_fixtures/test_git_project | 1 - .../test_git_project/git/COMMIT_EDITMSG | 1 + .../test_git_project/git/HEAD | 1 + .../test_git_project/git/config | 5 + .../test_git_project/git/description | 1 + .../git/hooks/applypatch-msg.sample | 15 ++ .../git/hooks/commit-msg.sample | 24 +++ .../git/hooks/post-update.sample | 8 + .../git/hooks/pre-applypatch.sample | 14 ++ .../git/hooks/pre-commit.sample | 49 +++++ .../git/hooks/pre-push.sample | 54 ++++++ .../git/hooks/pre-rebase.sample | 169 ++++++++++++++++++ .../git/hooks/prepare-commit-msg.sample | 36 ++++ .../test_git_project/git/hooks/update.sample | 128 +++++++++++++ .../test_git_project/git/info/exclude | 6 + .../test_git_project/git/logs/HEAD | 1 + .../git/logs/refs/heads/master | 1 + .../4b/825dc642cb6eb9a060e54bf8d69288fbee4904 | Bin 0 -> 15 bytes .../7b/e2007c11ae031c7749e1fb1be9e41a8bfc1bdd | Bin 0 -> 130 bytes .../test_git_project/git/refs/heads/master | 1 + .../test_project_add_not_null_column | 1 - .../.gitignore | 3 + .../git/COMMIT_EDITMSG | 22 +++ .../test_project_add_not_null_column/git/HEAD | 1 + .../git/config | 5 + .../git/description | 1 + .../git/hooks/applypatch-msg.sample | 15 ++ .../git/hooks/commit-msg.sample | 24 +++ .../git/hooks/post-update.sample | 8 + .../git/hooks/pre-applypatch.sample | 14 ++ .../git/hooks/pre-commit.sample | 49 +++++ .../git/hooks/pre-push.sample | 54 ++++++ .../git/hooks/pre-rebase.sample | 169 ++++++++++++++++++ .../git/hooks/prepare-commit-msg.sample | 36 ++++ .../git/hooks/update.sample | 128 +++++++++++++ .../git/index | Bin 0 -> 1432 bytes .../git/info/exclude | 6 + .../git/logs/HEAD | 3 + .../git/logs/refs/heads/master | 3 + .../09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac | 3 + .../0c/78bfd0462272a51e3515731a6e6776bea72f72 | Bin 0 -> 163 bytes .../13/850658e796761657478d38eacd426e208b05b0 | 2 + .../13/ddff99f80afca39dc64eaa65928244584a88d3 | 3 + .../42/9e00355cee29f0d18bfcbc67555f9c8fbe0cf0 | Bin 0 -> 240 bytes .../4b/825dc642cb6eb9a060e54bf8d69288fbee4904 | Bin 0 -> 15 bytes .../63/973d01988ba594743a8046c9c88c2aa527d307 | Bin 0 -> 42 bytes .../67/41b31d80b759d26496e68078ea8c6993a5b206 | 1 + .../73/47b0f2a9845fa268ad4a19967c706e5d7be38b | Bin 0 -> 296 bytes .../73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee | Bin 0 -> 391 bytes .../7c/e503c2dd97ba78597f6ff6e4393132753573f6 | Bin 0 -> 72 bytes .../88/80cfa9557a6ce785b43fb300748310b7e995ed | Bin 0 -> 148 bytes .../8c/38f3f3dad51e4585f3984282c2a4bec5349c1e | Bin 0 -> 77 bytes .../91/ea44a218fbd2f408430959283f0419c921093e | Bin 0 -> 77 bytes .../95/a7313de6fcb6553cd7a0e4993ee1c6c2760d0e | Bin 0 -> 1267 bytes .../bd/6e4d7737b3cb2f0ae260b05511342c3f6f1b45 | Bin 0 -> 140 bytes .../c4/42222d2e5f0960ac9ea05c85c05818c070860c | Bin 0 -> 174 bytes .../d4/942ceb12ecd35cfbb0d21fee3062c019e659c3 | Bin 0 -> 149 bytes .../dd/a78f10740fe52637c5a7ba4d18816672c627fa | Bin 0 -> 116 bytes .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | Bin 0 -> 15 bytes .../f4/c75b2e69145f2c603b0a0851cc97757766e511 | Bin 0 -> 464 bytes .../fc/04070e8336f17e3b2402586653623e6bb51f67 | Bin 0 -> 88 bytes .../git/refs/heads/master | 1 + .../manage.py | 22 +++ .../test_app/__init__.py | 0 .../test_app/admin.py | 3 + .../test_app/apps.py | 5 + .../test_app/migrations/0001_create_table.py | 23 +++ .../migrations/0002_add_new_not_null_field.py | 21 +++ .../test_app/migrations/__init__.py | 0 .../test_app/models.py | 5 + .../test_app/tests.py | 3 + .../test_app/views.py | 3 + .../__init__.py | 0 .../settings.py | 121 +++++++++++++ .../test_project_add_not_null_column/urls.py | 21 +++ .../test_project_add_not_null_column/wsgi.py | 16 ++ ...ct_add_not_null_column_followed_by_default | 1 - .../.gitignore | 3 + .../git/COMMIT_EDITMSG | 23 +++ .../git/HEAD | 1 + .../git/config | 5 + .../git/description | 1 + .../git/hooks/applypatch-msg.sample | 15 ++ .../git/hooks/commit-msg.sample | 24 +++ .../git/hooks/post-update.sample | 8 + .../git/hooks/pre-applypatch.sample | 14 ++ .../git/hooks/pre-commit.sample | 49 +++++ .../git/hooks/pre-push.sample | 54 ++++++ .../git/hooks/pre-rebase.sample | 169 ++++++++++++++++++ .../git/hooks/prepare-commit-msg.sample | 36 ++++ .../git/hooks/update.sample | 128 +++++++++++++ .../git/index | Bin 0 -> 1608 bytes .../git/info/exclude | 6 + .../git/logs/HEAD | 4 + .../git/logs/refs/heads/master | 4 + .../09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac | 3 + .../0c/4155a27f085fa8e954384cd3072054781ea238 | Bin 0 -> 901 bytes .../16/fd55a08b9ad1af4282cafccf5c14adf1f2a1dc | 3 + .../18/8d1e847da762e20ec43db374ffba8c5ee40581 | Bin 0 -> 131 bytes .../19/b0fd33394f0a1c56a43446422ec5ef7e9c87e2 | Bin 0 -> 1290 bytes .../1e/d2db048937886ab77c892d7ffa4bb3da6ae8a9 | Bin 0 -> 163 bytes .../1f/660a3639a3c11ad69f8e7f0fcef1af842778d8 | Bin 0 -> 270 bytes .../27/e9ce4a241beb6bc95a87c57501f5df8bd389c3 | Bin 0 -> 148 bytes .../3c/9094321361af2955414f87b28796b4c8c42cec | Bin 0 -> 148 bytes .../4b/825dc642cb6eb9a060e54bf8d69288fbee4904 | Bin 0 -> 15 bytes .../4c/2edb394b46664ac61f0b6fb29e57fe807ce21e | Bin 0 -> 167 bytes .../53/e59303633e807579d18f4174cb2a3dd3c15157 | Bin 0 -> 270 bytes .../60/70f2b1c3bce797d6373c9aac3e723af36b1658 | Bin 0 -> 1268 bytes .../63/973d01988ba594743a8046c9c88c2aa527d307 | Bin 0 -> 42 bytes .../67/41b31d80b759d26496e68078ea8c6993a5b206 | 1 + .../6e/ac9768027d572282f4f50c9c8154d081303928 | Bin 0 -> 875 bytes .../73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee | Bin 0 -> 391 bytes .../78/76e7751f6ce1a191c135a017afaaece86b6e63 | Bin 0 -> 149 bytes .../7c/e503c2dd97ba78597f6ff6e4393132753573f6 | Bin 0 -> 72 bytes .../83/bc6ba8802549076857fd3a69017dd26b0add3c | Bin 0 -> 193 bytes .../88/05d565409f35e08d0f55ac83126ed71a021814 | Bin 0 -> 916 bytes .../8c/38f3f3dad51e4585f3984282c2a4bec5349c1e | Bin 0 -> 77 bytes .../8c/5be9edbe3253011bbcd7c3b0f58e0b23b64006 | Bin 0 -> 148 bytes .../91/ea44a218fbd2f408430959283f0419c921093e | Bin 0 -> 77 bytes .../b9/d7998b28816a1910160972b501976d1c3137e9 | Bin 0 -> 1283 bytes .../c7/beda138c33c089001615811df53292c56ce647 | Bin 0 -> 194 bytes .../d5/33aa0b42cd49ffe6b9745faf19ed6f688eae48 | Bin 0 -> 476 bytes .../da/51ff0946cae8c000592184b1b05d831692d58f | Bin 0 -> 194 bytes .../db/58264a0a37c4f14e5a616c286fa2f1b215baf3 | Bin 0 -> 270 bytes .../dd/a78f10740fe52637c5a7ba4d18816672c627fa | Bin 0 -> 116 bytes .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | Bin 0 -> 15 bytes .../fa/a30528db5930caebddd08ab642f8e4c00a6c60 | 2 + .../fc/04070e8336f17e3b2402586653623e6bb51f67 | Bin 0 -> 88 bytes .../git/refs/heads/master | 1 + .../manage.py | 22 +++ .../test_app/__init__.py | 0 .../test_app/admin.py | 3 + .../test_app/apps.py | 5 + .../test_app/migrations/0001_create_table.py | 23 +++ .../migrations/0002_add_new_not_null_field.py | 27 +++ .../test_app/migrations/__init__.py | 0 .../test_app/migrations_utils.py | 72 ++++++++ .../test_app/models.py | 5 + .../test_app/tests.py | 3 + .../test_app/views.py | 3 + .../__init__.py | 0 .../settings.py | 120 +++++++++++++ .../urls.py | 21 +++ .../wsgi.py | 16 ++ ..._project_create_table_with_not_null_column | 1 - .../.gitignore | 3 + .../git/COMMIT_EDITMSG | 1 + .../git/HEAD | 1 + .../git/config | 5 + .../git/description | 1 + .../git/hooks/applypatch-msg.sample | 15 ++ .../git/hooks/commit-msg.sample | 24 +++ .../git/hooks/post-update.sample | 8 + .../git/hooks/pre-applypatch.sample | 14 ++ .../git/hooks/pre-commit.sample | 49 +++++ .../git/hooks/pre-push.sample | 54 ++++++ .../git/hooks/pre-rebase.sample | 169 ++++++++++++++++++ .../git/hooks/prepare-commit-msg.sample | 36 ++++ .../git/hooks/update.sample | 128 +++++++++++++ .../git/index | Bin 0 -> 1400 bytes .../git/info/exclude | 6 + .../git/logs/HEAD | 2 + .../git/logs/refs/heads/master | 2 + .../1c/10d0afe6768cf62149ccdade6d7c21e9f563c2 | Bin 0 -> 189 bytes .../4b/825dc642cb6eb9a060e54bf8d69288fbee4904 | Bin 0 -> 15 bytes .../63/973d01988ba594743a8046c9c88c2aa527d307 | Bin 0 -> 42 bytes .../67/41b31d80b759d26496e68078ea8c6993a5b206 | 1 + .../6f/60aa19497fb69e565a609b77a9d9a153ce5166 | Bin 0 -> 472 bytes .../73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee | Bin 0 -> 391 bytes .../76/cc5dc6375ab11196a4a33e8483e90a4644cca6 | Bin 0 -> 103 bytes .../7c/cafd52dbcbcf6381c02cf1f7de90dbfa1a43cc | Bin 0 -> 1274 bytes .../7c/e503c2dd97ba78597f6ff6e4393132753573f6 | Bin 0 -> 72 bytes .../8c/38f3f3dad51e4585f3984282c2a4bec5349c1e | Bin 0 -> 77 bytes .../91/ea44a218fbd2f408430959283f0419c921093e | Bin 0 -> 77 bytes .../9f/a7aec38f3098aa3035f03195a084ca8c2a6fd4 | Bin 0 -> 149 bytes .../ba/1eccf45ea15453cdb70eccb93febdfeb020b5b | Bin 0 -> 166 bytes .../d3/7815c8d2a6f36f5ee21d79ca061aac9eda3096 | Bin 0 -> 240 bytes .../d3/91b69ccab5441e2fdb073dcafb869e88c9aa6b | 2 + .../db/b570854ffac36f2c6c83f05b462f488ab9ea2e | 1 + .../de/2a6fb35877e85acd92f4871e5fd18783ae0c3f | Bin 0 -> 120 bytes .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | Bin 0 -> 15 bytes .../fc/04070e8336f17e3b2402586653623e6bb51f67 | Bin 0 -> 88 bytes .../git/refs/heads/master | 1 + .../manage.py | 22 +++ .../test_app/__init__.py | 0 .../test_app/admin.py | 3 + .../test_app/apps.py | 5 + .../0001_create_table_with_not_null_field.py | 23 +++ .../test_app/migrations/__init__.py | 0 .../test_app/models.py | 4 + .../test_app/tests.py | 3 + .../test_app/views.py | 3 + .../__init__.py | 0 .../settings.py | 121 +++++++++++++ .../urls.py | 21 +++ .../wsgi.py | 16 ++ .../test_project_drop_column | 1 - .../test_project_drop_column/.gitignore | 3 + .../git/COMMIT_EDITMSG | 22 +++ .../test_project_drop_column/git/HEAD | 1 + .../test_project_drop_column/git/config | 5 + .../test_project_drop_column/git/description | 1 + .../git/hooks/applypatch-msg.sample | 15 ++ .../git/hooks/commit-msg.sample | 24 +++ .../git/hooks/post-update.sample | 8 + .../git/hooks/pre-applypatch.sample | 14 ++ .../git/hooks/pre-commit.sample | 49 +++++ .../git/hooks/pre-push.sample | 54 ++++++ .../git/hooks/pre-rebase.sample | 169 ++++++++++++++++++ .../git/hooks/prepare-commit-msg.sample | 36 ++++ .../git/hooks/update.sample | 128 +++++++++++++ .../test_project_drop_column/git/index | Bin 0 -> 1384 bytes .../test_project_drop_column/git/info/exclude | 6 + .../test_project_drop_column/git/logs/HEAD | 3 + .../git/logs/refs/heads/master | 3 + .../03/0a39f4edf75b9d3a5506a722b3726296a87ef4 | Bin 0 -> 239 bytes .../1f/c7cd90b9ed61da4f88a4455d34977143489aa7 | Bin 0 -> 166 bytes .../24/f18b5897f6361405dd5c1c900869d693430801 | Bin 0 -> 167 bytes .../37/8f8dec7827972177bb4f79b05a508afe2fbb65 | Bin 0 -> 458 bytes .../42/4a54e5916970e0c48fdcefc707b00d07d8190a | Bin 0 -> 163 bytes .../4b/825dc642cb6eb9a060e54bf8d69288fbee4904 | Bin 0 -> 15 bytes .../4c/14a9e6112b6f7648ab793c423cdf598431fa93 | Bin 0 -> 148 bytes .../5a/6a22e2af1152c5fb11a8a3e94eac9a21612b22 | Bin 0 -> 138 bytes .../62/ba4ba170fdcc4677c50b5155980671d1dc8776 | Bin 0 -> 1263 bytes .../63/973d01988ba594743a8046c9c88c2aa527d307 | Bin 0 -> 42 bytes .../67/41b31d80b759d26496e68078ea8c6993a5b206 | 1 + .../6a/34c365ae581e0bd73521ffc69021e039d54d19 | 1 + .../73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee | Bin 0 -> 391 bytes .../7a/9637de11249631dbaeebc348bf69a235dfbd34 | Bin 0 -> 252 bytes .../7c/e503c2dd97ba78597f6ff6e4393132753573f6 | Bin 0 -> 72 bytes .../8c/38f3f3dad51e4585f3984282c2a4bec5349c1e | Bin 0 -> 77 bytes .../91/ea44a218fbd2f408430959283f0419c921093e | Bin 0 -> 77 bytes .../95/a7313de6fcb6553cd7a0e4993ee1c6c2760d0e | Bin 0 -> 1267 bytes .../a4/b2b15bde4d6744a83c82f5c27287dc2ffd0f39 | 4 + .../bf/21b1d9dc89a31ac4f2f6260996da59814e2f1e | Bin 0 -> 67 bytes .../d4/942ceb12ecd35cfbb0d21fee3062c019e659c3 | Bin 0 -> 149 bytes .../dd/58746c94048ea2fe86d773395b68803c4ef832 | Bin 0 -> 167 bytes .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | Bin 0 -> 15 bytes .../fc/04070e8336f17e3b2402586653623e6bb51f67 | Bin 0 -> 88 bytes .../git/refs/heads/master | 1 + .../test_project_drop_column/manage.py | 22 +++ .../test_app/__init__.py | 0 .../test_app/admin.py | 3 + .../test_project_drop_column/test_app/apps.py | 5 + .../test_app/migrations/0001_create_table.py | 23 +++ .../test_app/migrations/0002_drop_column.py | 19 ++ .../test_app/migrations/__init__.py | 0 .../test_app/models.py | 4 + .../test_app/tests.py | 3 + .../test_app/views.py | 3 + .../test_project_drop_column/__init__.py | 0 .../test_project_drop_column/settings.py | 121 +++++++++++++ .../test_project_drop_column/urls.py | 21 +++ .../test_project_drop_column/wsgi.py | 16 ++ .../test_project_multi_commit | 1 - .../test_project_multi_commit/.gitignore | 3 + .../git/COMMIT_EDITMSG | 10 ++ .../test_project_multi_commit/git/HEAD | 1 + .../test_project_multi_commit/git/config | 5 + .../test_project_multi_commit/git/description | 1 + .../git/hooks/applypatch-msg.sample | 15 ++ .../git/hooks/commit-msg.sample | 24 +++ .../git/hooks/post-update.sample | 8 + .../git/hooks/pre-applypatch.sample | 14 ++ .../git/hooks/pre-commit.sample | 49 +++++ .../git/hooks/pre-push.sample | 54 ++++++ .../git/hooks/pre-rebase.sample | 169 ++++++++++++++++++ .../git/hooks/prepare-commit-msg.sample | 36 ++++ .../git/hooks/update.sample | 128 +++++++++++++ .../test_project_multi_commit/git/index | Bin 0 -> 1520 bytes .../git/info/exclude | 6 + .../test_project_multi_commit/git/logs/HEAD | 4 + .../git/logs/refs/heads/master | 4 + .../09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac | 3 + .../2c/2d5b22159ce4123f0ecd22d631684742a6f298 | Bin 0 -> 168 bytes .../2f/eca9a38c232b4cb06c39d2db0b3d9be23a67e2 | Bin 0 -> 240 bytes .../39/d82d794ccb9af40a19c1b708eea6f90695c4d8 | Bin 0 -> 129 bytes .../3a/c947d350f32c18f403dce1868ac36f275fa7b8 | Bin 0 -> 149 bytes .../42/9e00355cee29f0d18bfcbc67555f9c8fbe0cf0 | Bin 0 -> 240 bytes .../44/330921696018f8f1480df897b38310549982cb | Bin 0 -> 163 bytes .../48/345f2d283caadec9aba8c78268ff6c48711836 | Bin 0 -> 239 bytes .../4b/825dc642cb6eb9a060e54bf8d69288fbee4904 | Bin 0 -> 15 bytes .../4c/e3b40413b7f8938d91828c437f33f66d57fcc9 | 1 + .../63/973d01988ba594743a8046c9c88c2aa527d307 | Bin 0 -> 42 bytes .../67/41b31d80b759d26496e68078ea8c6993a5b206 | 1 + .../73/47b0f2a9845fa268ad4a19967c706e5d7be38b | Bin 0 -> 296 bytes .../73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee | Bin 0 -> 391 bytes .../7c/e503c2dd97ba78597f6ff6e4393132753573f6 | Bin 0 -> 72 bytes .../7f/dd1712d35fb3950479fa65119efa83a04f41fc | Bin 0 -> 168 bytes .../80/c1a28714bc4471a440cae6c348c7d0dfc76eed | Bin 0 -> 1248 bytes .../87/76fa3b34105744f98699924fbfbc5fd7f4e59f | Bin 0 -> 148 bytes .../88/80cfa9557a6ce785b43fb300748310b7e995ed | Bin 0 -> 148 bytes .../8c/38f3f3dad51e4585f3984282c2a4bec5349c1e | Bin 0 -> 77 bytes .../91/ea44a218fbd2f408430959283f0419c921093e | Bin 0 -> 77 bytes .../92/8f9938db104a389b465923b8ea1fcce7b5c678 | Bin 0 -> 124 bytes .../a9/9fb787f53fad33eb031f8d252086c8a22c71a3 | Bin 0 -> 1262 bytes .../c0/2fb5754a33cbcd4408dc9e50260406fb6ee44a | Bin 0 -> 181 bytes .../dc/16039b7458a98bcf9be2b92389e176ae1d9461 | Bin 0 -> 181 bytes .../dd/a78f10740fe52637c5a7ba4d18816672c627fa | Bin 0 -> 116 bytes .../e0/e9599616de90471fbedcf6627e3392aee37e47 | Bin 0 -> 458 bytes .../e5/d9d54f36eb3916eebe9ce689180572abc355f3 | Bin 0 -> 168 bytes .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | Bin 0 -> 15 bytes .../f1/31a1ec97d003f08b920190bc152d82d850c4ca | 2 + .../f5/39458143158b494ab979422984dfb2c280303f | Bin 0 -> 124 bytes .../fc/04070e8336f17e3b2402586653623e6bb51f67 | Bin 0 -> 88 bytes .../fe/961bc4402a57bace36648e1a6f1998bae3c5e3 | Bin 0 -> 173 bytes .../git/refs/heads/master | 1 + .../test_project_multi_commit/manage.py | 22 +++ .../test_app/__init__.py | 0 .../test_app/admin.py | 3 + .../test_app/apps.py | 5 + .../test_app/migrations/0001_create_table.py | 23 +++ .../migrations/0002_add_new_not_null_field.py | 21 +++ .../migrations/0003_add_new_nullable_field.py | 20 +++ .../test_app/migrations/__init__.py | 0 .../test_app/models.py | 6 + .../test_app/tests.py | 3 + .../test_app/views.py | 3 + .../test_project_multi_commit/__init__.py | 0 .../test_project_multi_commit/settings.py | 120 +++++++++++++ .../test_project_multi_commit/urls.py | 21 +++ .../test_project_multi_commit/wsgi.py | 16 ++ .../test_project_rename_column | 1 - .../test_project_rename_column/.gitignore | 3 + .../git/COMMIT_EDITMSG | 1 + .../test_project_rename_column/git/HEAD | 1 + .../test_project_rename_column/git/config | 5 + .../git/description | 1 + .../git/hooks/applypatch-msg.sample | 15 ++ .../git/hooks/commit-msg.sample | 24 +++ .../git/hooks/post-update.sample | 8 + .../git/hooks/pre-applypatch.sample | 14 ++ .../git/hooks/pre-commit.sample | 49 +++++ .../git/hooks/pre-push.sample | 54 ++++++ .../git/hooks/pre-rebase.sample | 169 ++++++++++++++++++ .../git/hooks/prepare-commit-msg.sample | 36 ++++ .../git/hooks/update.sample | 128 +++++++++++++ .../test_project_rename_column/git/index | Bin 0 -> 1400 bytes .../git/info/exclude | 6 + .../test_project_rename_column/git/logs/HEAD | 2 + .../git/logs/refs/heads/master | 2 + .../0a/898aa4fac2fd21adeabfa9a0f89df447b0b55e | 2 + .../18/4f7577a2fc2b094acc06a5a0fa10fd88bdfe93 | Bin 0 -> 459 bytes .../1c/81ac236b008c087902e21ef7d41a45c8ae9bf7 | 1 + .../3c/ee643962df7bfab0b21688f02af79fa19a214a | Bin 0 -> 240 bytes .../4b/825dc642cb6eb9a060e54bf8d69288fbee4904 | Bin 0 -> 15 bytes .../57/e406836937bd0e9db226dc7d4aa70dec0c3428 | Bin 0 -> 169 bytes .../5f/183f1a90221cd21354f05d604a9bfe9aa18bd3 | Bin 0 -> 148 bytes .../62/bc1d2927e5023345701277baef9e0a52eb7b47 | Bin 0 -> 1263 bytes .../63/973d01988ba594743a8046c9c88c2aa527d307 | Bin 0 -> 42 bytes .../67/41b31d80b759d26496e68078ea8c6993a5b206 | 1 + .../73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee | Bin 0 -> 391 bytes .../7c/e503c2dd97ba78597f6ff6e4393132753573f6 | Bin 0 -> 72 bytes .../8c/38f3f3dad51e4585f3984282c2a4bec5349c1e | Bin 0 -> 77 bytes .../90/a71dcc5ba8aef7b217bba34450fe8f0083fa6b | 3 + .../91/ea44a218fbd2f408430959283f0419c921093e | Bin 0 -> 77 bytes .../92/5381bcf8fca9f7afa84b0207362ab00ec4e378 | Bin 0 -> 140 bytes .../af/f774d1a90f96c114789edd25bd37521b829233 | Bin 0 -> 105 bytes .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | Bin 0 -> 15 bytes .../e9/987576bd20e05b669a05e600a83b9afed6b0d8 | Bin 0 -> 262 bytes .../fc/04070e8336f17e3b2402586653623e6bb51f67 | Bin 0 -> 88 bytes .../git/refs/heads/master | 1 + .../test_project_rename_column/manage.py | 22 +++ .../test_app/__init__.py | 0 .../test_app/admin.py | 3 + .../test_app/apps.py | 5 + .../test_app/migrations/0001_create_table.py | 23 +++ .../test_app/migrations/0002_rename_column.py | 20 +++ .../test_app/migrations/__init__.py | 0 .../test_app/models.py | 4 + .../test_app/tests.py | 3 + .../test_app/views.py | 3 + .../test_project_rename_column/__init__.py | 0 .../test_project_rename_column/settings.py | 121 +++++++++++++ .../test_project_rename_column/urls.py | 21 +++ .../test_project_rename_column/wsgi.py | 16 ++ .../test_project_rename_table | 1 - .../test_project_rename_table/.gitignore | 3 + .../git/COMMIT_EDITMSG | 1 + .../test_project_rename_table/git/HEAD | 1 + .../test_project_rename_table/git/config | 5 + .../test_project_rename_table/git/description | 1 + .../git/hooks/applypatch-msg.sample | 15 ++ .../git/hooks/commit-msg.sample | 24 +++ .../git/hooks/post-update.sample | 8 + .../git/hooks/pre-applypatch.sample | 14 ++ .../git/hooks/pre-commit.sample | 49 +++++ .../git/hooks/pre-push.sample | 54 ++++++ .../git/hooks/pre-rebase.sample | 169 ++++++++++++++++++ .../git/hooks/prepare-commit-msg.sample | 36 ++++ .../git/hooks/update.sample | 128 +++++++++++++ .../test_project_rename_table/git/index | Bin 0 -> 1384 bytes .../git/info/exclude | 6 + .../test_project_rename_table/git/logs/HEAD | 2 + .../git/logs/refs/heads/master | 2 + .../26/33c5502148ad76d39331a6f075cbc2aa3413ba | Bin 0 -> 98 bytes .../4b/825dc642cb6eb9a060e54bf8d69288fbee4904 | Bin 0 -> 15 bytes .../63/973d01988ba594743a8046c9c88c2aa527d307 | Bin 0 -> 42 bytes .../67/41b31d80b759d26496e68078ea8c6993a5b206 | 1 + .../71/6d88c3f72dfc3e2d9d97f861c19ba2318c9ef5 | Bin 0 -> 168 bytes .../73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee | Bin 0 -> 391 bytes .../7c/e503c2dd97ba78597f6ff6e4393132753573f6 | Bin 0 -> 72 bytes .../7f/c9a68ff524659a2182df44137c56335a1d80b6 | Bin 0 -> 132 bytes .../86/e18cb66dc015f7c74d4d125ca9b814485e5ae4 | Bin 0 -> 240 bytes .../8c/38f3f3dad51e4585f3984282c2a4bec5349c1e | Bin 0 -> 77 bytes .../91/ea44a218fbd2f408430959283f0419c921093e | Bin 0 -> 77 bytes .../92/a21e6d935deaba88f676457f189e9c9c2a75bb | Bin 0 -> 1258 bytes .../bd/c56b5a08fe5d060b09bcc9a54cf5d9c8b88dfa | 1 + .../cd/1aa87abf1095d2ca6b9b64308931ab52e598c8 | Bin 0 -> 163 bytes .../d8/47af6cf50a2587894a4fcb8a712e411adaaefd | Bin 0 -> 324 bytes .../de/e3fd6ea2c3257f15eed8ba7608f5ea9b20062e | Bin 0 -> 457 bytes .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | Bin 0 -> 15 bytes .../f7/2b890b4369aabb6e396db4ed71c857e72dd7de | Bin 0 -> 148 bytes .../f7/5ea5c1a969f7e950efb86deadd0a4e4fe1a256 | Bin 0 -> 247 bytes .../fc/04070e8336f17e3b2402586653623e6bb51f67 | Bin 0 -> 88 bytes .../git/refs/heads/master | 1 + .../test_project_rename_table/manage.py | 22 +++ .../test_app/__init__.py | 0 .../test_app/admin.py | 3 + .../test_app/apps.py | 5 + .../test_app/migrations/0001_create_table.py | 23 +++ .../test_app/migrations/0002_rename_table.py | 19 ++ .../test_app/migrations/__init__.py | 0 .../test_app/models.py | 4 + .../test_app/tests.py | 3 + .../test_app/views.py | 3 + .../test_project_rename_table/__init__.py | 0 .../test_project_rename_table/settings.py | 121 +++++++++++++ .../test_project_rename_table/urls.py | 21 +++ .../test_project_rename_table/wsgi.py | 16 ++ tests/unit/test_utils.py | 14 +- 434 files changed, 6125 insertions(+), 49 deletions(-) delete mode 160000 tests/test_project_fixtures/test_git_project create mode 100644 tests/test_project_fixtures/test_git_project/git/COMMIT_EDITMSG create mode 100644 tests/test_project_fixtures/test_git_project/git/HEAD create mode 100644 tests/test_project_fixtures/test_git_project/git/config create mode 100644 tests/test_project_fixtures/test_git_project/git/description create mode 100644 tests/test_project_fixtures/test_git_project/git/hooks/applypatch-msg.sample create mode 100644 tests/test_project_fixtures/test_git_project/git/hooks/commit-msg.sample create mode 100644 tests/test_project_fixtures/test_git_project/git/hooks/post-update.sample create mode 100644 tests/test_project_fixtures/test_git_project/git/hooks/pre-applypatch.sample create mode 100644 tests/test_project_fixtures/test_git_project/git/hooks/pre-commit.sample create mode 100644 tests/test_project_fixtures/test_git_project/git/hooks/pre-push.sample create mode 100644 tests/test_project_fixtures/test_git_project/git/hooks/pre-rebase.sample create mode 100644 tests/test_project_fixtures/test_git_project/git/hooks/prepare-commit-msg.sample create mode 100644 tests/test_project_fixtures/test_git_project/git/hooks/update.sample create mode 100644 tests/test_project_fixtures/test_git_project/git/info/exclude create mode 100644 tests/test_project_fixtures/test_git_project/git/logs/HEAD create mode 100644 tests/test_project_fixtures/test_git_project/git/logs/refs/heads/master create mode 100644 tests/test_project_fixtures/test_git_project/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 create mode 100644 tests/test_project_fixtures/test_git_project/git/objects/7b/e2007c11ae031c7749e1fb1be9e41a8bfc1bdd create mode 100644 tests/test_project_fixtures/test_git_project/git/refs/heads/master delete mode 160000 tests/test_project_fixtures/test_project_add_not_null_column create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/.gitignore create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/COMMIT_EDITMSG create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/HEAD create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/config create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/description create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/applypatch-msg.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/post-update.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-applypatch.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-commit.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-push.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-rebase.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/prepare-commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/update.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/index create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/info/exclude create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/logs/HEAD create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/logs/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/0c/78bfd0462272a51e3515731a6e6776bea72f72 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/13/850658e796761657478d38eacd426e208b05b0 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/13/ddff99f80afca39dc64eaa65928244584a88d3 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/42/9e00355cee29f0d18bfcbc67555f9c8fbe0cf0 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/63/973d01988ba594743a8046c9c88c2aa527d307 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/73/47b0f2a9845fa268ad4a19967c706e5d7be38b create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/88/80cfa9557a6ce785b43fb300748310b7e995ed create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/91/ea44a218fbd2f408430959283f0419c921093e create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/95/a7313de6fcb6553cd7a0e4993ee1c6c2760d0e create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/bd/6e4d7737b3cb2f0ae260b05511342c3f6f1b45 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/c4/42222d2e5f0960ac9ea05c85c05818c070860c create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/d4/942ceb12ecd35cfbb0d21fee3062c019e659c3 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/dd/a78f10740fe52637c5a7ba4d18816672c627fa create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/f4/c75b2e69145f2c603b0a0851cc97757766e511 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/objects/fc/04070e8336f17e3b2402586653623e6bb51f67 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/git/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/manage.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_app/__init__.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_app/admin.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_app/apps.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_app/migrations/0001_create_table.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_app/migrations/0002_add_new_not_null_field.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_app/migrations/__init__.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_app/models.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_app/tests.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_app/views.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/__init__.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/settings.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/urls.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/wsgi.py delete mode 160000 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/.gitignore create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/COMMIT_EDITMSG create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/HEAD create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/config create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/description create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/applypatch-msg.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/post-update.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-applypatch.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-commit.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-push.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-rebase.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/prepare-commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/update.sample create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/index create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/info/exclude create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/logs/HEAD create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/logs/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/0c/4155a27f085fa8e954384cd3072054781ea238 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/16/fd55a08b9ad1af4282cafccf5c14adf1f2a1dc create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/18/8d1e847da762e20ec43db374ffba8c5ee40581 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/19/b0fd33394f0a1c56a43446422ec5ef7e9c87e2 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/1e/d2db048937886ab77c892d7ffa4bb3da6ae8a9 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/1f/660a3639a3c11ad69f8e7f0fcef1af842778d8 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/27/e9ce4a241beb6bc95a87c57501f5df8bd389c3 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/3c/9094321361af2955414f87b28796b4c8c42cec create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/4c/2edb394b46664ac61f0b6fb29e57fe807ce21e create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/53/e59303633e807579d18f4174cb2a3dd3c15157 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/60/70f2b1c3bce797d6373c9aac3e723af36b1658 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/63/973d01988ba594743a8046c9c88c2aa527d307 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/6e/ac9768027d572282f4f50c9c8154d081303928 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/78/76e7751f6ce1a191c135a017afaaece86b6e63 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/83/bc6ba8802549076857fd3a69017dd26b0add3c create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/88/05d565409f35e08d0f55ac83126ed71a021814 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/8c/5be9edbe3253011bbcd7c3b0f58e0b23b64006 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/91/ea44a218fbd2f408430959283f0419c921093e create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/b9/d7998b28816a1910160972b501976d1c3137e9 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/c7/beda138c33c089001615811df53292c56ce647 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/d5/33aa0b42cd49ffe6b9745faf19ed6f688eae48 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/da/51ff0946cae8c000592184b1b05d831692d58f create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/db/58264a0a37c4f14e5a616c286fa2f1b215baf3 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/dd/a78f10740fe52637c5a7ba4d18816672c627fa create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/fa/a30528db5930caebddd08ab642f8e4c00a6c60 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/fc/04070e8336f17e3b2402586653623e6bb51f67 create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/manage.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/__init__.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/admin.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/apps.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations/0001_create_table.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations/0002_add_new_not_null_field.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations/__init__.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations_utils.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/models.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/tests.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/views.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/__init__.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/settings.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/urls.py create mode 100644 tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/wsgi.py delete mode 160000 tests/test_project_fixtures/test_project_create_table_with_not_null_column create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/.gitignore create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/COMMIT_EDITMSG create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/HEAD create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/config create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/description create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/applypatch-msg.sample create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/post-update.sample create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-applypatch.sample create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-commit.sample create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-push.sample create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-rebase.sample create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/prepare-commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/update.sample create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/index create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/info/exclude create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/logs/HEAD create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/logs/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/1c/10d0afe6768cf62149ccdade6d7c21e9f563c2 create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/63/973d01988ba594743a8046c9c88c2aa527d307 create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/6f/60aa19497fb69e565a609b77a9d9a153ce5166 create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/76/cc5dc6375ab11196a4a33e8483e90a4644cca6 create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/7c/cafd52dbcbcf6381c02cf1f7de90dbfa1a43cc create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/91/ea44a218fbd2f408430959283f0419c921093e create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/9f/a7aec38f3098aa3035f03195a084ca8c2a6fd4 create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/ba/1eccf45ea15453cdb70eccb93febdfeb020b5b create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/d3/7815c8d2a6f36f5ee21d79ca061aac9eda3096 create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/d3/91b69ccab5441e2fdb073dcafb869e88c9aa6b create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/db/b570854ffac36f2c6c83f05b462f488ab9ea2e create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/de/2a6fb35877e85acd92f4871e5fd18783ae0c3f create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/fc/04070e8336f17e3b2402586653623e6bb51f67 create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/manage.py create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/__init__.py create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/admin.py create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/apps.py create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/migrations/0001_create_table_with_not_null_field.py create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/migrations/__init__.py create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/models.py create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/tests.py create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/views.py create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/__init__.py create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/settings.py create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/urls.py create mode 100644 tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/wsgi.py delete mode 160000 tests/test_project_fixtures/test_project_drop_column create mode 100644 tests/test_project_fixtures/test_project_drop_column/.gitignore create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/COMMIT_EDITMSG create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/HEAD create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/config create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/description create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/hooks/applypatch-msg.sample create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/hooks/commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/hooks/post-update.sample create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-applypatch.sample create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-commit.sample create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-push.sample create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-rebase.sample create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/hooks/prepare-commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/hooks/update.sample create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/index create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/info/exclude create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/logs/HEAD create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/logs/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/03/0a39f4edf75b9d3a5506a722b3726296a87ef4 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/1f/c7cd90b9ed61da4f88a4455d34977143489aa7 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/24/f18b5897f6361405dd5c1c900869d693430801 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/37/8f8dec7827972177bb4f79b05a508afe2fbb65 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/42/4a54e5916970e0c48fdcefc707b00d07d8190a create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/4c/14a9e6112b6f7648ab793c423cdf598431fa93 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/5a/6a22e2af1152c5fb11a8a3e94eac9a21612b22 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/62/ba4ba170fdcc4677c50b5155980671d1dc8776 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/63/973d01988ba594743a8046c9c88c2aa527d307 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/6a/34c365ae581e0bd73521ffc69021e039d54d19 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/7a/9637de11249631dbaeebc348bf69a235dfbd34 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/91/ea44a218fbd2f408430959283f0419c921093e create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/95/a7313de6fcb6553cd7a0e4993ee1c6c2760d0e create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/a4/b2b15bde4d6744a83c82f5c27287dc2ffd0f39 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/bf/21b1d9dc89a31ac4f2f6260996da59814e2f1e create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/d4/942ceb12ecd35cfbb0d21fee3062c019e659c3 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/dd/58746c94048ea2fe86d773395b68803c4ef832 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/objects/fc/04070e8336f17e3b2402586653623e6bb51f67 create mode 100644 tests/test_project_fixtures/test_project_drop_column/git/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_drop_column/manage.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_app/__init__.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_app/admin.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_app/apps.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_app/migrations/0001_create_table.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_app/migrations/0002_drop_column.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_app/migrations/__init__.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_app/models.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_app/tests.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_app/views.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/__init__.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/settings.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/urls.py create mode 100644 tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/wsgi.py delete mode 160000 tests/test_project_fixtures/test_project_multi_commit create mode 100644 tests/test_project_fixtures/test_project_multi_commit/.gitignore create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/COMMIT_EDITMSG create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/HEAD create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/config create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/description create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/hooks/applypatch-msg.sample create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/hooks/commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/hooks/post-update.sample create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-applypatch.sample create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-commit.sample create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-push.sample create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-rebase.sample create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/hooks/prepare-commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/hooks/update.sample create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/index create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/info/exclude create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/logs/HEAD create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/logs/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/2c/2d5b22159ce4123f0ecd22d631684742a6f298 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/2f/eca9a38c232b4cb06c39d2db0b3d9be23a67e2 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/39/d82d794ccb9af40a19c1b708eea6f90695c4d8 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/3a/c947d350f32c18f403dce1868ac36f275fa7b8 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/42/9e00355cee29f0d18bfcbc67555f9c8fbe0cf0 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/44/330921696018f8f1480df897b38310549982cb create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/48/345f2d283caadec9aba8c78268ff6c48711836 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/4c/e3b40413b7f8938d91828c437f33f66d57fcc9 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/63/973d01988ba594743a8046c9c88c2aa527d307 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/73/47b0f2a9845fa268ad4a19967c706e5d7be38b create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/7f/dd1712d35fb3950479fa65119efa83a04f41fc create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/80/c1a28714bc4471a440cae6c348c7d0dfc76eed create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/87/76fa3b34105744f98699924fbfbc5fd7f4e59f create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/88/80cfa9557a6ce785b43fb300748310b7e995ed create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/91/ea44a218fbd2f408430959283f0419c921093e create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/92/8f9938db104a389b465923b8ea1fcce7b5c678 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/a9/9fb787f53fad33eb031f8d252086c8a22c71a3 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/c0/2fb5754a33cbcd4408dc9e50260406fb6ee44a create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/dc/16039b7458a98bcf9be2b92389e176ae1d9461 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/dd/a78f10740fe52637c5a7ba4d18816672c627fa create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/e0/e9599616de90471fbedcf6627e3392aee37e47 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/e5/d9d54f36eb3916eebe9ce689180572abc355f3 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/f1/31a1ec97d003f08b920190bc152d82d850c4ca create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/f5/39458143158b494ab979422984dfb2c280303f create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/fc/04070e8336f17e3b2402586653623e6bb51f67 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/objects/fe/961bc4402a57bace36648e1a6f1998bae3c5e3 create mode 100644 tests/test_project_fixtures/test_project_multi_commit/git/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_multi_commit/manage.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_app/__init__.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_app/admin.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_app/apps.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/0001_create_table.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/0002_add_new_not_null_field.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/0003_add_new_nullable_field.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/__init__.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_app/models.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_app/tests.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_app/views.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/__init__.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/settings.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/urls.py create mode 100644 tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/wsgi.py delete mode 160000 tests/test_project_fixtures/test_project_rename_column create mode 100644 tests/test_project_fixtures/test_project_rename_column/.gitignore create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/COMMIT_EDITMSG create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/HEAD create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/config create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/description create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/hooks/applypatch-msg.sample create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/hooks/commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/hooks/post-update.sample create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-applypatch.sample create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-commit.sample create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-push.sample create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-rebase.sample create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/hooks/prepare-commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/hooks/update.sample create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/index create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/info/exclude create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/logs/HEAD create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/logs/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/0a/898aa4fac2fd21adeabfa9a0f89df447b0b55e create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/18/4f7577a2fc2b094acc06a5a0fa10fd88bdfe93 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/1c/81ac236b008c087902e21ef7d41a45c8ae9bf7 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/3c/ee643962df7bfab0b21688f02af79fa19a214a create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/57/e406836937bd0e9db226dc7d4aa70dec0c3428 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/5f/183f1a90221cd21354f05d604a9bfe9aa18bd3 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/62/bc1d2927e5023345701277baef9e0a52eb7b47 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/63/973d01988ba594743a8046c9c88c2aa527d307 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/90/a71dcc5ba8aef7b217bba34450fe8f0083fa6b create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/91/ea44a218fbd2f408430959283f0419c921093e create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/92/5381bcf8fca9f7afa84b0207362ab00ec4e378 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/af/f774d1a90f96c114789edd25bd37521b829233 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/e9/987576bd20e05b669a05e600a83b9afed6b0d8 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/objects/fc/04070e8336f17e3b2402586653623e6bb51f67 create mode 100644 tests/test_project_fixtures/test_project_rename_column/git/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_rename_column/manage.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_app/__init__.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_app/admin.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_app/apps.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_app/migrations/0001_create_table.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_app/migrations/0002_rename_column.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_app/migrations/__init__.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_app/models.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_app/tests.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_app/views.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/__init__.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/settings.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/urls.py create mode 100644 tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/wsgi.py delete mode 160000 tests/test_project_fixtures/test_project_rename_table create mode 100644 tests/test_project_fixtures/test_project_rename_table/.gitignore create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/COMMIT_EDITMSG create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/HEAD create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/config create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/description create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/hooks/applypatch-msg.sample create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/hooks/commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/hooks/post-update.sample create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-applypatch.sample create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-commit.sample create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-push.sample create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-rebase.sample create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/hooks/prepare-commit-msg.sample create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/hooks/update.sample create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/index create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/info/exclude create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/logs/HEAD create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/logs/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/26/33c5502148ad76d39331a6f075cbc2aa3413ba create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/63/973d01988ba594743a8046c9c88c2aa527d307 create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/71/6d88c3f72dfc3e2d9d97f861c19ba2318c9ef5 create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/7f/c9a68ff524659a2182df44137c56335a1d80b6 create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/86/e18cb66dc015f7c74d4d125ca9b814485e5ae4 create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/91/ea44a218fbd2f408430959283f0419c921093e create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/92/a21e6d935deaba88f676457f189e9c9c2a75bb create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/bd/c56b5a08fe5d060b09bcc9a54cf5d9c8b88dfa create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/cd/1aa87abf1095d2ca6b9b64308931ab52e598c8 create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/d8/47af6cf50a2587894a4fcb8a712e411adaaefd create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/de/e3fd6ea2c3257f15eed8ba7608f5ea9b20062e create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/f7/2b890b4369aabb6e396db4ed71c857e72dd7de create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/f7/5ea5c1a969f7e950efb86deadd0a4e4fe1a256 create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/objects/fc/04070e8336f17e3b2402586653623e6bb51f67 create mode 100644 tests/test_project_fixtures/test_project_rename_table/git/refs/heads/master create mode 100644 tests/test_project_fixtures/test_project_rename_table/manage.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_app/__init__.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_app/admin.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_app/apps.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_app/migrations/0001_create_table.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_app/migrations/0002_rename_table.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_app/migrations/__init__.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_app/models.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_app/tests.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_app/views.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/__init__.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/settings.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/urls.py create mode 100644 tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/wsgi.py diff --git a/.gitignore b/.gitignore index 9b5aca5..6060cf3 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ dist/ *.egg-info/ .cache/ env/ +tests/test_project_fixtures/*/.git/ diff --git a/tests/fixtures.py b/tests/fixtures.py index e49a080..e3748c6 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -13,6 +13,7 @@ # limitations under the License. import os +import shutil _BASE_DIR = os.path.join( os.path.dirname(os.path.dirname(os.path.abspath(__file__))), @@ -38,3 +39,32 @@ NOT_DJANGO_GIT_PROJECT = os.path.join( _FIXTURES_FOLDER, 'test_git_project/') NOT_GIT_DJANGO_PROJECT = os.path.join( _FIXTURES_FOLDER, 'test_django_without_git_project/') + +ALL_GIT_PROJECTS = ( + NOT_DJANGO_GIT_PROJECT, + ADD_NOT_NULL_COLUMN_PROJECT, + CREATE_TABLE_WITH_NOT_NULL_COLUMN_PROJECT, + DROP_COLUMN_PROJECT, + RENAME_COLUMN_PROJECT, + RENAME_TABLE_PROJECT, + ADD_NOT_NULL_COLUMN_FOLLOWED_BY_DEFAULT_PROJECT, + MULTI_COMMIT_PROJECT +) + + +def prepare_git_project(path): + """Copy the git/ folder to .git/ so it is + actually versioned""" + src_git = os.path.join(path, 'git/') + dest_git = os.path.join(path, '.git/') + try: + shutil.copytree(src_git, dest_git) + except OSError: + pass # .git/ might already exist + + +def clear_all_git_projects(): + """Delete all .git/ folders in test projects""" + for project_path in ALL_GIT_PROJECTS: + git_path = os.path.join(project_path, '.git/') + shutil.rmtree(git_path, ignore_errors=True) diff --git a/tests/functional/test_migration_linter.py b/tests/functional/test_migration_linter.py index 8943398..0a07823 100644 --- a/tests/functional/test_migration_linter.py +++ b/tests/functional/test_migration_linter.py @@ -19,61 +19,60 @@ from tests import fixtures class BackwardcompatibilityDetectionTest(unittest.TestCase): - def setUp(self, *args, **kwargs): - return super( - BackwardcompatibilityDetectionTest, self).setUp(*args, **kwargs) + def tearDown(self, *args, **kwargs): + fixtures.clear_all_git_projects() + super( + BackwardcompatibilityDetectionTest, + self).tearDown(*args, **kwargs) def test_create_table_with_not_null_column(self): - linter = MigrationLinter( - fixtures.CREATE_TABLE_WITH_NOT_NULL_COLUMN_PROJECT) - has_errors = linter.lint_migrations() - self.assertFalse(has_errors) + test_project_path = fixtures.CREATE_TABLE_WITH_NOT_NULL_COLUMN_PROJECT + fixtures.prepare_git_project(test_project_path) + self._test_linter_finds_no_errors(test_project_path) def test_detect_adding_not_null_column(self): - linter = MigrationLinter( - fixtures.ADD_NOT_NULL_COLUMN_PROJECT) - has_errors = linter.lint_migrations() - self.assertTrue(has_errors) + test_project_path = fixtures.ADD_NOT_NULL_COLUMN_PROJECT + fixtures.prepare_git_project(test_project_path) + self._test_linter_finds_errors(test_project_path) def test_detect_drop_column(self): - linter = MigrationLinter( - fixtures.DROP_COLUMN_PROJECT) - has_errors = linter.lint_migrations() - self.assertTrue(has_errors) + test_project_path = fixtures.DROP_COLUMN_PROJECT + fixtures.prepare_git_project(test_project_path) + self._test_linter_finds_errors(test_project_path) def test_detect_rename_column(self): - linter = MigrationLinter( - fixtures.RENAME_COLUMN_PROJECT) - has_errors = linter.lint_migrations() - self.assertTrue(has_errors) + test_project_path = fixtures.RENAME_COLUMN_PROJECT + fixtures.prepare_git_project(test_project_path) + self._test_linter_finds_errors(test_project_path) def test_detect_rename_table(self): - linter = MigrationLinter( - fixtures.RENAME_TABLE_PROJECT) - has_errors = linter.lint_migrations() - self.assertTrue(has_errors) + test_project_path = fixtures.RENAME_TABLE_PROJECT + fixtures.prepare_git_project(test_project_path) + self._test_linter_finds_errors(test_project_path) def test_accept_not_null_column_followed_by_adding_default(self): - linter = MigrationLinter( - fixtures.ADD_NOT_NULL_COLUMN_FOLLOWED_BY_DEFAULT_PROJECT) - has_errors = linter.lint_migrations() - self.assertFalse(has_errors) + test_project_path = \ + fixtures.ADD_NOT_NULL_COLUMN_FOLLOWED_BY_DEFAULT_PROJECT + fixtures.prepare_git_project(test_project_path) + self._test_linter_finds_no_errors(test_project_path) def test_specify_git_hash(self): - linter = MigrationLinter( - fixtures.MULTI_COMMIT_PROJECT, - commit_id=None) + test_project_path = fixtures.MULTI_COMMIT_PROJECT + fixtures.prepare_git_project(test_project_path) + + self._test_linter_finds_errors(test_project_path, commit_id=None) + + self._test_linter_finds_no_errors( + test_project_path, + commit_id='44330921696018f8f1480df897b38310549982cb') + self._test_linter_finds_no_errors(test_project_path, commit_id='tag1') + + def _test_linter_finds_errors(self, path, commit_id=None): + linter = MigrationLinter(path, commit_id=commit_id) has_errors = linter.lint_migrations() self.assertTrue(has_errors) - linter = MigrationLinter( - fixtures.MULTI_COMMIT_PROJECT, - commit_id='44330921696018f8f1480df897b38310549982cb') - has_errors = linter.lint_migrations() - self.assertFalse(has_errors) - - linter = MigrationLinter( - fixtures.MULTI_COMMIT_PROJECT, - commit_id='tag1') + def _test_linter_finds_no_errors(self, path, commit_id=None): + linter = MigrationLinter(path, commit_id=commit_id) has_errors = linter.lint_migrations() self.assertFalse(has_errors) diff --git a/tests/test_project_fixtures/test_git_project b/tests/test_project_fixtures/test_git_project deleted file mode 160000 index 7be2007..0000000 --- a/tests/test_project_fixtures/test_git_project +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7be2007c11ae031c7749e1fb1be9e41a8bfc1bdd diff --git a/tests/test_project_fixtures/test_git_project/git/COMMIT_EDITMSG b/tests/test_project_fixtures/test_git_project/git/COMMIT_EDITMSG new file mode 100644 index 0000000..972ea8f --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/COMMIT_EDITMSG @@ -0,0 +1 @@ +Init diff --git a/tests/test_project_fixtures/test_git_project/git/HEAD b/tests/test_project_fixtures/test_git_project/git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/tests/test_project_fixtures/test_git_project/git/config b/tests/test_project_fixtures/test_git_project/git/config new file mode 100644 index 0000000..eeb8dd7 --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/config @@ -0,0 +1,5 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true diff --git a/tests/test_project_fixtures/test_git_project/git/description b/tests/test_project_fixtures/test_git_project/git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/tests/test_project_fixtures/test_git_project/git/hooks/applypatch-msg.sample b/tests/test_project_fixtures/test_git_project/git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..8b2a2fe --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_git_project/git/hooks/commit-msg.sample b/tests/test_project_fixtures/test_git_project/git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/tests/test_project_fixtures/test_git_project/git/hooks/post-update.sample b/tests/test_project_fixtures/test_git_project/git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/tests/test_project_fixtures/test_git_project/git/hooks/pre-applypatch.sample b/tests/test_project_fixtures/test_git_project/git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..b1f187c --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_git_project/git/hooks/pre-commit.sample b/tests/test_project_fixtures/test_git_project/git/hooks/pre-commit.sample new file mode 100644 index 0000000..68d62d5 --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/tests/test_project_fixtures/test_git_project/git/hooks/pre-push.sample b/tests/test_project_fixtures/test_git_project/git/hooks/pre-push.sample new file mode 100644 index 0000000..1f3bceb --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/hooks/pre-push.sample @@ -0,0 +1,54 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +IFS=' ' +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + else + if [ "$remote_sha" = $z40 ] + then + # New branch, examine all commits + range="$local_sha" + else + # Update to existing branch, examine new commits + range="$remote_sha..$local_sha" + fi + + # Check for WIP commit + commit=`git rev-list -n 1 --grep '^WIP' "$range"` + if [ -n "$commit" ] + then + echo "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/tests/test_project_fixtures/test_git_project/git/hooks/pre-rebase.sample b/tests/test_project_fixtures/test_git_project/git/hooks/pre-rebase.sample new file mode 100644 index 0000000..33730ca --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up-to-date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/tests/test_project_fixtures/test_git_project/git/hooks/prepare-commit-msg.sample b/tests/test_project_fixtures/test_git_project/git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..f093a02 --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first comments out the +# "Conflicts:" part of a merge commit. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/tests/test_project_fixtures/test_git_project/git/hooks/update.sample b/tests/test_project_fixtures/test_git_project/git/hooks/update.sample new file mode 100644 index 0000000..d847583 --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to blocks unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero="0000000000000000000000000000000000000000" +if [ "$newrev" = "$zero" ]; then + newrev_type=delete +else + newrev_type=$(git cat-file -t $newrev) +fi + +case "$refname","$newrev_type" in + refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/tests/test_project_fixtures/test_git_project/git/info/exclude b/tests/test_project_fixtures/test_git_project/git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/tests/test_project_fixtures/test_git_project/git/logs/HEAD b/tests/test_project_fixtures/test_git_project/git/logs/HEAD new file mode 100644 index 0000000..86bb128 --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/logs/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 7be2007c11ae031c7749e1fb1be9e41a8bfc1bdd David-Wobrock 1509048040 +0200 commit (initial): Init diff --git a/tests/test_project_fixtures/test_git_project/git/logs/refs/heads/master b/tests/test_project_fixtures/test_git_project/git/logs/refs/heads/master new file mode 100644 index 0000000..86bb128 --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 7be2007c11ae031c7749e1fb1be9e41a8bfc1bdd David-Wobrock 1509048040 +0200 commit (initial): Init diff --git a/tests/test_project_fixtures/test_git_project/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 b/tests/test_project_fixtures/test_git_project/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 new file mode 100644 index 0000000000000000000000000000000000000000..adf64119a33d7621aeeaa505d30adb58afaa5559 GIT binary patch literal 15 Wcmb>0i}(>3PK?eMO*t7vyUG0Ol5?K7H#^1){f3ADHFu%_cQv0mgmB`C)QGO zhncpk-bBDKX`7-mIHWjQ krG$K+Vl8`^Ee?y&Agoa%s5;qo03lpE-}rMsk^lez literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_git_project/git/refs/heads/master b/tests/test_project_fixtures/test_git_project/git/refs/heads/master new file mode 100644 index 0000000..0de34be --- /dev/null +++ b/tests/test_project_fixtures/test_git_project/git/refs/heads/master @@ -0,0 +1 @@ +7be2007c11ae031c7749e1fb1be9e41a8bfc1bdd diff --git a/tests/test_project_fixtures/test_project_add_not_null_column b/tests/test_project_fixtures/test_project_add_not_null_column deleted file mode 160000 index 13ddff9..0000000 --- a/tests/test_project_fixtures/test_project_add_not_null_column +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 13ddff99f80afca39dc64eaa65928244584a88d3 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/.gitignore b/tests/test_project_fixtures/test_project_add_not_null_column/.gitignore new file mode 100644 index 0000000..63973d0 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/.gitignore @@ -0,0 +1,3 @@ +*.pyc +__pycache__/ +*sqlite3 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/COMMIT_EDITMSG b/tests/test_project_fixtures/test_project_add_not_null_column/git/COMMIT_EDITMSG new file mode 100644 index 0000000..c347860 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/COMMIT_EDITMSG @@ -0,0 +1,22 @@ +All files + +# Veuillez saisir le message de validation pour vos modifications. Les lignes +# commençant par '#' seront ignorées, et un message vide abandonne la validation. +# Sur la branche master +# Modifications qui seront validées : +# nouveau fichier: .gitignore +# nouveau fichier: manage.py +# nouveau fichier: test_app/__init__.py +# nouveau fichier: test_app/admin.py +# nouveau fichier: test_app/apps.py +# nouveau fichier: test_app/migrations/0001_create_table.py +# nouveau fichier: test_app/migrations/0002_add_new_not_null_field.py +# nouveau fichier: test_app/migrations/__init__.py +# nouveau fichier: test_app/models.py +# nouveau fichier: test_app/tests.py +# nouveau fichier: test_app/views.py +# nouveau fichier: test_project_add_not_null_column/__init__.py +# nouveau fichier: test_project_add_not_null_column/settings.py +# nouveau fichier: test_project_add_not_null_column/urls.py +# nouveau fichier: test_project_add_not_null_column/wsgi.py +# diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/HEAD b/tests/test_project_fixtures/test_project_add_not_null_column/git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/config b/tests/test_project_fixtures/test_project_add_not_null_column/git/config new file mode 100644 index 0000000..eeb8dd7 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/config @@ -0,0 +1,5 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/description b/tests/test_project_fixtures/test_project_add_not_null_column/git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/applypatch-msg.sample b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..8b2a2fe --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/commit-msg.sample b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/post-update.sample b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-applypatch.sample b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..b1f187c --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-commit.sample b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-commit.sample new file mode 100644 index 0000000..68d62d5 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-push.sample b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-push.sample new file mode 100644 index 0000000..1f3bceb --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-push.sample @@ -0,0 +1,54 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +IFS=' ' +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + else + if [ "$remote_sha" = $z40 ] + then + # New branch, examine all commits + range="$local_sha" + else + # Update to existing branch, examine new commits + range="$remote_sha..$local_sha" + fi + + # Check for WIP commit + commit=`git rev-list -n 1 --grep '^WIP' "$range"` + if [ -n "$commit" ] + then + echo "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-rebase.sample b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-rebase.sample new file mode 100644 index 0000000..33730ca --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up-to-date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/prepare-commit-msg.sample b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..f093a02 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first comments out the +# "Conflicts:" part of a merge commit. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/update.sample b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/update.sample new file mode 100644 index 0000000..d847583 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to blocks unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero="0000000000000000000000000000000000000000" +if [ "$newrev" = "$zero" ]; then + newrev_type=delete +else + newrev_type=$(git cat-file -t $newrev) +fi + +case "$refname","$newrev_type" in + refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/index b/tests/test_project_fixtures/test_project_add_not_null_column/git/index new file mode 100644 index 0000000000000000000000000000000000000000..1a18263e6f70d18c829ed7a5aa1aa5c542dc0b1f GIT binary patch literal 1432 zcmZ?q402{*U|<4b{>V>OHezC_3@{of#>c?5#EXHUaS4zO12W0eZ5d~DFP&0i)!=sW zM32@|^~>xGTzcu5C7J1Y`9-NPg^?f58Zp?ttbox#agcc(sOB--eK{VjmnjmjlVHuo z5qM^LX?faHK?cs;#Jt4xRK0>qhR6?lHi&;LS_7jY<}Ce>Y7PU#v$>CEZ@PHR*}GeF zU3t`vLr;2wCo+hXq!yRNCl(aw$H!;pWtPOpgNy_Nka?1G78Sr~sJY+K%(d^a`26|S zRXNwz&oi8w4lUVt)MSnvgCN}8#FX63JeWJB9o%$4=7DIadB4!ii~7UD&ev@AvCdkB zDIzU6$u4`Vd^&>w!n}flVz3*5=3Fp4&a6)@xi3Vd4cDV9kUyxh$6qQsKS{Jdg)0|NuY_~fG0#FEtblEkDOaPWe{_k#H+Avg`O zXZb%=dl;V;yKnfkvL${|##%4QX*C6TvDJ^e8H{k)V-%m5k`kYnS{|R5UlN~Jnv)Zs zmYJH90uOx#aJ(u^|W9q*cgb?QEr=;dUVgzUc5P;k(-}U$bj0Oq;)AiE7Xy)3~ zJY_y~clxf1$ol+mPb>|MN==KuA*CCT1z=-=?h9ARUt|F?PtiZ}nOY7rFIQx7cLT^g!K_{Zha&4Fg}sfDNpIt<%YJ;{%i}ixxV1Z zOuL824wdopF%Y(|IJKlCGcO$x1Hke`R`@G*jqJF`}k4qW9BH1eR{k5=)<>~ zn@`uBOWOMU#BH{B(0qZr08ESY0<8hX^9n&!dl=WIJ8qV3*dBQ) vW!kfbidQ|Elb3E{Bf_5Y;`B^#Zn&^$P4l`pu`PLA?!RLV 1509046620 +0200 commit (initial): Init +13850658e796761657478d38eacd426e208b05b0 0c78bfd0462272a51e3515731a6e6776bea72f72 David-Wobrock 1509046634 +0200 commit: All files +0c78bfd0462272a51e3515731a6e6776bea72f72 13ddff99f80afca39dc64eaa65928244584a88d3 David-Wobrock 1509046854 +0200 commit (amend): All files diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/logs/refs/heads/master b/tests/test_project_fixtures/test_project_add_not_null_column/git/logs/refs/heads/master new file mode 100644 index 0000000..c52e8aa --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/logs/refs/heads/master @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 13850658e796761657478d38eacd426e208b05b0 David-Wobrock 1509046620 +0200 commit (initial): Init +13850658e796761657478d38eacd426e208b05b0 0c78bfd0462272a51e3515731a6e6776bea72f72 David-Wobrock 1509046634 +0200 commit: All files +0c78bfd0462272a51e3515731a6e6776bea72f72 13ddff99f80afca39dc64eaa65928244584a88d3 David-Wobrock 1509046854 +0200 commit (amend): All files diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac new file mode 100644 index 0000000..4d7d160 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac @@ -0,0 +1,3 @@ +x]PËjÃ0ìÙ_±�ƒ�;Ôm øRrÈ­·„m­�ZY2zÒ¯¯dåY„˜™�™UÃee™?Ì }L¡•”‰~Öté«G¢¼£@U¤ÐaóU‹^B‘Eö RÀ2/^Ò"O—%O«¼Œ:% ¤³Æ*$Ø0JeÀ +æÌ‘pfœ×QÒÉ/£ÍY7°Þ…1)ô7à•QËk­a¦’«(»€óU�;L0Ãj|(‹£8¢ (Z†ÚŸ“ð89úí|à…ñ67o +Ýú{_&™&=ï�¨¬âu¼¸C;†œê*„a¸“˜Ñø¼U¶¶Fn½4©Ý‹´S­|錊 µ:’o<ž�ÊmÅ~±Úºßs’T�ÔHB‰Ý&žÏï{øÐ$–s2UºFï„ÁUH÷‚)ãÿüájwr>Dqá£& \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/0c/78bfd0462272a51e3515731a6e6776bea72f72 b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/0c/78bfd0462272a51e3515731a6e6776bea72f72 new file mode 100644 index 0000000000000000000000000000000000000000..20be75fab47f3ee359705d4144cd36f5c1df824a GIT binary patch literal 163 zcmV;U09^lg0i}*h3IZ_@1zqP9*^5Kx*U5m0f_HG8Pe+3pBV*L-JK_;s)`NOfY|~Ua zmkL*XCgLF>>13_4LB$|5c#;SKj1fX<8CAwCf;Q~#XS#JRlrwk``O Rj|+CFmFH6F!9HYXN#;QGOdkLM literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/13/850658e796761657478d38eacd426e208b05b0 b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/13/850658e796761657478d38eacd426e208b05b0 new file mode 100644 index 0000000..eb88956 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/13/850658e796761657478d38eacd426e208b05b0 @@ -0,0 +1,2 @@ +x¥�Á +B!E[û³�óL…ˆmú‚ÖŽÎ+)Äê÷3ú„–ç¹'ÖRr‡ÙmW½‰€a§mŠdtdö Å^\"¯�[XÄx4*<ûµ68†WN›såVã vé‹Óû‡‡K ù>ÅZö0[‘FX£FTcá.\¨Ó#wõ"";ã \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/13/ddff99f80afca39dc64eaa65928244584a88d3 b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/13/ddff99f80afca39dc64eaa65928244584a88d3 new file mode 100644 index 0000000..8ecddb5 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/13/ddff99f80afca39dc64eaa65928244584a88d3 @@ -0,0 +1,3 @@ +x•ŽA +Â0E]çÙ‹ešf&SQð®ÓɨÅÖH�z}+âü»÷�'yûb]C‹2©ZñÞÍKNñ-A”V# 0 + ×,€ ÄÜâ¤×bë†YCK�jÂ৆5JòŽÔw€˜ø(ç<Ù}|öiuÈÝ”åb×éƒÕë‹ÛÓû¡’5HDfR|FfcPQQHYPv%*!l^kJl@xWOz3B(d zXRX2%krtd}m%UX!-NXP06mm1uixNvR^Ye-sIvUQe46Vv}-nzwpGeb$U!1k9@-$KpF z%}+_q0h@GpdA~pj|5G*dqsw>sN;IYw9aH}WRaBB%Tmn{8^OX6}-RZk3BJ1R literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 new file mode 100644 index 0000000..cf19499 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 @@ -0,0 +1 @@ +xm�OOA Å=ϧhö‰îãE& Á(ÀxœvºË�Ît3S@¿½Ëžš¦¯ï÷Ú5ñîoŠ¢P_Ëé jŽ�o¡áä£`2‚YL—x‹µÀ¥–JÍð»ãŒdƒp^¶DvM6ƒ…ÀnGxG¸G‚½Mþ4Š6 ƒª²]G¾¶â9VUï÷Ú'{x8 €coî34žð2¢ÚˆtùIkÇu.ÝÖÆ–ÿ2Õ4F=*G#½áƒ°vØÿŒ¢¹õZÏT>tœ8+Õ$pv)ë^ep´(æØ›«¨Jq.1î}âXf‡�Ý‘ ŠñÛË|º0ËÉj5›O—æc1þ|Ÿ·P\ÿÏXçLd1qGdj¦]8Ùˆ�m.†J]¡àþK0ª_òCš€ \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/73/47b0f2a9845fa268ad4a19967c706e5d7be38b b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/73/47b0f2a9845fa268ad4a19967c706e5d7be38b new file mode 100644 index 0000000000000000000000000000000000000000..621f4fc1cb882e93252ee56b37a204041d5c4f7a GIT binary patch literal 296 zcmV+@0oVR`0bP*6PQx$|L^U8Q_FU`an}IOGdHqO3|KuqZ~q*G}>)p z3=g6+>lAkmUe2ra)l^=@%`wX$jG&3MAl*rF(7@{=#>G1KDx!)Z{!*$f(Cjs-{oW#-pB{Y$&vjaJR45ohv^!AsrC(4Ly?}(o|(-6 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee new file mode 100644 index 0000000000000000000000000000000000000000..66ccc09794ebf5efe30fa53a069a0084dc53b13f GIT binary patch literal 391 zcmV;20eJp+0gX~!OT#b}^*O)dGK8*B6Xt`1f)64N2R?~DiO#f5w~QvYB&i?&-kYq2 zF;MJN8qPiE+;dWOSiy36bvB#LI&Fh;o1lEy^bYr`4)FZ=0Jmscy&aqk8ZBc_I|c89 z>v|aoZv8uS+6Qnr&}1C&5D-4J`t%%D=)j;;plyrJBns#|CA|W#RLOw8T?oA|g=nz$ zyxB{;#ZjNvXoRw2!50e=u-CO05iLmH3wHM<4Uzehtp;01dk5Xby5MlrG$1W#)1wO| zK6IR}2iNeD+>IS3L^O~N-0Pr{dS0+s_5=3-1~NL0#8UtO literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 new file mode 100644 index 0000000000000000000000000000000000000000..250bef6ac737f97163f7f541ed98f1f4581b0f67 GIT binary patch literal 72 zcmV-O0Jr~m0ZYosPf{>5U`Q*<&s9jtO3X{o*DFaaE>XzLEyyn_Q3wIDofC^wxww=S eoQqNuOHvgo^Gk~qKx&E=GE$3D^|$~d*cUrI-yGBc literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/88/80cfa9557a6ce785b43fb300748310b7e995ed b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/88/80cfa9557a6ce785b43fb300748310b7e995ed new file mode 100644 index 0000000000000000000000000000000000000000..688ed38090ad987ce51eaedaee97677dbe4ffa52 GIT binary patch literal 148 zcmV;F0Biqv0V^p=O;s>7F=a3`FfcPQQ7|wtFpN(wN=+-d#4b>SRpP83g5+4sz_H6E>*_$q2bN24mTvr}-ey CZ$gp) literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e new file mode 100644 index 0000000000000000000000000000000000000000..e68f806e4b9f3596d3c9fcc6aa1f59610147f291 GIT binary patch literal 77 zcmV-T0J8sh0R_Q94uBvG1VGQcViWINOnitx0I6C-SyS-f@14n&8S63~PD8mo literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/91/ea44a218fbd2f408430959283f0419c921093e b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/91/ea44a218fbd2f408430959283f0419c921093e new file mode 100644 index 0000000000000000000000000000000000000000..263fc8c87e325bcaa3c19492252655b82f498d2d GIT binary patch literal 77 zcmV-T0J8sh0ZYosPf{>5W=Jc_&s9jtO3X{o*DKD*FDgkcEh$#W%q;*i6^c^xQc{b! jxRe!~i&7IyQWYxmON$iBGE>Wo6*5wbQuVk1gVGqx_PZe6 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/95/a7313de6fcb6553cd7a0e4993ee1c6c2760d0e b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/95/a7313de6fcb6553cd7a0e4993ee1c6c2760d0e new file mode 100644 index 0000000000000000000000000000000000000000..13fc88e4c4df3149cd1f7151ac71ab9565e437ca GIT binary patch literal 1267 zcmVO666f5%Ex3g_6pIkS7ho8d_pQ z@sx(LQTfs+obc^1GA?GTG3iLut??9Vl|WCoum=bx~kBDF$;Y_EzAX$wXYfeO&%ZUZ0RC zd3^V9c|;%2*z0*9IbJS)R*U(?pXP2WBF;>OM8?pPsu{#+oK2C+1Or0=lUueN8Exl! z)B*jz$cSOs-R|JtX$S8Ip6|iw=P!B8?KF*PSim|W6Ut~FO~dVbKCl3TeS4eVHxPWv z0Q?A2|Usp6=&X;8LjJwGxo`44kH> z0iO5VcDw69dL12#E%Or^MKM`oK`cmTCa8L{yz)P>7^E6)a*G?XGaL;3U^MKu2K^gdKrgj>D-*GVn(>|9ZP)glHD3S8Q=23A+HQSt z`fc-S1!6^#G=|Y&jln3wqN;OS#SrjIa)qE=3N$_sM11~IU_L*C3egQwpX*xNpbTz( zchJ{_wIMl6UI2gPGc1G%av`=04Wo>{RG;jcwV;Q`>d_d2d_N?o^Q>*yW?kfoeb3yQz$bpRIV z^KA^H1WN*c4;&m@Gxa1Y`C**4ZQs_TP(!cCwF&JMXR+E!zUlNkZr_2kDm~G74L|u1 zQ$;Q|0%7*;p1xg;(q|Lc1n!EdRtCxVn)`N(rCf3m>CJ(Hp~Z~+UvBCg*V9s7y_5%# zg`qO?-v_t0=iLv6?cmPtx)6uKaA*CMo>YEU$k4)JyC{qe*2Y>RNrbKRl*ttFXhLJG zd+}Z24i{yVN^Gp_s|wk{ih3~gk}T;GHdV79FTQBzRXTpW{C<`YLBnq-fT96}yD)NL zFVjGP5dQt0h$uH#+Pq}2B6aP4XJmJrpfzag32G8n&+-oJ_MG6;pr0R({1(*N2-Zcn zd8zBP*hKU}xA|uK!2h(O>jf+y-}!zm(P_)`&e3o95qqJasX9k)qDO!2@UkuTJ=iQ^ d*46W^0GxmY$9G$L&S(!B1+`%s{{kv#2WS~#Y!?6k literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/bd/6e4d7737b3cb2f0ae260b05511342c3f6f1b45 b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/bd/6e4d7737b3cb2f0ae260b05511342c3f6f1b45 new file mode 100644 index 0000000000000000000000000000000000000000..a2af5181ea81942380b12950dd27cb826f4cc41f GIT binary patch literal 140 zcmV;70CWF%0V^p=O;s>7He@g~FfcPQQOHfqOH5DIE2w1nay(iuQzTv|!J3OB@XYkm z^0cRdCI&#DP?B0)5}#O5z~D5G!8GQb=7)>jfA*w@#?R^B$MXS6NkLJ5R%$X(X-Z0b uUVce@UTIEFd~$wHX>K0Fl_@%}h2C6_`Mu$i{5ylB1Cq}o4+8+&!Z7vt%$dFfcPQQP4}zEXhpI%P&f0NS^eF=AGt;i`{?rq=&}O>EFlm0ZBbL> cI40C=uOdl7X}X8-^I literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/d4/942ceb12ecd35cfbb0d21fee3062c019e659c3 b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/d4/942ceb12ecd35cfbb0d21fee3062c019e659c3 new file mode 100644 index 0000000000000000000000000000000000000000..61838b73811200ffe83eb5103c98c4fb6fa14df5 GIT binary patch literal 149 zcmV;G0BZku0V^p=O;s>7v0yMXFfcPQQHYPv%*!l^kJl@xWOz3B(d+nRXA49V+AHgDNX6$^k1Wj(vK& z`{={BnwwA8olDyK{KRdxcTgqe#p#(KQ_>wb%QkF}yp%HSSwqFEp3KQhH?aW#76(M- DCcH|J literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/dd/a78f10740fe52637c5a7ba4d18816672c627fa b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/dd/a78f10740fe52637c5a7ba4d18816672c627fa new file mode 100644 index 0000000000000000000000000000000000000000..02f7652aab4ff2c24482e6984857526dd0767e14 GIT binary patch literal 116 zcmV-)0E_>40ZYosPf{>6HDX9B%Fk6u$x6&i&(}*yQpn6L$S*2U$jwhl%_-*MO3q0v zE>>{VfbjKvLBg6=T%38OIXUrZnW;G`3bs(idY*YDsp+XjZXi(&kOJF~qS91NpyJf> W_`Lj*c;Ym literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 b/tests/test_project_fixtures/test_project_add_not_null_column/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 new file mode 100644 index 0000000000000000000000000000000000000000..711223894375fe1186ac5bfffdc48fb1fa1e65cc GIT binary patch literal 15 Wcmb0Wbb|0ew?VZ`&{o-Pyl_a}G^`!5OwoF`y`dC1^WrNq}aDodm|F6LpdpNVHM^ z`$=+|wb+Lbh9NyZzV}G)4DaCTW4QC<@(z zQVuOC1=rV5DrHeSrOHnQ#D_x_DYR!-1(JqZ?2Jsy#h3Z&cC8+k+wJ}8_CbAHFTQ_W zmhYex3ZjmlAE_3FO`{x(a-A`%X4BbBBiijld6^rCAI46pTkF|E^N4QGRn49%iw^f> z$qAg~(-YO5kV?=Id#3ScsL=2G%ioeKbS6(DiPJS2($ literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/git/refs/heads/master b/tests/test_project_fixtures/test_project_add_not_null_column/git/refs/heads/master new file mode 100644 index 0000000..ef760ea --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/git/refs/heads/master @@ -0,0 +1 @@ +13ddff99f80afca39dc64eaa65928244584a88d3 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/manage.py b/tests/test_project_fixtures/test_project_add_not_null_column/manage.py new file mode 100644 index 0000000..f4c75b2 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_add_not_null_column.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_app/__init__.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_app/admin.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_app/apps.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/apps.py new file mode 100644 index 0000000..fc04070 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class TestAppConfig(AppConfig): + name = 'test_app' diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_app/migrations/0001_create_table.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/migrations/0001_create_table.py new file mode 100644 index 0000000..09d00ce --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/migrations/0001_create_table.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 14:05 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='A', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('null_field', models.IntegerField(null=True)), + ], + ), + ] diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_app/migrations/0002_add_new_not_null_field.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/migrations/0002_add_new_not_null_field.py new file mode 100644 index 0000000..7347b0f --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/migrations/0002_add_new_not_null_field.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 14:06 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('test_app', '0001_create_table'), + ] + + operations = [ + migrations.AddField( + model_name='a', + name='new_not_null_field', + field=models.IntegerField(default=1), + preserve_default=False, + ), + ] diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_app/migrations/__init__.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_app/models.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/models.py new file mode 100644 index 0000000..dda78f1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/models.py @@ -0,0 +1,5 @@ +from django.db import models + +class A(models.Model): + null_field = models.IntegerField(null=True) + new_not_null_field = models.IntegerField(null=False) diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_app/tests.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_app/views.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/test_app/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/__init__.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/settings.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/settings.py new file mode 100644 index 0000000..95a7313 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/settings.py @@ -0,0 +1,121 @@ +""" +Django settings for test_project_add_not_null_column project. + +Generated by 'django-admin startproject' using Django 1.11.6. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.11/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'gtb+mohs%gf0+#fr89vw7e&#edmv=q8!iv+n&j_soawk$tkj3^' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'test_app' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'test_project_add_not_null_column.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'test_project_add_not_null_column.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.11/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.11/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.11/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/urls.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/urls.py new file mode 100644 index 0000000..735de5d --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/urls.py @@ -0,0 +1,21 @@ +"""linter_test_project URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.11/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url +from django.contrib import admin + +urlpatterns = [ + url(r'^admin/', admin.site.urls), +] diff --git a/tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/wsgi.py b/tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/wsgi.py new file mode 100644 index 0000000..6741b31 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column/test_project_add_not_null_column/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for linter_test_project project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_add_not_null_column.settings") + +application = get_wsgi_application() diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default deleted file mode 160000 index 16fd55a..0000000 --- a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 16fd55a08b9ad1af4282cafccf5c14adf1f2a1dc diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/.gitignore b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/.gitignore new file mode 100644 index 0000000..63973d0 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/.gitignore @@ -0,0 +1,3 @@ +*.pyc +__pycache__/ +*sqlite3 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/COMMIT_EDITMSG b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/COMMIT_EDITMSG new file mode 100644 index 0000000..e3faf61 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/COMMIT_EDITMSG @@ -0,0 +1,23 @@ +All files + +# Veuillez saisir le message de validation pour vos modifications. Les lignes +# commençant par '#' seront ignorées, et un message vide abandonne la validation. +# Sur la branche master +# Modifications qui seront validées : +# nouveau fichier: .gitignore +# nouveau fichier: manage.py +# nouveau fichier: test_app/__init__.py +# nouveau fichier: test_app/admin.py +# nouveau fichier: test_app/apps.py +# nouveau fichier: test_app/migrations/0001_create_table.py +# nouveau fichier: test_app/migrations/0002_add_new_not_null_field.py +# nouveau fichier: test_app/migrations/__init__.py +# nouveau fichier: test_app/migrations_utils.py +# nouveau fichier: test_app/models.py +# nouveau fichier: test_app/tests.py +# nouveau fichier: test_app/views.py +# nouveau fichier: test_project_add_not_null_column_followed_by_default/__init__.py +# nouveau fichier: test_project_add_not_null_column_followed_by_default/settings.py +# nouveau fichier: test_project_add_not_null_column_followed_by_default/urls.py +# nouveau fichier: test_project_add_not_null_column_followed_by_default/wsgi.py +# diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/HEAD b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/config b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/config new file mode 100644 index 0000000..eeb8dd7 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/config @@ -0,0 +1,5 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/description b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/applypatch-msg.sample b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..8b2a2fe --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/commit-msg.sample b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/post-update.sample b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-applypatch.sample b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..b1f187c --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-commit.sample b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-commit.sample new file mode 100644 index 0000000..68d62d5 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-push.sample b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-push.sample new file mode 100644 index 0000000..1f3bceb --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-push.sample @@ -0,0 +1,54 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +IFS=' ' +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + else + if [ "$remote_sha" = $z40 ] + then + # New branch, examine all commits + range="$local_sha" + else + # Update to existing branch, examine new commits + range="$remote_sha..$local_sha" + fi + + # Check for WIP commit + commit=`git rev-list -n 1 --grep '^WIP' "$range"` + if [ -n "$commit" ] + then + echo "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-rebase.sample b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-rebase.sample new file mode 100644 index 0000000..33730ca --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up-to-date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/prepare-commit-msg.sample b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..f093a02 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first comments out the +# "Conflicts:" part of a merge commit. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/update.sample b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/update.sample new file mode 100644 index 0000000..d847583 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to blocks unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero="0000000000000000000000000000000000000000" +if [ "$newrev" = "$zero" ]; then + newrev_type=delete +else + newrev_type=$(git cat-file -t $newrev) +fi + +case "$refname","$newrev_type" in + refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/index b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/index new file mode 100644 index 0000000000000000000000000000000000000000..75cbd0c612bcda478c79c78d7e9bb17bd02b1934 GIT binary patch literal 1608 zcmZ?q402{*U|<4bfyhq|dkhMy3nD*R*@%gy0)-g(7`Rr5F)%bP0db%}CV9FoJ?NnM1I(_LHuLU8W;^V=OC&%3=GfaKAOGh z;x%XQZq0S&Q8x}f=?R|5AX1WAToRvHP@o?lpP83g5+4sT5)44*NzPeR0HdMi?m#ow zzQ^M8=UZ3hTw6cSaB4cVWZzMfIdTkwaB~w=ax?S5?)>C%U+m1L4v=}$4sJS7^LC+` z7xjmQov+#KW1Y1MQ$$*Dl3n&z`E&*Wgn0!8#b7r^esbEZm{IZqXx;_01AS|t<{d#b zk4cU50?#8mZl_NNJEp#iUt0dPUS!i61`W7*xtZxji6xo&dByq$1_p-l$wjG&C8_Zx ziAg!&;04B$<7L78{s&+>eIh7qK=E`8&7N7m7PD&Hjx;#+`tF6UZB9R)9N@}HU@*dA zk5PPLN=kfQYI%HKeo1^@X--ajT4ria3Ow|I=>r%}%F(4fFdAy_2~>M=#H&0udr_k} z^6R@;&3^$EFdAz9ZdCI*S9h>pO?8-W`k`_as`sd>tL=IoSgjf)Rg$7%J`Jjw8YY!64bmK z`Sopz;>vaz7!9@mG^+hPy$J=MHXh#deEKzWn^|k@imX0oi$ySyXMb^ONl9j2Iy7H? zI4i4JsLBHJzewz@8mRqeQSE2uD2{!4yZh+Fx0;(z*PTn+`uxOgws#CRWck0e2q}d` zemJWpp_+XFOpEjatq14V3#j%pu1$B`EZeX>@>0sQXAKpvdNL<3-NZ(w{pH2!ned!@ Z{mOqPp~$!wd&F-CWoEp7T79#I0{~w;HlF|h literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/info/exclude b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/logs/HEAD b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/logs/HEAD new file mode 100644 index 0000000..a0e2bfa --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/logs/HEAD @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 188d1e847da762e20ec43db374ffba8c5ee40581 David-Wobrock 1509048870 +0200 commit (initial): Init +188d1e847da762e20ec43db374ffba8c5ee40581 1ed2db048937886ab77c892d7ffa4bb3da6ae8a9 David-Wobrock 1509048882 +0200 commit: All files +1ed2db048937886ab77c892d7ffa4bb3da6ae8a9 4c2edb394b46664ac61f0b6fb29e57fe807ce21e David-Wobrock 1509049863 +0200 commit (amend): All files +4c2edb394b46664ac61f0b6fb29e57fe807ce21e 16fd55a08b9ad1af4282cafccf5c14adf1f2a1dc David-Wobrock 1509381987 +0100 commit (amend): All files diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/logs/refs/heads/master b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/logs/refs/heads/master new file mode 100644 index 0000000..a0e2bfa --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/logs/refs/heads/master @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 188d1e847da762e20ec43db374ffba8c5ee40581 David-Wobrock 1509048870 +0200 commit (initial): Init +188d1e847da762e20ec43db374ffba8c5ee40581 1ed2db048937886ab77c892d7ffa4bb3da6ae8a9 David-Wobrock 1509048882 +0200 commit: All files +1ed2db048937886ab77c892d7ffa4bb3da6ae8a9 4c2edb394b46664ac61f0b6fb29e57fe807ce21e David-Wobrock 1509049863 +0200 commit (amend): All files +4c2edb394b46664ac61f0b6fb29e57fe807ce21e 16fd55a08b9ad1af4282cafccf5c14adf1f2a1dc David-Wobrock 1509381987 +0100 commit (amend): All files diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac new file mode 100644 index 0000000..4d7d160 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac @@ -0,0 +1,3 @@ +x]PËjÃ0ìÙ_±�ƒ�;Ôm øRrÈ­·„m­�ZY2zÒ¯¯dåY„˜™�™UÃee™?Ì }L¡•”‰~Öté«G¢¼£@U¤ÐaóU‹^B‘Eö RÀ2/^Ò"O—%O«¼Œ:% ¤³Æ*$Ø0JeÀ +æÌ‘pfœ×QÒÉ/£ÍY7°Þ…1)ô7à•QËk­a¦’«(»€óU�;L0Ãj|(‹£8¢ (Z†ÚŸ“ð89úí|à…ñ67o +Ýú{_&™&=ï�¨¬âu¼¸C;†œê*„a¸“˜Ñø¼U¶¶Fn½4©Ý‹´S­|錊 µ:’o<ž�ÊmÅ~±Úºßs’T�ÔHB‰Ý&žÏï{øÐ$–s2UºFï„ÁUH÷‚)ãÿüájwr>Dqá£& \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/0c/4155a27f085fa8e954384cd3072054781ea238 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/0c/4155a27f085fa8e954384cd3072054781ea238 new file mode 100644 index 0000000000000000000000000000000000000000..e8c1e71c5c0210b0242c4c24f98351f062018066 GIT binary patch literal 901 zcmV;01A6>;0o7JbZ`3dl<-EUQR1VpdLIemdAS4Pcr$SL#xFBSlc(Q9q;$S;nR#pEy zGj@_qpp_7a1FNc=*z@t`dER*Q%H;6y(c?#VN^5FRUu3f}naZ;p%G%hnO4v)EX z2)b^K^>98cFQ%@Y*Okl4t|{1AR)cjRi!CbAT8`%Ti^Za-q;qhr)CrcdtNaI9b+{a( zuAVG_J{B+0I-OSt&tPpkT!dx!tr7vuGdMavTc2LQ`uN4!DSW=VfBhNa%FFY!_pjg3 z(gRw0ce;j?(^tpu&(@G!J-kky9?b%Yn259dUci%!^S47piWPz>EI|m}XfMRlVO6G3 z8-PM-XXES;M&jKL^WHs20dhW!YPGw|nnw6y3u+rV;M;O#(&5TQSW z$V6aIh5^wdov;QcXcN3hIuNf%YRA&XB+Kv;?*Eq(cWge)n5F@rIr0 zDg`7@!dYjd_Y})rcw@+`*?>2o%xH5Lax7#=!-0{N8Yz(5hIm_f8CQu1mN^}-_oxW! zekb>1gqDWEq;sX0Ebjwlqv6mYRP2O5Dyo(OmG;J_fg=$(PYGyzx`o}hvD|<=Fh^4h z=#T4AJqmCkJm|RG5IwRQ0WF7PU4hcvRTSZ7_B1sDi~ZLIj0t-D8L77E_HBmu=9;o#m99`FvT8zyp&sN56Gw_Y^B&8wP8}O(6YTnbYK%AX!PeDg+%> zMbj;~hd~e@gXVwAHa(^czhlvPTyn~QVIr7;dK&TtOPfS9#~p_2w90Adf87E7T`?jW z&mHaoW}6J?q=UG2Xc1moBtgFBiy&nUMx9YJm9jX9RME{CyO0eN2Z7fAzmbNE^)DLg zkDCZxVRcR&M%{9Y{?9w#b{-_;R`a0l>ROT-OgW551Ue-i3d*3n`8fKEBB9?hJQw5m bqaPx1i1cGG$N}iLNOB_+x2Wd_7EkXreë¥,ò_#mN%-%_å–¾Ù½¹?Ïqœº\æ�Tz°ˆ¨å4€hk;Zù? ê14B5B¦IãÄñøK& \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/18/8d1e847da762e20ec43db374ffba8c5ee40581 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/18/8d1e847da762e20ec43db374ffba8c5ee40581 new file mode 100644 index 0000000000000000000000000000000000000000..d3792e2004a6b520fdcb964f018a11239e4a32fb GIT binary patch literal 131 zcmV-}0DS*=0i}&G4gw(%MXfo-^v2CBvN$BhSlD<1YX)YOtVlvouP??USiYaU|3b+* zH5h5TYE=Xblb&L*MhCXS&Z9+{49^s;(?m0i7>7prXSNx~=S?8l#f`tI=X(CFM^HseSVr6`+8H01&*B2}0P zeoG=1;y4Z&S0T%jB#d~Hr!1WEB;iXEhm%zplPS&VfNj9KUdDlg!^rLS4HoU-Ff+jqi_ zJ32v@Wi^cY6}?_xi>Y8ZCC4?}!*@K9THJ9M>HvmeqtP(5L4V{lS~QESpqSi~gl8#X zY7>qo%9+fm!jl9d2AP2v$9bf40_;8^=!tol^QGdgm}CiGX%($#PNIblKcoaCIqmVt z4c?&}do*wd-3zoJBrBpLNhFAZ_Z0vJKm{<`7y*`Q>VW|QMotjEb>2Z(%$b_JO!-{? zFq^)5c{CO0zuhl?B`=OhoZi2_J3pZJFWHORP;$Ine6JR_XMdTGTM=_+DkO4-mQ>9l zMw5JoR4y180+`&f<-q7Tm*Xzz4@6E3!|wIG8>bV#@%+Gt(+?kunA=&F(5Qqp6c1&z zh^FBV`~X;h!5$8a`v!tfRX|q6nG$qj6@_G;JWk8id=E*pL)g_SBXZ9bNu-3l?jxr_ z#MOHcOlZe4|5k#c6Wi^r1~q?lT5__?NJxtC#`Ey&2WWj4G+8mjz%k-d)jwupY2 zhrPV%I$~A?KwI46XaRlJ`twRai|{gyHo3zM*%^6W5RON^wl}!a1@xQ|VC5o_P)C8& zANK6P*T_LxTNG~?xZXe$Hii@|MN#}+%(@7o%7xTI*T(8Q`cs$S+S32?Sw&~4 zAX;*jzfa*62F+5=s0B@;?uh^(mN2Z2jnSZm|S#|(n zI)kn|aNw*?Sv=W5GF{2L#5_SqDDXPo8X@Mu?rWBM?migTCWrt&s>qqysG?_lDjXbQ zDVJQtdd;9rC$9C5V+g?YH zTa&P6UbJSn?}YEYL2)<^+E8p`*e%`Db6vpY+M*A7r>}Mog7<5>-qwm)Uo7Ji9k+e| z1pSWhu^$PVsT1U;dQWIPy>`px5Y|u_jLl+&04HD@3f#6HO4@@~No|?Nf0~OS7CLTe AivR!s literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/1e/d2db048937886ab77c892d7ffa4bb3da6ae8a9 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/1e/d2db048937886ab77c892d7ffa4bb3da6ae8a9 new file mode 100644 index 0000000000000000000000000000000000000000..50c871fc9b60fd06d00f560159ae3affff141dbe GIT binary patch literal 163 zcmV;U09^lg0i}*j3c@fDMqTF=*^6cJKLrs5@8CL_Otsh=iBYd_#Ur?UAH0u8WuC_- zwehP~nI(n9IVyu>3<354$}5LT<-r-v;1Cup5nP7(@ zMI^^;Vev(Lwo9q<7++)FoJy*Nu5z2d*u8(aKhJTTIx6!{DhEASMAUK(8bB=T659BW R3vrkxIgArO#0S&tO1b>xOF#es literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/1f/660a3639a3c11ad69f8e7f0fcef1af842778d8 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/1f/660a3639a3c11ad69f8e7f0fcef1af842778d8 new file mode 100644 index 0000000000000000000000000000000000000000..c7d64a37f106188e607480d4121d2f054fae33f2 GIT binary patch literal 270 zcmV+p0rCEL0V^p=O;s>9FlI0`FfcPQQHYPv%*!l^kJl@xWOz3B(d zXRX2%krtd}m%UX!-NXP06mm1uixNvR^Ye-sD$1Uh%I7>>IPswA0`c{$-n_`pONN?* zP!(TVl9>ZGlgBZ1Q9VceikBf4K9|`QLMr4IS-_O%r=&s@-Cf=e?b+Mq!yQe4XSy{eCY1{%pFDstKZ0O5amzowmqb^rhX literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/27/e9ce4a241beb6bc95a87c57501f5df8bd389c3 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/27/e9ce4a241beb6bc95a87c57501f5df8bd389c3 new file mode 100644 index 0000000000000000000000000000000000000000..8613608d7b298f92e62b87f831021f76abe0ad0a GIT binary patch literal 148 zcmV;F0Biqv0V^p=O;s>7v0yMXFfcPQQHYPv%*!l^kJl@xWOz3B(ddp(R9R_J4p>QX?97v0yMXFfcPQQHYPv%*!l^kJl@xWOz3B(dgxpvp>%a==Q8W1rsc zKKk&j=H}CN=aRNQKXIGw9aKqqae5}mlyt|6)K2Sl40 CL`v=e literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 new file mode 100644 index 0000000000000000000000000000000000000000..adf64119a33d7621aeeaa505d30adb58afaa5559 GIT binary patch literal 15 WcmbQGc{wU*AM zvWq?u@#Kxj8JxD!6Gi|qP72gP1TYDeuudj}nce(E*UklE5`=n4ez1}xP}C{~HRzm! z$7qN&7!=Gu`ngT~;GZR}jx9_rUic<`aQ*t??o@pl*Rj9FlI0`FfcPQQHYPv%*!l^kJl@xWOz3B(d zXRX2%krtd}m%UX!-NXP06mm1uixNvR^Ye-sD$1Uh%I7>>IPswA0`c{$-n_`pONN?* zP!(TVl9>ZGvxD_&s>6KK2fh5EYnp}fu1hgVh`^NRr=&s@-Cf=e?b+Mq!yQe4XSy{eCY1{%pFDstKZ0RI1Z=oD>eaS32SzB}jEzve(iBw1` zo;T#b?@$+Cy0}e?8ip){M^-nhJ?DRT^hf z+|fv5633Vejd`9VI1)*oay%7DB9=79lNFBXl;nv<)qTgZx|CB%G>y?@h3vRc&>(Tj zI8vHOUEQ=%u0SQKEND5cmh%g+Ux5XwkQ6Zv#-v0u!4Z7*oPl{Pp{HOiwdPu9>Y~|< zMWmckNo_(T(kA6iBeAJP#v;|M{cD!;^_-$9ID`_WG!oN||Afb&i86^ENRm_aRmvot zZfP>%wOE=72`ZFj9ihvdB{9l~o-6Q9v6vcNb?CsDg*jmA0`5EJnsX-@KfZJW4|n|0 zDRLa=#HwG>>-DvmNlsFFT(f=pPA1BTJI2@q5aW}R6U!L%N6w-}qsR)1=>ttfmQt=a z;b@?otDI>vNg!g78HjP5M(teftK(gcyP!XmIkhae*Bjn?9sFh(gaMp>_*lf;&9a0=C9I)%7-vN^ zEq@S%zyb{J^>uOILhz{y$cY5kl1-eVknGc^X}O;7AsKcEyIy5f?YW|;QjphuP6-H;gX#GOV)&8QHeXg?C6pmH#iY*D>D~(J%9` zmp5HU%!vSKi#rl6pwBvgUP)*X!_1&f?QlbOM#Eu<$D>|*IJhze^erR6$z`ITjzX`0 z-E%{4gW-RRbQfs8blY#eLC3yW16$KHOJH0$6EKwWxbEgoIT*rN~3V#5Y+o0>4M%DA% zu8Hn9gJ!8_%z-9R_e1~?%!3YrkwX-P$7c?ho!NU7SNt$`J8tNjk!j#q=HIS%mK{LY z-k|FbJUFXThNomfaV-e1(Yby|SL!~g!u4o97It3~rItd*W_w`3Th7UEa>3-ZkyY{< zl{|nb43=^D24A~Da624z@QvH^!N=j~$$A^O{Vkt1Q^fS8S~%Vq>x>nZt~Qe<*EC=$ zONi;mH>Ep5*8Y}Q*wmB#wTk*M_|iP>Q9jf2?=QY==yf{2zx+X-QpuvvD1agX^!hM% zVK*~CfDr!km58XeSJpb`uqO4~L3iwSJ=`94%oMdLZ{$VC_4^)vKO7W?1GKlMtHGfD|Flrf>ZQ6c_2X~S*A~spPKQ1^8Au4cRtuI eVcs>0%>bN$B`5UTX4V)FnkBVqTmJ#51Q`)bgn2js literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/63/973d01988ba594743a8046c9c88c2aa527d307 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/63/973d01988ba594743a8046c9c88c2aa527d307 new file mode 100644 index 0000000000000000000000000000000000000000..3f771d5c1e30263214cd2a30914b52def2ef7c86 GIT binary patch literal 42 zcmV+_0M-9^0ZYosPf{?lV9?Sls7&UHj|Y;8$r-8f@%mg^#f3SUC8@?-0MJ1TW5lu) A#Q*>R literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 new file mode 100644 index 0000000..cf19499 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 @@ -0,0 +1 @@ +xm�OOA Å=ϧhö‰îãE& Á(ÀxœvºË�Ît3S@¿½Ëžš¦¯ï÷Ú5ñîoŠ¢P_Ëé jŽ�o¡áä£`2‚YL—x‹µÀ¥–JÍð»ãŒdƒp^¶DvM6ƒ…ÀnGxG¸G‚½Mþ4Š6 ƒª²]G¾¶â9VUï÷Ú'{x8 €coî34žð2¢ÚˆtùIkÇu.ÝÖÆ–ÿ2Õ4F=*G#½áƒ°vØÿŒ¢¹õZÏT>tœ8+Õ$pv)ë^ep´(æØ›«¨Jq.1î}âXf‡�Ý‘ ŠñÛË|º0ËÉj5›O—æc1þ|Ÿ·P\ÿÏXçLd1qGdj¦]8Ùˆ�m.†J]¡àþK0ª_òCš€ \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/6e/ac9768027d572282f4f50c9c8154d081303928 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/6e/ac9768027d572282f4f50c9c8154d081303928 new file mode 100644 index 0000000000000000000000000000000000000000..785458e1f8be5012a347e60865a784ab06073cc4 GIT binary patch literal 875 zcmV-x1C;!D0o7JbZ__{!<(ywJY7a>zW0i_iQ6&m3r+%rVToBr>z2juT_NKe*hN$X) zXJ*%SY-l9};y@I|_U`PPHy>}}tTY)Myx!k`QCL%f`YP*%NmZ6sdSRv4rgo`WVRxHJ zhoGyKu^ukF<;n19<8|rMqN#H}EX&S1m-!NvSXoB%o5^I7m(n>nR_X)`*_8g1EE}Bl zsC$PKppV6Sv`%Lw!V%1EgOjlA?n)8J9Kp`<+5Gex=Ev{OPT}@p|M3>$%KOW+oAV1= zdPPegPv>xQ`r-KIY!1_hgU9Kcoe_|Tj@ZlZ0iIl6UUi6s6~Gi0AcU^97h>kHEE1@U z!cx?-!UW>)J;&Kb#}Tq!x-}yL+lPSK8}WJC=F4~^K+;aQZmB5DseaxzxesgxPQR_C zT{t@O&?B*%>DKl1@MmVp*pz8>Mj^8CcHq+OM`G-OKaahoMc>#OX8i(hhlB_b`a_6R zgzO11cK`Xy_&EmD>6Yl|#bD^bb}%Ovg(Kz4RwpK)Mw`3=D@F&aUT4L`1^_q1so^rA~Z)(WbI zoq_g!SkBOS>1hcn=}A!z*8J?3dT<)nrYRMW(1>T1_NRwjcHzR%sd@q4fHJ+!E@YU? zhGfpn3XKHhmH}@m@8c@vfdxy2@*WjY-K^!NM_7@p2R$ggWT9?T)*E)UreFv8qo67& zP-$;$5^^L$&J!XU@1Du-RSY-q4w<9*1N7xMRLcTffCn9yYf6tSdqT6Wtb3p|_Xi<7 zojpyBz_R_dm7;@|e@gnRTby6oi^Hdog5pSsU34iW!=(%Kac4Hn&3IDm^~6IaX(HY= zXg7ovxOF2kNOi*8jhey1&T3XsADKB6PXc8Fd(S%QO1FZ2YS6AR)7w2X#|b zlGI>|ZbTwbm3Sy9gYM~av?G5?ZzVhzv|aoZv8uS+6Qnr&}1C&5D-4J`t%%D=)j;;plyrJBns#|CA|W#RLOw8T?oA|g=nz$ zyxB{;#ZjNvXoRw2!50e=u-CO05iLmH3wHM<4Uzehtp;01dk5Xby5MlrG$1W#)1wO| zK6IR}2iNeD+>IS3L^O~N-0Pr{dS0+s_5=3-1~NL0#8UtO literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/78/76e7751f6ce1a191c135a017afaaece86b6e63 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/78/76e7751f6ce1a191c135a017afaaece86b6e63 new file mode 100644 index 0000000000000000000000000000000000000000..6afd695d1abe82cb8bce8291996226528c5312e2 GIT binary patch literal 149 zcmV;G0BZku0V^p=O;s>7F=a3`FfcPQQ7|wtFpN(wN=+5U`Q*<&s9jtO3X{o*DFaaE>XzLEyyn_Q3wIDofC^wxww=S eoQqNuOHvgo^Gk~qKx&E=GE$3D^|$~d*cUrI-yGBc literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/83/bc6ba8802549076857fd3a69017dd26b0add3c b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/83/bc6ba8802549076857fd3a69017dd26b0add3c new file mode 100644 index 0000000000000000000000000000000000000000..9c9e366a96b65d4be6e10a33c41809f8ff3f7d49 GIT binary patch literal 193 zcmV;y06zbC0V^p=O;s?ouw*baFfcPQQP4}zEXhpI%P&f0NSI voSgjf)Rg$7%J`Jjw8YY!5(b+IQ;dWY*K3A4`nPXtpSI=15uG;x(Y8(bFvL<^)>_cihAfO-YlERyOPx&mFO);^T*X{RW;H%xKQd6YdJLj zPuUE(PEj|{RzM$%w`iR%8-(YuwF9ogvis180OmQIU0iRk-oWnS3|3c(cCAcXF; z7h>(OsdH$J!bWtm#T?@AE!R0##}%?)adIO7r<)KpIq`ln^WV}CLXsu?pP(qL=={7L zDj(3ylD~m!K(v@LMPNA};IbfOW5g2FS&wcW==m*=uIxVm{ zG(?EN4x+lak{a=4C?_)tJ&L(!@*AS#dzc(t__=L0*m9Z8pFK)3@#;&WznJrbekIRTAV zk97BSEH~f|oug3(^yNC#hyq*)4>~S))E?O+KAJ=lpy)bj~MDfGqABF+f_ literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e new file mode 100644 index 0000000000000000000000000000000000000000..e68f806e4b9f3596d3c9fcc6aa1f59610147f291 GIT binary patch literal 77 zcmV-T0J8sh0R_Q94uBvG1VGQcViWINOnitx0I6C-SyS-f@14n&8S63~PD8mo literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/8c/5be9edbe3253011bbcd7c3b0f58e0b23b64006 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/8c/5be9edbe3253011bbcd7c3b0f58e0b23b64006 new file mode 100644 index 0000000000000000000000000000000000000000..1ea5b73c70021097d7d7427c74a7a69177b2ba94 GIT binary patch literal 148 zcmV;F0Biqv0V^p=O;s>7v0yMXFfcPQQHYPv%*!l^kJl@xWOz3B(d5W=Jc_&s9jtO3X{o*DKD*FDgkcEh$#W%q;*i6^c^xQc{b! jxRe!~i&7IyQWYxmON$iBGE>Wo6*5wbQuVk1gVGqx_PZe6 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/b9/d7998b28816a1910160972b501976d1c3137e9 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/b9/d7998b28816a1910160972b501976d1c3137e9 new file mode 100644 index 0000000000000000000000000000000000000000..76acb00dcbb25834af129ae3e9972b5027751662 GIT binary patch literal 1283 zcmV+e1^oJW0j*YBbJ|7}?z4Wy+HNCzVnkebTE{bakU=JDK)6WQO){xwkrr5xcIDlb zDedIH_pB~lT$2z_7>_~PJ-6?C=Q2w82%Z1@%j+Kw4-bv@46_MGk|;&lM4~YlND-;R zOz;_rREXm^WL$+TPm(a=NuIKB%#(yKNF0uqVNAw2PZX-|TZYjgj0mhqj7Cdj#)W|f zj#J8zR9L9$ripS1CQ;?VnRRw%{R-mO;6cg-L6m_rDOQv-1b=Eu!9ALgQ}C7;Q>8L_ z*=)uPPfubuFfX;glTLVvnEkNNRP*VW_9EuYR7m6uEvT9T zMx%U!R4y1e0-W6P<-lk=SHlk24@6E3!|rzbcTPKe+xG(>-hTX4U~XqwLZgz_P&|~; z0!_p9`~XBiz`nUD?i&a`RRLKMXG+kKRTPqW`t(_@raO+bIKZx!8Ie1#NFpWVb=PqU z$9S?^T0uyWrq@bA(MNEWnFd7ObKC8%1L<`%6kG16G>#Lpz=Bwi&RkHnwEXHvZ*}$+ zudNL&ei_M5*^R5vD^kv^R`Io$fD~h^1^;d-S?m;8WeYO0>6s1BkcKM%Ulp%0-&D~n z^RQDkT_I*gK(zS`M|0@2)}Pk`T0}q7Y?E8kkexxlAB4j}x7GKqbpbtR1X#I9B-Byh z^lrL#;H)|PZ;|eT%~y8oo#VC5%N4N|NwWmTg*5_435)A)Zk2-}sE%t^6v&!GPZ_VpS9E$pMSb?jiw%T7myp625a!PBxVlkw z-IlGM0JV;DJD68O32fZ3Y8M{y+&W4CPwwjP<9j%EJMYG>IZ zgz0!4*K^=qow9herlh=2s3PYZ;FzA>)3@u9`)E>|AYBWcRKOXZi`Z_klnX9myj60i&hR>Na<|2 zcGen7B5b9nQLczjQ<`Aivv13AxTsL7__D6K8nV3&^bLczH3@6vMOSuv zPWYkk6)%TD3+ikLYo&X3p=-C?SoDkT*{kgr!H3nkUet;)U+m!$9k+b{6#b4LupbGU tsZ->pdPO+dzii9B5H?VliH%}=fFNKI3fz{SM>>LLdD=9M{{RMXAP|Mic@Y2r literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/c7/beda138c33c089001615811df53292c56ce647 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/c7/beda138c33c089001615811df53292c56ce647 new file mode 100644 index 0000000000000000000000000000000000000000..739a1d5c3dc0d9e97ebe684aea25781f70ea2605 GIT binary patch literal 194 zcmV;z06qVB0V^p=O;s?ouw*baFfcPQQP4}zEXhpI%P&f0NSgU%uUE6wD~S=lbCdU;DU~w>hu@0RG}mqm7_tVgLXD literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/d5/33aa0b42cd49ffe6b9745faf19ed6f688eae48 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/d5/33aa0b42cd49ffe6b9745faf19ed6f688eae48 new file mode 100644 index 0000000000000000000000000000000000000000..961bb6a752de873ef33076662d1c94231d706b33 GIT binary patch literal 476 zcmV<20VDo+0ew?lYui8&?6ZHxR(^;BMJ|OxDTH8Zlccn^A?`z;j+3;qFTJ}pcPlme z_uV@=ZbCowAjIA5?9A+{vQ)u`_itZKU(dT3=9Tet^gSF0K9HXnccj2T@#!lLaWXM2 zDCM<7rQqrc3Zd1A7$d7=pa-m3>84ShSozLcRg>+US1nmfKe18OpiX>=nvLJb;xaeoFpS-kf;NzY z=0W>Cl{Ez{o%VW<4n4!k5A}15jCc`GDmle4hIEGg&v&W{+C+RF%j{g5 zuG3R|qRuw{;+*v8ri6tgFi;0M3d0u>jE^j?u>lDmia)7zFQMwnN}fK|2H1Yz-EP*~ z#qJhPJC=vq>tGV@8kQ1L>hc#h8O|PM0Fq_Rrq?V}1ld#Ww0+KY{jzr4uVgK|&no}9 SJu~@1N*(t7<>VJ-V-4$wl9FlI0`FfcPQQHYPv%*!l^kJl@xWOz3B(d zXRX2%krtd}m%UX!-NXP06mm1uixNvR^Ye-sD$1Uh%I7>>IPswA0`c{$-n_`pONN?* zP!(TVl9>ZGGjGlG45r#}rKT@mdFC{RTxc|~)PO0^Pf3L+y1TqzpoIUan)%V?yL=@Y z(~6F%|AHziNi8k`8&va@`Ow|zyDB2<^S?c@G&CwTE&c{oQ40ZYosPf{>6HDX9B%Fk6u$x6&i&(}*yQpn6L$S*2U$jwhl%_-*MO3q0v zE>>{VfbjKvLBg6=T%38OIXUrZnW;G`3bs(idY*YDsp+XjZXi(&kOJF~qS91NpyJf> W_`Lj*c;Ym literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 new file mode 100644 index 0000000000000000000000000000000000000000..711223894375fe1186ac5bfffdc48fb1fa1e65cc GIT binary patch literal 15 WcmboeKbS6(DiPJS2($ literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/refs/heads/master b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/refs/heads/master new file mode 100644 index 0000000..803db80 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/git/refs/heads/master @@ -0,0 +1 @@ +16fd55a08b9ad1af4282cafccf5c14adf1f2a1dc diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/manage.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/manage.py new file mode 100644 index 0000000..d533aa0 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_add_not_null_column_followed_by_default.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/__init__.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/admin.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/apps.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/apps.py new file mode 100644 index 0000000..fc04070 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class TestAppConfig(AppConfig): + name = 'test_app' diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations/0001_create_table.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations/0001_create_table.py new file mode 100644 index 0000000..09d00ce --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations/0001_create_table.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 14:05 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='A', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('null_field', models.IntegerField(null=True)), + ], + ), + ] diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations/0002_add_new_not_null_field.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations/0002_add_new_not_null_field.py new file mode 100644 index 0000000..faa3052 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations/0002_add_new_not_null_field.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 14:06 +from __future__ import unicode_literals + +from django.db import migrations, models + +from test_app import migrations_utils + +class Migration(migrations.Migration): + + dependencies = [ + ('test_app', '0001_create_table'), + ] + + operations = [ + migrations.AddField( + model_name='a', + name='new_not_null_field', + field=models.IntegerField(default=1), + preserve_default=False, + ), + migrations_utils.AddDefaultValue( + model_name='a', + name='new_not_null_field', + value='1', + ) + ] diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations/__init__.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations_utils.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations_utils.py new file mode 100644 index 0000000..8805d56 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/migrations_utils.py @@ -0,0 +1,72 @@ +from django.db.migrations.operations.base import Operation +from django.utils.functional import cached_property + + +class AddDefaultValue(Operation): + reversible = True + + sql_base = "ALTER TABLE `{0}` ALTER COLUMN `{1}` SET DEFAULT '{2}';" + sql_base_reverse = "ALTER TABLE `{0}` ALTER COLUMN `{1}` DROP DEFAULT;" + + def __init__(self, model_name, name, value): + self.model_name = model_name + self.name = name + self.value = value + + def deconstruct(self): + kwargs = { + 'model_name': self.model_name, + 'name': self.name, + 'value': self.value + } + return ( + self.__class__.__name__, + [], + kwargs + ) + + @classmethod + def is_correct_vendor(cls, vendor): + #return vendor.startswith('mysql') or vendor.startswith('postgre') + return True + + def state_forwards(self, app_label, state): + """ + Take the state from the previous migration, and mutate it + so that it matches what this migration would perform. + """ + # Nothing to do + # because the field should have the default setted anyway + pass + + def database_forwards( + self, app_label, schema_editor, from_state, to_state): + """ + Perform the mutation on the database schema in the normal + (forwards) direction. + """ + if self.is_correct_vendor(schema_editor.connection.vendor): + to_model = to_state.apps.get_model(app_label, self.model_name) + sql_query = self.sql_base.format( + to_model._meta.db_table, self.name, self.value) + schema_editor.execute(sql_query) + + def database_backwards( + self, app_label, schema_editor, from_state, to_state): + """ + Perform the mutation on the database schema in the reverse + direction - e.g. if this were CreateModel, it would in fact + drop the model's table. + """ + if self.is_correct_vendor(schema_editor.connection.vendor): + to_model = to_state.apps.get_model(app_label, self.model_name) + sql_query = self.sql_base_reverse.format( + to_model._meta.db_table, self.name) + schema_editor.execute(sql_query) + + def describe(self): + """ + Output a brief summary of what the action does. + """ + return 'Add to field {0} the default value {1}'.format( + self.name, self.value) diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/models.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/models.py new file mode 100644 index 0000000..dda78f1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/models.py @@ -0,0 +1,5 @@ +from django.db import models + +class A(models.Model): + null_field = models.IntegerField(null=True) + new_not_null_field = models.IntegerField(null=False) diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/tests.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/views.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_app/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/__init__.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/settings.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/settings.py new file mode 100644 index 0000000..6070f2b --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/settings.py @@ -0,0 +1,120 @@ +""" +Django settings for test_project_add_not_null_column_followed_by_default project. + +Generated by 'django-admin startproject' using Django 1.11.6. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.11/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'gtb+mohs%gf0+#fr89vw7e&#edmv=q8!iv+n&j_soawk$tkj3^' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'test_app' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'test_project_add_not_null_column_followed_by_default.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'test_project_add_not_null_column_followed_by_default.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.11/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django_fake_database_backends.backends.mysql', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.11/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.11/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/urls.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/urls.py new file mode 100644 index 0000000..735de5d --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/urls.py @@ -0,0 +1,21 @@ +"""linter_test_project URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.11/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url +from django.contrib import admin + +urlpatterns = [ + url(r'^admin/', admin.site.urls), +] diff --git a/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/wsgi.py b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/wsgi.py new file mode 100644 index 0000000..6741b31 --- /dev/null +++ b/tests/test_project_fixtures/test_project_add_not_null_column_followed_by_default/test_project_add_not_null_column_followed_by_default/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for linter_test_project project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_add_not_null_column.settings") + +application = get_wsgi_application() diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column b/tests/test_project_fixtures/test_project_create_table_with_not_null_column deleted file mode 160000 index ba1eccf..0000000 --- a/tests/test_project_fixtures/test_project_create_table_with_not_null_column +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ba1eccf45ea15453cdb70eccb93febdfeb020b5b diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/.gitignore b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/.gitignore new file mode 100644 index 0000000..63973d0 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/.gitignore @@ -0,0 +1,3 @@ +*.pyc +__pycache__/ +*sqlite3 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/COMMIT_EDITMSG b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/COMMIT_EDITMSG new file mode 100644 index 0000000..64988b6 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/COMMIT_EDITMSG @@ -0,0 +1 @@ +All files diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/HEAD b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/config b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/config new file mode 100644 index 0000000..eeb8dd7 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/config @@ -0,0 +1,5 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/description b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/applypatch-msg.sample b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..8b2a2fe --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/commit-msg.sample b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/post-update.sample b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-applypatch.sample b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..b1f187c --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-commit.sample b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-commit.sample new file mode 100644 index 0000000..68d62d5 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-push.sample b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-push.sample new file mode 100644 index 0000000..1f3bceb --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-push.sample @@ -0,0 +1,54 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +IFS=' ' +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + else + if [ "$remote_sha" = $z40 ] + then + # New branch, examine all commits + range="$local_sha" + else + # Update to existing branch, examine new commits + range="$remote_sha..$local_sha" + fi + + # Check for WIP commit + commit=`git rev-list -n 1 --grep '^WIP' "$range"` + if [ -n "$commit" ] + then + echo "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-rebase.sample b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-rebase.sample new file mode 100644 index 0000000..33730ca --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up-to-date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/prepare-commit-msg.sample b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..f093a02 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first comments out the +# "Conflicts:" part of a merge commit. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/update.sample b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/update.sample new file mode 100644 index 0000000..d847583 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to blocks unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero="0000000000000000000000000000000000000000" +if [ "$newrev" = "$zero" ]; then + newrev_type=delete +else + newrev_type=$(git cat-file -t $newrev) +fi + +case "$refname","$newrev_type" in + refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/index b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/index new file mode 100644 index 0000000000000000000000000000000000000000..14b03316ae9dd3c8d2847ea08f3a853c9c7ee35f GIT binary patch literal 1400 zcmZ?q402{*U|<4bzQ|8jHezC_3@{ob#=y1W3Ijvq5+EA}WRj=bGS28;I;F&_!R_RU z9<8P7m)RM(^wKj+GSl<&i&9|EC9z zJ@vb7UdPE**$g&t^KvuOixNvR^Ye=J4Gatn1AhP zkC{hp6r8qXv0Y2^OD;E;Gs_r+5a#Enq~<_E3}^xnfZQwJ_4omd1_}Yw-AW}ib8Tv# zG9S7-eOE9rp4co;uT~8*x1NV7U3%Si!4CqDVoVmftsg`W}f}TS1yYr zeqZ{+;mjGSVb3CYQjyaR$-J`6)N+`4xgv|Z8$jj>X7vg{%`-$Z4|{sH0{gq5C_gJT zxddNaCgTfP?ZJbf05W*HBkHYQ0-^tD2{!4yZh+Fx0;(z*PTn+ z`uxOgws#C>B>KO!2%a_~Kb%#QP|ZF7rbT*z)`HW80jj->YttP!%QkF}yp%HSSwqFE pp3KQhH?fgyZ+UTgCNwAQSQfW~b 1509046997 +0200 commit (initial): Init +dbb570854ffac36f2c6c83f05b462f488ab9ea2e ba1eccf45ea15453cdb70eccb93febdfeb020b5b David-Wobrock 1509047009 +0200 commit: All files diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/logs/refs/heads/master b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/logs/refs/heads/master new file mode 100644 index 0000000..a75a602 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/logs/refs/heads/master @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 dbb570854ffac36f2c6c83f05b462f488ab9ea2e David-Wobrock 1509046997 +0200 commit (initial): Init +dbb570854ffac36f2c6c83f05b462f488ab9ea2e ba1eccf45ea15453cdb70eccb93febdfeb020b5b David-Wobrock 1509047009 +0200 commit: All files diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/1c/10d0afe6768cf62149ccdade6d7c21e9f563c2 b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/1c/10d0afe6768cf62149ccdade6d7c21e9f563c2 new file mode 100644 index 0000000000000000000000000000000000000000..484862b7f6edde79350f6a67a2659b79823a742f GIT binary patch literal 189 zcmV;u07CzG0V^p=O;s?oFlI0`FfcPQQP4}zEXhpI%P&f0NSR literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 new file mode 100644 index 0000000..cf19499 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 @@ -0,0 +1 @@ +xm�OOA Å=ϧhö‰îãE& Á(ÀxœvºË�Ît3S@¿½Ëžš¦¯ï÷Ú5ñîoŠ¢P_Ëé jŽ�o¡áä£`2‚YL—x‹µÀ¥–JÍð»ãŒdƒp^¶DvM6ƒ…ÀnGxG¸G‚½Mþ4Š6 ƒª²]G¾¶â9VUï÷Ú'{x8 €coî34žð2¢ÚˆtùIkÇu.ÝÖÆ–ÿ2Õ4F=*G#½áƒ°vØÿŒ¢¹õZÏT>tœ8+Õ$pv)ë^ep´(æØ›«¨Jq.1î}âXf‡�Ý‘ ŠñÛË|º0ËÉj5›O—æc1þ|Ÿ·P\ÿÏXçLd1qGdj¦]8Ùˆ�m.†J]¡àþK0ª_òCš€ \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/6f/60aa19497fb69e565a609b77a9d9a153ce5166 b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/6f/60aa19497fb69e565a609b77a9d9a153ce5166 new file mode 100644 index 0000000000000000000000000000000000000000..f83db9c28516dd7ea7f40ea07f5c53103cd053d3 GIT binary patch literal 472 zcmV;}0Vn==0ew?VZ`&{o-Pyl_a}G^`!2yOIh5?9~Qov4$~&Kccj2T@%bwbu_#On zN_p*2DY(9dQYoj6SE~G2fIJi{p)i4b6_Fckb!T~6ENfYUxq;8H~9p%2L!#N9-qma z9-!66LQ4T6IRxSZ1`rcb{KL}6E+Fthv%E%$)aL|DjGfTL1hsY;A&cC3I(2d{CV>fb zPo@E<v|aoZv8uS+6Qnr&}1C&5D-4J`t%%D=)j;;plyrJBns#|CA|W#RLOw8T?oA|g=nz$ zyxB{;#ZjNvXoRw2!50e=u-CO05iLmH3wHM<4Uzehtp;01dk5Xby5MlrG$1W#)1wO| zK6IR}2iNeD+>IS3L^O~N-0Pr{dS0+s_5=3-1~NL0#8UtO literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/76/cc5dc6375ab11196a4a33e8483e90a4644cca6 b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/76/cc5dc6375ab11196a4a33e8483e90a4644cca6 new file mode 100644 index 0000000000000000000000000000000000000000..27897af2ba98151fbb9d184d325db5f72b7efd34 GIT binary patch literal 103 zcmV-t0GR)H0WFKM3V|=>JL!~Qk{_$J=w=Xg;Jk&0Xgf|M3*$eiC1i9M=VE0E##vLs JM!apACa0lsFd6^= literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/7c/cafd52dbcbcf6381c02cf1f7de90dbfa1a43cc b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/7c/cafd52dbcbcf6381c02cf1f7de90dbfa1a43cc new file mode 100644 index 0000000000000000000000000000000000000000..4308badd03e68333290b3a97d3f6425452a0b396 GIT binary patch literal 1274 zcmVUQ$qdv+ypaZO@p!Y~N!*>nHSWt_4xI{*2+^~2%eq0yN~bjpyxQW829Xu>#>SjaHv zY>s0Y#vDfyhcX(cI9w4q3n`N!Ez&fMSz2TiRW~ie=wgaF+)mK=0hx&w-H4KmP$Xo; zWp&d;g#cx!(%rIJE$bIxzXshI;}{VNW@M2hj3W5T83DsciqF7KY|Nz0#bvXZuvl27 zlG=orWlc<*N@7#8oW!D8d)6%F%Na%!Fdn5uNW>-^&m)?ECQLY5Mrnb?iDI%QH;nCL9e^ zP*D(_cZ~{&aZt3P-#<`A;zyLl8?+*YN02RP!V+2^Ls0RiJ7&<}t&Up`EF{g5Tnz5PqX*zj*dNkn| zzb#k4;#WsF$(C>KFAm7^l)jpWf<>#vk8&|T|I2*ZiiA;9B3@9WKo2n*7gHn)PQehs z!?udn4gg(N%1P;*n)HxoX7{uum1Gcw69ogZAtMqeF>1B-<5>)XPpmfl+!DOn%dpNCWMtbi8{Q!eRsO%qUdMb}M8C|#UfygSF)Ie3 zE#^_YfIe&edCj3k4044wvBM4784d?Rq#|m1qDw3re_Dv2EG64 zL~9&h+3k0Z*D){Gkd`>hQy3K17)-=8sr$H9j)b5h*Lc!Wpbh#U;^U{X0`wWwi)xSR zTvgr{WpER?15Xh)hG-UD4u9+U7DGH47fR^bSanBz>f&2l`hPx4_k;?ZC0F_T9A1v^ zVaCWWaPI)=3GLCQbY%OMfV%vvJz8b zL1U=JiCO1{a z8+j$KQON@U!@wB@Z^Ikg_wNS7PIzngT!_P9_+&L!p45KVI8nl3^C*oCH^y2cfw?W! z1S%xA^hish^V$&(z>9qKJ{#`JF>e@*dBD$bTu(;6uKX~eJA`d@buv* zXhWTiV3l-R7piK@EkzylTCaBxf)8uDTF&%n*Sohs$8Fy~L%&DM$d5V65U`Q*<&s9jtO3X{o*DFaaE>XzLEyyn_Q3wIDofC^wxww=S eoQqNuOHvgo^Gk~qKx&E=GE$3D^|$~d*cUrI-yGBc literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e new file mode 100644 index 0000000000000000000000000000000000000000..e68f806e4b9f3596d3c9fcc6aa1f59610147f291 GIT binary patch literal 77 zcmV-T0J8sh0R_Q94uBvG1VGQcViWINOnitx0I6C-SyS-f@14n&8S63~PD8mo literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/91/ea44a218fbd2f408430959283f0419c921093e b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/91/ea44a218fbd2f408430959283f0419c921093e new file mode 100644 index 0000000000000000000000000000000000000000..263fc8c87e325bcaa3c19492252655b82f498d2d GIT binary patch literal 77 zcmV-T0J8sh0ZYosPf{>5W=Jc_&s9jtO3X{o*DKD*FDgkcEh$#W%q;*i6^c^xQc{b! jxRe!~i&7IyQWYxmON$iBGE>Wo6*5wbQuVk1gVGqx_PZe6 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/9f/a7aec38f3098aa3035f03195a084ca8c2a6fd4 b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/9f/a7aec38f3098aa3035f03195a084ca8c2a6fd4 new file mode 100644 index 0000000000000000000000000000000000000000..0027b718633fc4188a5c0af8bc63319126a04784 GIT binary patch literal 149 zcmV;G0BZku0V^p=O;s>7v0yMXFfcPQQHYPv%*!l^kJl@xWOz3B(d zfL=pNRI-p4L*M<`>T3r+Km+j6ijLWVE`WV;0qU|#k$ U+U1Re`J88~(<~431p2#7EPKFEBLDyZ literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/d3/7815c8d2a6f36f5ee21d79ca061aac9eda3096 b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/d3/7815c8d2a6f36f5ee21d79ca061aac9eda3096 new file mode 100644 index 0000000000000000000000000000000000000000..acbb322015821f39596718b512a75d1cada25232 GIT binary patch literal 240 zcmV5HDfR|FfcPQQHYPv%*!l^kJl@xWOz3B(d zXRX2%krtd}m%UX!-NXP06mm1uixNvR^Ye-s?rG(3jwpW-b#~I1cDeYA?ak|W?4jo5 z=BK3QfK4hp6MM`&YNOz^C5!D^nqP9cxtv)BRaBB%Tmn{8^OX6}-RZk3BJ1=†Pò F�Ý2Î`‹Qôµ‡ÿq!.ÏÔÄ(‹< \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/de/2a6fb35877e85acd92f4871e5fd18783ae0c3f b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/de/2a6fb35877e85acd92f4871e5fd18783ae0c3f new file mode 100644 index 0000000000000000000000000000000000000000..3de107b668b5d233c0331f0f66a3da879c91637c GIT binary patch literal 120 zcmbzwR3e_Fruy!P3Xo&KkN z&U#+dUXilHrttQh;ON*VU-CEKp7-mn+4{#%R^_aa{P=NZas^Vz=SoX5ei$z1;l0P6HO#{d8T literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 new file mode 100644 index 0000000000000000000000000000000000000000..711223894375fe1186ac5bfffdc48fb1fa1e65cc GIT binary patch literal 15 WcmboeKbS6(DiPJS2($ literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/refs/heads/master b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/refs/heads/master new file mode 100644 index 0000000..2cb9811 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/git/refs/heads/master @@ -0,0 +1 @@ +ba1eccf45ea15453cdb70eccb93febdfeb020b5b diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/manage.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/manage.py new file mode 100644 index 0000000..6f60aa1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_create_table_with_not_null_column.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/__init__.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/admin.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/apps.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/apps.py new file mode 100644 index 0000000..fc04070 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class TestAppConfig(AppConfig): + name = 'test_app' diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/migrations/0001_create_table_with_not_null_field.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/migrations/0001_create_table_with_not_null_field.py new file mode 100644 index 0000000..d391b69 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/migrations/0001_create_table_with_not_null_field.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 13:47 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='A', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('not_null_field', models.IntegerField()), + ], + ), + ] diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/migrations/__init__.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/models.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/models.py new file mode 100644 index 0000000..76cc5dc --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/models.py @@ -0,0 +1,4 @@ +from django.db import models + +class A(models.Model): + not_null_field = models.IntegerField(null=False) diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/tests.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/views.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_app/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/__init__.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/settings.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/settings.py new file mode 100644 index 0000000..7ccafd5 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/settings.py @@ -0,0 +1,121 @@ +""" +Django settings for test_project_create_table_with_not_null_column project. + +Generated by 'django-admin startproject' using Django 1.11.6. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.11/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'gtb+mohs%gf0+#fr89vw7e&#edmv=q8!iv+n&j_soawk$tkj3^' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'test_app' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'test_project_create_table_with_not_null_column.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'test_project_create_table_with_not_null_column.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.11/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.11/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.11/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/urls.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/urls.py new file mode 100644 index 0000000..735de5d --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/urls.py @@ -0,0 +1,21 @@ +"""linter_test_project URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.11/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url +from django.contrib import admin + +urlpatterns = [ + url(r'^admin/', admin.site.urls), +] diff --git a/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/wsgi.py b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/wsgi.py new file mode 100644 index 0000000..6741b31 --- /dev/null +++ b/tests/test_project_fixtures/test_project_create_table_with_not_null_column/test_project_create_table_with_not_null_column/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for linter_test_project project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_add_not_null_column.settings") + +application = get_wsgi_application() diff --git a/tests/test_project_fixtures/test_project_drop_column b/tests/test_project_fixtures/test_project_drop_column deleted file mode 160000 index 24f18b5..0000000 --- a/tests/test_project_fixtures/test_project_drop_column +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 24f18b5897f6361405dd5c1c900869d693430801 diff --git a/tests/test_project_fixtures/test_project_drop_column/.gitignore b/tests/test_project_fixtures/test_project_drop_column/.gitignore new file mode 100644 index 0000000..63973d0 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/.gitignore @@ -0,0 +1,3 @@ +*.pyc +__pycache__/ +*sqlite3 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/COMMIT_EDITMSG b/tests/test_project_fixtures/test_project_drop_column/git/COMMIT_EDITMSG new file mode 100644 index 0000000..3b5cc13 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/COMMIT_EDITMSG @@ -0,0 +1,22 @@ +All files + +# Veuillez saisir le message de validation pour vos modifications. Les lignes +# commençant par '#' seront ignorées, et un message vide abandonne la validation. +# Sur la branche master +# Modifications qui seront validées : +# nouveau fichier: .gitignore +# nouveau fichier: manage.py +# nouveau fichier: test_app/__init__.py +# nouveau fichier: test_app/admin.py +# nouveau fichier: test_app/apps.py +# nouveau fichier: test_app/migrations/0001_create_table.py +# nouveau fichier: test_app/migrations/0002_drop_column.py +# nouveau fichier: test_app/migrations/__init__.py +# nouveau fichier: test_app/models.py +# nouveau fichier: test_app/tests.py +# nouveau fichier: test_app/views.py +# nouveau fichier: test_project_drop_column/__init__.py +# nouveau fichier: test_project_drop_column/settings.py +# nouveau fichier: test_project_drop_column/urls.py +# nouveau fichier: test_project_drop_column/wsgi.py +# diff --git a/tests/test_project_fixtures/test_project_drop_column/git/HEAD b/tests/test_project_fixtures/test_project_drop_column/git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/tests/test_project_fixtures/test_project_drop_column/git/config b/tests/test_project_fixtures/test_project_drop_column/git/config new file mode 100644 index 0000000..eeb8dd7 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/config @@ -0,0 +1,5 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true diff --git a/tests/test_project_fixtures/test_project_drop_column/git/description b/tests/test_project_fixtures/test_project_drop_column/git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/tests/test_project_fixtures/test_project_drop_column/git/hooks/applypatch-msg.sample b/tests/test_project_fixtures/test_project_drop_column/git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..8b2a2fe --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_drop_column/git/hooks/commit-msg.sample b/tests/test_project_fixtures/test_project_drop_column/git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/tests/test_project_fixtures/test_project_drop_column/git/hooks/post-update.sample b/tests/test_project_fixtures/test_project_drop_column/git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-applypatch.sample b/tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..b1f187c --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-commit.sample b/tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-commit.sample new file mode 100644 index 0000000..68d62d5 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-push.sample b/tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-push.sample new file mode 100644 index 0000000..1f3bceb --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-push.sample @@ -0,0 +1,54 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +IFS=' ' +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + else + if [ "$remote_sha" = $z40 ] + then + # New branch, examine all commits + range="$local_sha" + else + # Update to existing branch, examine new commits + range="$remote_sha..$local_sha" + fi + + # Check for WIP commit + commit=`git rev-list -n 1 --grep '^WIP' "$range"` + if [ -n "$commit" ] + then + echo "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-rebase.sample b/tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-rebase.sample new file mode 100644 index 0000000..33730ca --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up-to-date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/tests/test_project_fixtures/test_project_drop_column/git/hooks/prepare-commit-msg.sample b/tests/test_project_fixtures/test_project_drop_column/git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..f093a02 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first comments out the +# "Conflicts:" part of a merge commit. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/tests/test_project_fixtures/test_project_drop_column/git/hooks/update.sample b/tests/test_project_fixtures/test_project_drop_column/git/hooks/update.sample new file mode 100644 index 0000000..d847583 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to blocks unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero="0000000000000000000000000000000000000000" +if [ "$newrev" = "$zero" ]; then + newrev_type=delete +else + newrev_type=$(git cat-file -t $newrev) +fi + +case "$refname","$newrev_type" in + refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/index b/tests/test_project_fixtures/test_project_drop_column/git/index new file mode 100644 index 0000000000000000000000000000000000000000..b7a985fd7249caea784f8268602cfb1b4618ee34 GIT binary patch literal 1384 zcmZ?q402{*U|<4b{>V>OHezC_3@{of#>c?5(u9GbaS4zO12W0eZ5d~DFP&0i)!=sW zM32@|^~>xGTzcu5C7J1Y`9-NPg^{1E_h>%PFM!cNagceYsOB-7nfLd;sZgJ;Sial8 zazj)=*FXK;sSKRCiFt|Xsd@#K43Qu9Y!Lrgv<5~)%vrMt)f@(fXLBFT-gNPrvv;@V zy7H(Sho1BVPh=1&Ni8mkPb?_VkB`sH%PfhH2N?+lAoC>WEGmG}P;<-B%(d^a`26|S zRXNwz&oi8w4lUVt)MSnvgCN}8#FX63JeWJB9o%$4=7DIac@=2pMg3u6=W90mSZA%m z6pMX?Ljqd%=DtflFa;n zAwYXBGAx`o2Wrm&RC^ektEQRX6I7XIczfOJ!yfxH7n$DQYr>$8!ycpfl%o8C_~iVY z(p+%pFo5GxIl7bw6h0stYR^+tdvL^~JT`k!qZH_mk49Q1J}??;em9!=*83GV-n`Sf zSn9~9Z)%*=Zbdfw>B}()A+u5^4HN>V<2Ccq%(ba`%6#bV z^j#H^_4(hPSQ;9YnihXUN+%!-z{W;?vItknUt|F?Ptiy>Xy(~ZeC4u8;`gO5 z9L}7P8ul!bClxvEkjyK~Of83*mn*Wky8&dLU{nw`!pF$fDZA%uyWs^mg~rhi^4EpRPNXwDtLk+idR`6ma^d zv)d)83#swZ>u(oJl5%r7ra d&jjb&gnub|a*7(O7OA>zco4C!koUY=7XWPr)}#Oc literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/info/exclude b/tests/test_project_fixtures/test_project_drop_column/git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/tests/test_project_fixtures/test_project_drop_column/git/logs/HEAD b/tests/test_project_fixtures/test_project_drop_column/git/logs/HEAD new file mode 100644 index 0000000..e0c0e72 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/logs/HEAD @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 6a34c365ae581e0bd73521ffc69021e039d54d19 David-Wobrock 1509047306 +0200 commit (initial): Init +6a34c365ae581e0bd73521ffc69021e039d54d19 424a54e5916970e0c48fdcefc707b00d07d8190a David-Wobrock 1509047317 +0200 commit: All files +424a54e5916970e0c48fdcefc707b00d07d8190a 24f18b5897f6361405dd5c1c900869d693430801 David-Wobrock 1509047363 +0200 commit (amend): All files diff --git a/tests/test_project_fixtures/test_project_drop_column/git/logs/refs/heads/master b/tests/test_project_fixtures/test_project_drop_column/git/logs/refs/heads/master new file mode 100644 index 0000000..e0c0e72 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/logs/refs/heads/master @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 6a34c365ae581e0bd73521ffc69021e039d54d19 David-Wobrock 1509047306 +0200 commit (initial): Init +6a34c365ae581e0bd73521ffc69021e039d54d19 424a54e5916970e0c48fdcefc707b00d07d8190a David-Wobrock 1509047317 +0200 commit: All files +424a54e5916970e0c48fdcefc707b00d07d8190a 24f18b5897f6361405dd5c1c900869d693430801 David-Wobrock 1509047363 +0200 commit (amend): All files diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/03/0a39f4edf75b9d3a5506a722b3726296a87ef4 b/tests/test_project_fixtures/test_project_drop_column/git/objects/03/0a39f4edf75b9d3a5506a722b3726296a87ef4 new file mode 100644 index 0000000000000000000000000000000000000000..cb2bc2b6c72036925c5a885b75856cf0b451866e GIT binary patch literal 239 zcmV5HDfR|FfcPQQHYPv%*!l^kJl@xWOz3B(d zXRX2%krtd}m%UX!-NXP06mm1uixNvR^Ye-sqOz18trrYB`de_t;+KAFW+^6WD?!c4 z%}+_q0h_d6apTQ9or|T8eEO!wIqgys6l0!spVib6JNP3lK6e;3x_jjq=r3<{#8 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/1f/c7cd90b9ed61da4f88a4455d34977143489aa7 b/tests/test_project_fixtures/test_project_drop_column/git/objects/1f/c7cd90b9ed61da4f88a4455d34977143489aa7 new file mode 100644 index 0000000000000000000000000000000000000000..d25ba48ab02ccd7f9600a4dae2ed4480beae73e3 GIT binary patch literal 166 zcmV;X09pTd0V^p=O;s>7Gh{F{FfcPQQP4}zEXhpI%P&f0NS}2YMD>9cw?;c##|a;QIB&-D#vUtYaOwQX3T%I?zroRi~7g?L6Aj V{|O7fgxC**%w zvn$6<=!XtM?7n&P-kVX`QVAbdt9SGF%RcyJY1|Us0NuzZax-H)@(dJSzQP!0Gt+=l zPFqw8Zf+n`%4*}3%0A6N9tyco7*8$_$Tc>)Z+VezzN~k5d-b?2iih3Zqx!breE+)5 zK0wA8SaqJBuwqqv>QqH-Z&NuNcMREeB4$5M9b%WplZE<8yCdZldCaYL`iK@C!&x>y zW7RXN2o*{zh+4JAVPeDQ3Oj~}WO3^~`QPMoC{75vqyb;ZtRA7!riF$)1hNRkC-mS^ z2XP8p7kZDtC(ZJjT11_5Fd_6p6C$*2#|g4Y%Hye(doc-2pa(KFSRH=GgT$YtPCS!f zLoNV0IHU=|D!(A!#1l)-F-##{VE^+StGqS=U&pezl*a4$WS^;TYj<@?dUBJ)S`rwk zhZKe3s{qCY7S~vVgb&%DRCYi&S+N;3%M?L&k$c^~X1je`JMCArmfRav4@lA};#5-8C@KEBe7(~6kYdnJGOfi{Q=ecw) z(X4tS;wfoom5E+~auj4HXOgvuUXR8(z^EuYl7v0yMXFfcPQQHYPv%*!l^kJl@xWOz3B(dx%qV6xumVnPuymE2USvDoSq3XCEaneY{T}*ODWTyHB`Ln$(+1&6B_`|=R^}F Cf=k-~ literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/5a/6a22e2af1152c5fb11a8a3e94eac9a21612b22 b/tests/test_project_fixtures/test_project_drop_column/git/objects/5a/6a22e2af1152c5fb11a8a3e94eac9a21612b22 new file mode 100644 index 0000000000000000000000000000000000000000..9f46cf27513e61c3ed88418ec109f645b0b6c423 GIT binary patch literal 138 zcmV;50CoR(0V^p=O;s>7HeoO{FfcPQQ7|wtFpN(wN=+!Q`a+jkU=JD08u3DCYe+tqy-ivt-QN} zx}E&@p4Ekm3l8aoVG!EgbJ_2F=Q57i7+p2r{QSe|>8aM9`^l6cL8PR~RGta*0c^u2=^rk(fA4JVXma^hcQi%kUp2?NgZVZ)S}W#6E~aq z4T#@?m6&mYXaWXfUs9GJ_{tdt7idH-!6Ty0q)f$4qY<(|;KE4dLcrn%Ng7IHL$Z_x zqEX$UQRtU5f+krMp@<5J*kp4@KMBDSp&Tv!C?n#VjBzsAvZNr?Xq++*CWNM)q1%i` zAxeEY6L330L!xX|(19}xwLrxUoX6@Io->-9-x`kTwXNYL!Wh@I>J`0R9}6i@{Ft0q zV$a|Gu~6#HJx>AXd9_+iQx5%}(O^-}qk=-RBoRwvlE@7lb(AF{qtYKofEYvuFb=ao z#RSA1LePZ``kfoJASBJv5hUP5 z!ut~t21o@o+BgB8s@)R}6bwz*dvAUKSoEnJU&L%Cewt2RUz|<&^{>m-FXYu33FGD4 z$LkZiyhvWnJ;D6d;zzldU;U}?_abD8E)mZXw4!nb7>%FIKVESQX&o<5kv@x>!Ix!w*Bd0X$e;f6us68@>=1isjk7z zdse&MH6gsFf?~)0n1*3QRz4>f!kKX@pRiN@>8>oWOYzr9W98+wr2*sLm0~Ve^tD~d|O4Yh{HkIc#RkifM|=kA1t8G;y>;< zln6UjY!f@u5S^iIyWVKnZQ1=hl|YBeJkEF|AXi+oH|QF!x#8(Qc}R1{-WsjQklJ+SC8a;XM0G8WvK;?=iBRJVG~-FG%lDW{-7$ zlid4^SK@2R>`_teJ@aA<;V%WG@BmUgI2}tBqpsC56uK`GVdL`9(op*^3XophHI$Srzls%ScmfIXOY|qx^DJ6R^NoRDlFl6Lp$*pQAw`0 z0MPqJPo1t>=d+HhgLEZSE5XsejcMeo+IwGI zhw&1nk`tS}svtYsP!F11oW)&|Oy%tRt1pUo6^`$(zn{f~)8GXIkSxG(3tBA9VTuR< z;oslLh;mY;&Fch4qOQ^JjEs)ywd}U)m^w-7SzdXqp6PwG`}yL?Z9$%mU_7*%*D61Y z$wMu4o3D2l+>h&hHE`waI-jQnI&V47CHl=@`cA-UDld^0t5#n-K5dKn4kk(HZS{N# ZfJ?wY<614%SJVv}#co5_{smq+{h8HpY*hdN literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/63/973d01988ba594743a8046c9c88c2aa527d307 b/tests/test_project_fixtures/test_project_drop_column/git/objects/63/973d01988ba594743a8046c9c88c2aa527d307 new file mode 100644 index 0000000000000000000000000000000000000000..3f771d5c1e30263214cd2a30914b52def2ef7c86 GIT binary patch literal 42 zcmV+_0M-9^0ZYosPf{?lV9?Sls7&UHj|Y;8$r-8f@%mg^#f3SUC8@?-0MJ1TW5lu) A#Q*>R literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 b/tests/test_project_fixtures/test_project_drop_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 new file mode 100644 index 0000000..cf19499 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 @@ -0,0 +1 @@ +xm�OOA Å=ϧhö‰îãE& Á(ÀxœvºË�Ît3S@¿½Ëžš¦¯ï÷Ú5ñîoŠ¢P_Ëé jŽ�o¡áä£`2‚YL—x‹µÀ¥–JÍð»ãŒdƒp^¶DvM6ƒ…ÀnGxG¸G‚½Mþ4Š6 ƒª²]G¾¶â9VUï÷Ú'{x8 €coî34žð2¢ÚˆtùIkÇu.ÝÖÆ–ÿ2Õ4F=*G#½áƒ°vØÿŒ¢¹õZÏT>tœ8+Õ$pv)ë^ep´(æØ›«¨Jq.1î}âXf‡�Ý‘ ŠñÛË|º0ËÉj5›O—æc1þ|Ÿ·P\ÿÏXçLd1qGdj¦]8Ùˆ�m.†J]¡àþK0ª_òCš€ \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/6a/34c365ae581e0bd73521ffc69021e039d54d19 b/tests/test_project_fixtures/test_project_drop_column/git/objects/6a/34c365ae581e0bd73521ffc69021e039d54d19 new file mode 100644 index 0000000..b36c27a --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/objects/6a/34c365ae581e0bd73521ffc69021e039d54d19 @@ -0,0 +1 @@ +x¥�1!E­9ÅôÆÍ, ‰ÙXØxkf•(’V¯/Æ#X¾Ÿ¼ÿBÉ95í´i•Y©c0J2LΣAÖŠ�“Ö.Ĭ*á×v+Nþ•âîR¨–p‡Cüâðþáñš}z ¡äF�ÝÚOh`‹Qôµ‡ÿq!ÎÏÔÄ"Ö;ç \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee b/tests/test_project_fixtures/test_project_drop_column/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee new file mode 100644 index 0000000000000000000000000000000000000000..66ccc09794ebf5efe30fa53a069a0084dc53b13f GIT binary patch literal 391 zcmV;20eJp+0gX~!OT#b}^*O)dGK8*B6Xt`1f)64N2R?~DiO#f5w~QvYB&i?&-kYq2 zF;MJN8qPiE+;dWOSiy36bvB#LI&Fh;o1lEy^bYr`4)FZ=0Jmscy&aqk8ZBc_I|c89 z>v|aoZv8uS+6Qnr&}1C&5D-4J`t%%D=)j;;plyrJBns#|CA|W#RLOw8T?oA|g=nz$ zyxB{;#ZjNvXoRw2!50e=u-CO05iLmH3wHM<4Uzehtp;01dk5Xby5MlrG$1W#)1wO| zK6IR}2iNeD+>IS3L^O~N-0Pr{dS0+s_5=3-1~NL0#8UtO literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/7a/9637de11249631dbaeebc348bf69a235dfbd34 b/tests/test_project_fixtures/test_project_drop_column/git/objects/7a/9637de11249631dbaeebc348bf69a235dfbd34 new file mode 100644 index 0000000000000000000000000000000000000000..fbb70e0aac32b9345e9b3a3131327ddf0ed3049d GIT binary patch literal 252 zcmVKg~R3iuz~Wigw9E2hX$tDmzS)N4ZNa7FCt24f8hB`*uep-7^_a;EbMD` zE?HgfpMV{k!-@3X8Q{F1;^dKYP-b*K!emt{N3K;&Z90%8DCfRPwzr&7LxL%1Q-X9_ zgaB_hsrWOiRopg&Kst#dT8Xw(7~l#YvzU#7MhuaQailw-bzL*wc}#5U`Q*<&s9jtO3X{o*DFaaE>XzLEyyn_Q3wIDofC^wxww=S eoQqNuOHvgo^Gk~qKx&E=GE$3D^|$~d*cUrI-yGBc literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e b/tests/test_project_fixtures/test_project_drop_column/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e new file mode 100644 index 0000000000000000000000000000000000000000..e68f806e4b9f3596d3c9fcc6aa1f59610147f291 GIT binary patch literal 77 zcmV-T0J8sh0R_Q94uBvG1VGQcViWINOnitx0I6C-SyS-f@14n&8S63~PD8mo literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/91/ea44a218fbd2f408430959283f0419c921093e b/tests/test_project_fixtures/test_project_drop_column/git/objects/91/ea44a218fbd2f408430959283f0419c921093e new file mode 100644 index 0000000000000000000000000000000000000000..263fc8c87e325bcaa3c19492252655b82f498d2d GIT binary patch literal 77 zcmV-T0J8sh0ZYosPf{>5W=Jc_&s9jtO3X{o*DKD*FDgkcEh$#W%q;*i6^c^xQc{b! jxRe!~i&7IyQWYxmON$iBGE>Wo6*5wbQuVk1gVGqx_PZe6 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/95/a7313de6fcb6553cd7a0e4993ee1c6c2760d0e b/tests/test_project_fixtures/test_project_drop_column/git/objects/95/a7313de6fcb6553cd7a0e4993ee1c6c2760d0e new file mode 100644 index 0000000000000000000000000000000000000000..13fc88e4c4df3149cd1f7151ac71ab9565e437ca GIT binary patch literal 1267 zcmVO666f5%Ex3g_6pIkS7ho8d_pQ z@sx(LQTfs+obc^1GA?GTG3iLut??9Vl|WCoum=bx~kBDF$;Y_EzAX$wXYfeO&%ZUZ0RC zd3^V9c|;%2*z0*9IbJS)R*U(?pXP2WBF;>OM8?pPsu{#+oK2C+1Or0=lUueN8Exl! z)B*jz$cSOs-R|JtX$S8Ip6|iw=P!B8?KF*PSim|W6Ut~FO~dVbKCl3TeS4eVHxPWv z0Q?A2|Usp6=&X;8LjJwGxo`44kH> z0iO5VcDw69dL12#E%Or^MKM`oK`cmTCa8L{yz)P>7^E6)a*G?XGaL;3U^MKu2K^gdKrgj>D-*GVn(>|9ZP)glHD3S8Q=23A+HQSt z`fc-S1!6^#G=|Y&jln3wqN;OS#SrjIa)qE=3N$_sM11~IU_L*C3egQwpX*xNpbTz( zchJ{_wIMl6UI2gPGc1G%av`=04Wo>{RG;jcwV;Q`>d_d2d_N?o^Q>*yW?kfoeb3yQz$bpRIV z^KA^H1WN*c4;&m@Gxa1Y`C**4ZQs_TP(!cCwF&JMXR+E!zUlNkZr_2kDm~G74L|u1 zQ$;Q|0%7*;p1xg;(q|Lc1n!EdRtCxVn)`N(rCf3m>CJ(Hp~Z~+UvBCg*V9s7y_5%# zg`qO?-v_t0=iLv6?cmPtx)6uKaA*CMo>YEU$k4)JyC{qe*2Y>RNrbKRl*ttFXhLJG zd+}Z24i{yVN^Gp_s|wk{ih3~gk}T;GHdV79FTQBzRXTpW{C<`YLBnq-fT96}yD)NL zFVjGP5dQt0h$uH#+Pq}2B6aP4XJmJrpfzag32G8n&+-oJ_MG6;pr0R({1(*N2-Zcn zd8zBP*hKU}xA|uK!2h(O>jf+y-}!zm(P_)`&e3o95qqJasX9k)qDO!2@UkuTJ=iQ^ d*46W^0GxmY$9G$L&S(!B1+`%s{{kv#2WS~#Y!?6k literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/a4/b2b15bde4d6744a83c82f5c27287dc2ffd0f39 b/tests/test_project_fixtures/test_project_drop_column/git/objects/a4/b2b15bde4d6744a83c82f5c27287dc2ffd0f39 new file mode 100644 index 0000000..16d025e --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/objects/a4/b2b15bde4d6744a83c82f5c27287dc2ffd0f39 @@ -0,0 +1,4 @@ +x]PËjÃ0ìY_±�ƒ�›8mÒð!4¤ä�[o%ÙZµ²d$¹�~}%+�¶:13;3«Jê +–Ëùݲû jÍ…j×0¸&{™À+*4Ì!‡êÛ¦Z E^ù +´‚żxÊŠy¶XBñ¸~X‘Æè(m7¤D×kã`P›#•Ây7iIòÑ/çÕE׉և ­ì :?”¤–ÌZ8\¨ô&ʯàtMø#”p‚I(áÍ 1Ž=*Žªh=ñ> +�‘Ó}Ø.^™`ó+âÅ _ÿʤãdàÃQ¬Ã2Ù$³?h#Pr[Æ�(Œwšž\¶Ê7ƒÓ» M™Ñz áe(=ƒÞˆŽ™ýÄÓ±hüVâË�ÿ=/ùBSi‹4–Øo“éôo�š&j�’Ž•nÑ{å°EÓƒ`Ìø?¼Ù���äy`£* \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/bf/21b1d9dc89a31ac4f2f6260996da59814e2f1e b/tests/test_project_fixtures/test_project_drop_column/git/objects/bf/21b1d9dc89a31ac4f2f6260996da59814e2f1e new file mode 100644 index 0000000000000000000000000000000000000000..bf5a5154d5e37edf1506ce568c0c31756bce138d GIT binary patch literal 67 zcmV-J0KETr0ZYosPf{?oWJoK@&s9jtO3X{o*GoxK$jmLsFDg;U%}+_qDdyrz&PgmT ZR&dmS@b!E_!kSiGoCQE(E&v8T7F9mf9%BFi literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/d4/942ceb12ecd35cfbb0d21fee3062c019e659c3 b/tests/test_project_fixtures/test_project_drop_column/git/objects/d4/942ceb12ecd35cfbb0d21fee3062c019e659c3 new file mode 100644 index 0000000000000000000000000000000000000000..61838b73811200ffe83eb5103c98c4fb6fa14df5 GIT binary patch literal 149 zcmV;G0BZku0V^p=O;s>7v0yMXFfcPQQHYPv%*!l^kJl@xWOz3B(d+nRXA49V+AHgDNX6$^k1Wj(vK& z`{={BnwwA8olDyK{KRdxcTgqe#p#(KQ_>wb%QkF}yp%HSSwqFEp3KQhH?aW#76(M- DCcH|J literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/dd/58746c94048ea2fe86d773395b68803c4ef832 b/tests/test_project_fixtures/test_project_drop_column/git/objects/dd/58746c94048ea2fe86d773395b68803c4ef832 new file mode 100644 index 0000000000000000000000000000000000000000..96700181145893892557a5158c84de029c104d6c GIT binary patch literal 167 zcmV;Y09gNc0V^p=O;s>7Gh{F{FfcPQQP4}zEXhpI%P&f0NSSny}2Co Vd&4F9cLqrZB%ehd1_0O)L?GW2Qbzy) literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 b/tests/test_project_fixtures/test_project_drop_column/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 new file mode 100644 index 0000000000000000000000000000000000000000..711223894375fe1186ac5bfffdc48fb1fa1e65cc GIT binary patch literal 15 WcmboeKbS6(DiPJS2($ literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_drop_column/git/refs/heads/master b/tests/test_project_fixtures/test_project_drop_column/git/refs/heads/master new file mode 100644 index 0000000..e48b674 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/git/refs/heads/master @@ -0,0 +1 @@ +24f18b5897f6361405dd5c1c900869d693430801 diff --git a/tests/test_project_fixtures/test_project_drop_column/manage.py b/tests/test_project_fixtures/test_project_drop_column/manage.py new file mode 100644 index 0000000..378f8de --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_drop_column.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) diff --git a/tests/test_project_fixtures/test_project_drop_column/test_app/__init__.py b/tests/test_project_fixtures/test_project_drop_column/test_app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_drop_column/test_app/admin.py b/tests/test_project_fixtures/test_project_drop_column/test_app/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/test_app/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/tests/test_project_fixtures/test_project_drop_column/test_app/apps.py b/tests/test_project_fixtures/test_project_drop_column/test_app/apps.py new file mode 100644 index 0000000..fc04070 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/test_app/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class TestAppConfig(AppConfig): + name = 'test_app' diff --git a/tests/test_project_fixtures/test_project_drop_column/test_app/migrations/0001_create_table.py b/tests/test_project_fixtures/test_project_drop_column/test_app/migrations/0001_create_table.py new file mode 100644 index 0000000..a4b2b15 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/test_app/migrations/0001_create_table.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 14:36 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='A', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('null_field', models.IntegerField(null=True)), + ], + ), + ] diff --git a/tests/test_project_fixtures/test_project_drop_column/test_app/migrations/0002_drop_column.py b/tests/test_project_fixtures/test_project_drop_column/test_app/migrations/0002_drop_column.py new file mode 100644 index 0000000..7a9637d --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/test_app/migrations/0002_drop_column.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 14:36 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('test_app', '0001_create_table'), + ] + + operations = [ + migrations.RemoveField( + model_name='a', + name='null_field', + ), + ] diff --git a/tests/test_project_fixtures/test_project_drop_column/test_app/migrations/__init__.py b/tests/test_project_fixtures/test_project_drop_column/test_app/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_drop_column/test_app/models.py b/tests/test_project_fixtures/test_project_drop_column/test_app/models.py new file mode 100644 index 0000000..bf21b1d --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/test_app/models.py @@ -0,0 +1,4 @@ +from django.db import models + +class A(models.Model): + pass diff --git a/tests/test_project_fixtures/test_project_drop_column/test_app/tests.py b/tests/test_project_fixtures/test_project_drop_column/test_app/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/test_app/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/tests/test_project_fixtures/test_project_drop_column/test_app/views.py b/tests/test_project_fixtures/test_project_drop_column/test_app/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/test_app/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/__init__.py b/tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/settings.py b/tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/settings.py new file mode 100644 index 0000000..62ba4ba --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/settings.py @@ -0,0 +1,121 @@ +""" +Django settings for test_project_drop_column project. + +Generated by 'django-admin startproject' using Django 1.11.6. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.11/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'gtb+mohs%gf0+#fr89vw7e&#edmv=q8!iv+n&j_soawk$tkj3^' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'test_app' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'test_project_drop_column.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'test_project_drop_column.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.11/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.11/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.11/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/urls.py b/tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/urls.py new file mode 100644 index 0000000..735de5d --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/urls.py @@ -0,0 +1,21 @@ +"""linter_test_project URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.11/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url +from django.contrib import admin + +urlpatterns = [ + url(r'^admin/', admin.site.urls), +] diff --git a/tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/wsgi.py b/tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/wsgi.py new file mode 100644 index 0000000..6741b31 --- /dev/null +++ b/tests/test_project_fixtures/test_project_drop_column/test_project_drop_column/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for linter_test_project project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_add_not_null_column.settings") + +application = get_wsgi_application() diff --git a/tests/test_project_fixtures/test_project_multi_commit b/tests/test_project_fixtures/test_project_multi_commit deleted file mode 160000 index dc16039..0000000 --- a/tests/test_project_fixtures/test_project_multi_commit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dc16039b7458a98bcf9be2b92389e176ae1d9461 diff --git a/tests/test_project_fixtures/test_project_multi_commit/.gitignore b/tests/test_project_fixtures/test_project_multi_commit/.gitignore new file mode 100644 index 0000000..63973d0 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/.gitignore @@ -0,0 +1,3 @@ +*.pyc +__pycache__/ +*sqlite3 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/COMMIT_EDITMSG b/tests/test_project_fixtures/test_project_multi_commit/git/COMMIT_EDITMSG new file mode 100644 index 0000000..822b1e1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/COMMIT_EDITMSG @@ -0,0 +1,10 @@ +Add accepted migration + +# Veuillez saisir le message de validation pour vos modifications. Les lignes +# commençant par '#' seront ignorées, et un message vide abandonne la validation. +# Sur la branche master +# Modifications qui seront validées : +# nouveau fichier: test_app/migrations/0003_add_new_nullable_field.py +# modifié: test_app/models.py +# modifié: test_project_multi_commit/settings.py +# diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/HEAD b/tests/test_project_fixtures/test_project_multi_commit/git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/config b/tests/test_project_fixtures/test_project_multi_commit/git/config new file mode 100644 index 0000000..eeb8dd7 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/config @@ -0,0 +1,5 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/description b/tests/test_project_fixtures/test_project_multi_commit/git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/hooks/applypatch-msg.sample b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..8b2a2fe --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/hooks/commit-msg.sample b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/hooks/post-update.sample b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-applypatch.sample b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..b1f187c --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-commit.sample b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-commit.sample new file mode 100644 index 0000000..68d62d5 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-push.sample b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-push.sample new file mode 100644 index 0000000..1f3bceb --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-push.sample @@ -0,0 +1,54 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +IFS=' ' +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + else + if [ "$remote_sha" = $z40 ] + then + # New branch, examine all commits + range="$local_sha" + else + # Update to existing branch, examine new commits + range="$remote_sha..$local_sha" + fi + + # Check for WIP commit + commit=`git rev-list -n 1 --grep '^WIP' "$range"` + if [ -n "$commit" ] + then + echo "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-rebase.sample b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-rebase.sample new file mode 100644 index 0000000..33730ca --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up-to-date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/hooks/prepare-commit-msg.sample b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..f093a02 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first comments out the +# "Conflicts:" part of a merge commit. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/hooks/update.sample b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/update.sample new file mode 100644 index 0000000..d847583 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to blocks unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero="0000000000000000000000000000000000000000" +if [ "$newrev" = "$zero" ]; then + newrev_type=delete +else + newrev_type=$(git cat-file -t $newrev) +fi + +case "$refname","$newrev_type" in + refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/index b/tests/test_project_fixtures/test_project_multi_commit/git/index new file mode 100644 index 0000000000000000000000000000000000000000..54ffd1ca963134465f3a191ae4bf21ff7c548fac GIT binary patch literal 1520 zcmZ?q402{*U|<4bfyhr*HezC_3@{of#>c?5R+)jJaS4zO12W0eZ5d~DFP&0i)!=sW zM32@|^~>xGTzcu5C7J1Y`9-NPg^{1!vSdte#=vNxILJH|RP&h4AH0m5CU$RvyZpX8 z-;(N#C#`#2=gz>Ho0ylFo~l<+$q@Nr&j#_2MQdO*#GG}^sOB&*Je&Jy_NI&1oV~j> z*Of=zIP|0^cp`&HNosLPd}2X?etdjpUS>&rJjh5e0GTH_XHfx+hPv-3nz{Bp7N0-g zx+>?|`gw*^)1f8%j+)GoV-SR!o0yWDnFn*Hw1b-t$UG1YHSaf?c~O5@*!h~xKGs>Q zFh!&VC)s6hl}~37K$urhPz-h>(3}fq2l_z%2GbDp*0G_Q$E3!2f#;DOx6`MC9aG=M zFD?ICFS2P3g9hBZ+|2Z%#FEVXykdO=0|UeO@Pfkkg83&QI1ROj z1JxeJXT|OtKCNttUzD-dOLAIGL0)Y2<8B5c9QGK+C#Iyt=cSg%=jE5g=auH<#HVGZ z=A^(wp8=T8+%B65{+|G(&oHX10__8(k9AyV_MY*1yoE)0`;W=J6PtRR>y5wVhW|N< z(_UkQy+Aube#EpF7(dFC6mvH)ysMP7J&s?ve?0Fk10H*dQ%g!R^U~o#9{J&{tY)Dq3&=krvA1fV_6VZd!^}|}`}B7A z(T8s}H=nLMm$dcyiQ8=N7!+~)r?dzXtw8hDBvi8xfN7Clpz+}N6h<|lac#QeX4!`A xk(W}YJ!`0V)ss1S=_WRO=9d?zXM(cXgKgDc(^4m9?YuOJZ`oUcyrhqf<^b4T3Hbm3 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/info/exclude b/tests/test_project_fixtures/test_project_multi_commit/git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/logs/HEAD b/tests/test_project_fixtures/test_project_multi_commit/git/logs/HEAD new file mode 100644 index 0000000..afe94b7 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/logs/HEAD @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 39d82d794ccb9af40a19c1b708eea6f90695c4d8 David-Wobrock 1509050010 +0200 commit (initial): Init +39d82d794ccb9af40a19c1b708eea6f90695c4d8 44330921696018f8f1480df897b38310549982cb David-Wobrock 1509050030 +0200 commit: All files +44330921696018f8f1480df897b38310549982cb fe961bc4402a57bace36648e1a6f1998bae3c5e3 David-Wobrock 1509050084 +0200 commit: Add accepted migration +fe961bc4402a57bace36648e1a6f1998bae3c5e3 dc16039b7458a98bcf9be2b92389e176ae1d9461 David-Wobrock 1509381925 +0100 commit (amend): Add accepted migration diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/logs/refs/heads/master b/tests/test_project_fixtures/test_project_multi_commit/git/logs/refs/heads/master new file mode 100644 index 0000000..afe94b7 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/logs/refs/heads/master @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 39d82d794ccb9af40a19c1b708eea6f90695c4d8 David-Wobrock 1509050010 +0200 commit (initial): Init +39d82d794ccb9af40a19c1b708eea6f90695c4d8 44330921696018f8f1480df897b38310549982cb David-Wobrock 1509050030 +0200 commit: All files +44330921696018f8f1480df897b38310549982cb fe961bc4402a57bace36648e1a6f1998bae3c5e3 David-Wobrock 1509050084 +0200 commit: Add accepted migration +fe961bc4402a57bace36648e1a6f1998bae3c5e3 dc16039b7458a98bcf9be2b92389e176ae1d9461 David-Wobrock 1509381925 +0100 commit (amend): Add accepted migration diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac b/tests/test_project_fixtures/test_project_multi_commit/git/objects/09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac new file mode 100644 index 0000000..4d7d160 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/objects/09/d00ce23e0b42f2c18895ee5fa577f57f14b2ac @@ -0,0 +1,3 @@ +x]PËjÃ0ìÙ_±�ƒ�;Ôm øRrÈ­·„m­�ZY2zÒ¯¯dåY„˜™�™UÃee™?Ì }L¡•”‰~Öté«G¢¼£@U¤ÐaóU‹^B‘Eö RÀ2/^Ò"O—%O«¼Œ:% ¤³Æ*$Ø0JeÀ +æÌ‘pfœ×QÒÉ/£ÍY7°Þ…1)ô7à•QËk­a¦’«(»€óU�;L0Ãj|(‹£8¢ (Z†ÚŸ“ð89úí|à…ñ67o +Ýú{_&™&=ï�¨¬âu¼¸C;†œê*„a¸“˜Ñø¼U¶¶Fn½4©Ý‹´S­|錊 µ:’o<ž�ÊmÅ~±Úºßs’T�ÔHB‰Ý&žÏï{øÐ$–s2UºFï„ÁUH÷‚)ãÿüájwr>Dqá£& \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/2c/2d5b22159ce4123f0ecd22d631684742a6f298 b/tests/test_project_fixtures/test_project_multi_commit/git/objects/2c/2d5b22159ce4123f0ecd22d631684742a6f298 new file mode 100644 index 0000000000000000000000000000000000000000..5b474660e040c53c634be32c1f7ba720afc27606 GIT binary patch literal 168 zcmV;Z09XHb0V^p=O;s>7Gh#3_FfcPQQP4}zEXhpI%P&f0NSRD Wi7(7|9=3HI&R36Lz5@WOiA4rLDNfG- literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/2f/eca9a38c232b4cb06c39d2db0b3d9be23a67e2 b/tests/test_project_fixtures/test_project_multi_commit/git/objects/2f/eca9a38c232b4cb06c39d2db0b3d9be23a67e2 new file mode 100644 index 0000000000000000000000000000000000000000..9aecb911e36b140c010789cdeefc0f14994a0048 GIT binary patch literal 240 zcmV5HDfR|FfcPQQHYPv%*!l^kJl@xWOz3B(d zXRX2%krtd}m%UX!-NXP06mm1uixNvR^Ye-s4(M+!^)fzv)`jEFyZ|*8w%>VAyrAaf z=BK3QfK8gzKhxs2fS1K=w@Bq3ujJ1>-+HV9s;DHjxCE@G<|*@`yVG}7MAqkjdtzy5 qRBBrM4XUOrGqoJ7X5uTCMH0U+ec^ECjMT7akvyr$X$JuQP-nlO*Lo)a literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/39/d82d794ccb9af40a19c1b708eea6f90695c4d8 b/tests/test_project_fixtures/test_project_multi_commit/git/objects/39/d82d794ccb9af40a19c1b708eea6f90695c4d8 new file mode 100644 index 0000000000000000000000000000000000000000..57e787db57857015a077a97565295459c582a67e GIT binary patch literal 129 zcmV-{0Dk{?0i}&G4gw(%0Ihk&_QuPCK$gT93macx&BC4%MG}Jgeb4v=%b8*(wOY#n zP21JzB4C+}%gI}l*b9e<9>rOnDf?iEW)`slt%}caZ5@vBRr2QCxVLnJUH;7v0yMXFfcPQQHYPv%*!l^kJl@xWOz3B(dwb%QkF}yp%HSSwqFEp3KQhH?aW#Vsu6f DtJ+Lk literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/42/9e00355cee29f0d18bfcbc67555f9c8fbe0cf0 b/tests/test_project_fixtures/test_project_multi_commit/git/objects/42/9e00355cee29f0d18bfcbc67555f9c8fbe0cf0 new file mode 100644 index 0000000000000000000000000000000000000000..003a2f3b3a2bde810a7e5cdb53d96cb7d5c983b7 GIT binary patch literal 240 zcmV5HDfR|FfcPQQHYPv%*!l^kJl@xWOz3B(d zXRX2%krtd}m%UX!-NXP06mm1uixNvR^Ye-sIvUQe46Vv}-nzwpGeb$U!1k9@-$KpF z%}+_q0h@GpdA~pj|5G*dqsw>sN;IYw9aH}WRaBB%Tmn{8^OX6}-RZk3BJ15HDfR|FfcPQQHYPv%*!l^kJl@xWOz3B(d zXRX2%krtd}m%UX!-NXP06mm1uixNvR^Ye-s4(M+!^)fzv)`jEFyZ|*8w%>VAyrAaf z=BK3QfKB>p>DuTl+U@DJv(ibk<^HBa4F>j5MJ1`lC15o*Pni$hoxZCgvOfRY6H7y* pQq$sZP&H+lspVib6JNP3lK6e;3x_jjq=r3<R literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 b/tests/test_project_fixtures/test_project_multi_commit/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 new file mode 100644 index 0000000..cf19499 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 @@ -0,0 +1 @@ +xm�OOA Å=ϧhö‰îãE& Á(ÀxœvºË�Ît3S@¿½Ëžš¦¯ï÷Ú5ñîoŠ¢P_Ëé jŽ�o¡áä£`2‚YL—x‹µÀ¥–JÍð»ãŒdƒp^¶DvM6ƒ…ÀnGxG¸G‚½Mþ4Š6 ƒª²]G¾¶â9VUï÷Ú'{x8 €coî34žð2¢ÚˆtùIkÇu.ÝÖÆ–ÿ2Õ4F=*G#½áƒ°vØÿŒ¢¹õZÏT>tœ8+Õ$pv)ë^ep´(æØ›«¨Jq.1î}âXf‡�Ý‘ ŠñÛË|º0ËÉj5›O—æc1þ|Ÿ·P\ÿÏXçLd1qGdj¦]8Ùˆ�m.†J]¡àþK0ª_òCš€ \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/73/47b0f2a9845fa268ad4a19967c706e5d7be38b b/tests/test_project_fixtures/test_project_multi_commit/git/objects/73/47b0f2a9845fa268ad4a19967c706e5d7be38b new file mode 100644 index 0000000000000000000000000000000000000000..621f4fc1cb882e93252ee56b37a204041d5c4f7a GIT binary patch literal 296 zcmV+@0oVR`0bP*6PQx$|L^U8Q_FU`an}IOGdHqO3|KuqZ~q*G}>)p z3=g6+>lAkmUe2ra)l^=@%`wX$jG&3MAl*rF(7@{=#>G1KDx!)Z{!*$f(Cjs-{oW#-pB{Y$&vjaJR45ohv^!AsrC(4Ly?}(o|(-6 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee b/tests/test_project_fixtures/test_project_multi_commit/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee new file mode 100644 index 0000000000000000000000000000000000000000..66ccc09794ebf5efe30fa53a069a0084dc53b13f GIT binary patch literal 391 zcmV;20eJp+0gX~!OT#b}^*O)dGK8*B6Xt`1f)64N2R?~DiO#f5w~QvYB&i?&-kYq2 zF;MJN8qPiE+;dWOSiy36bvB#LI&Fh;o1lEy^bYr`4)FZ=0Jmscy&aqk8ZBc_I|c89 z>v|aoZv8uS+6Qnr&}1C&5D-4J`t%%D=)j;;plyrJBns#|CA|W#RLOw8T?oA|g=nz$ zyxB{;#ZjNvXoRw2!50e=u-CO05iLmH3wHM<4Uzehtp;01dk5Xby5MlrG$1W#)1wO| zK6IR}2iNeD+>IS3L^O~N-0Pr{dS0+s_5=3-1~NL0#8UtO literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 b/tests/test_project_fixtures/test_project_multi_commit/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 new file mode 100644 index 0000000000000000000000000000000000000000..250bef6ac737f97163f7f541ed98f1f4581b0f67 GIT binary patch literal 72 zcmV-O0Jr~m0ZYosPf{>5U`Q*<&s9jtO3X{o*DFaaE>XzLEyyn_Q3wIDofC^wxww=S eoQqNuOHvgo^Gk~qKx&E=GE$3D^|$~d*cUrI-yGBc literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/7f/dd1712d35fb3950479fa65119efa83a04f41fc b/tests/test_project_fixtures/test_project_multi_commit/git/objects/7f/dd1712d35fb3950479fa65119efa83a04f41fc new file mode 100644 index 0000000000000000000000000000000000000000..ae05502acc49241281bf078bec11f366f2632605 GIT binary patch literal 168 zcmV;Z09XHb0V^p=O;s>7Gh#3_FfcPQQP4}zEXhpI%P&f0NS zN<04VJ*yj#f@62WFd*&ObN|j|9I-LFXkGmD!}0O4)|umE%8(#Z(qt;ogmEN^kbcV9 zoCMO3vq(}uU~x<(Dh~}!>ym_UEJ=vQYov#{lm-rCnjj%Dm*q_zWdh`)QccTfwTz#E z{RY&;j1xo?&=_M$S%TmzXB2Fp5jh8wh&Gcl6<5t>$O2&$N-7h;q9#e2N@7#8lm?<% zIngZS%NaqFEQ(M>g+y$!aS|sXXd;xOC5|#8UZjkZ$(AM+Lyg8MBrL1rMvVHT*I z0J}>FdS)JGY$aJUBx%IfN<}l6kzk?14=DjjR(mwGy^rYL91iS3_X;ftN%QCk5^y5n zeGPyCPyviKMu4S?dZdAXq2>7>td9^DeJaOqVm1@6rjxgCPA2^F*X8OL^7@2?@$%in z1{{?zwd5wb*=h-V2}Q8|Mcjk76|8Bf3vz~qiCM_R|a9(6&# z$1|d7X0PYmTOI$s<9aTfe*Tij+)UGm1_i7`GNB30qp8^g*8>({FmG@3`x=5zSwKd> z63OY<$O}n7-%rcr>;OrzL)hgyCE~ypL4<(39wNs;#?!;x5?l%tylMe?v%qPpYv6g` z?sR$W}M2k;g%2mn)VH=jV&o|;mJYXt*fegvBYTSf6rnN zd}6fW=Z=!qL54b8kdbZ6On8Shl==TAdlmC-5&a?$2YKTI@srpj7I{B#k2aiJ=3!`K>a7rX%5+Iv;Dyubo8ql zy^_Rf1T(=HgEb@xtCnpP-QO$86?Aeb(D7Ul@%c*u_WTS=Lv=!Ru8M4n;@o<+Gf;$$ zAvsHq{J-+46+q}17fNVtth%EG@=65>@hd@o4Z->$ zUW$zdy8sd_P2c6%mdY7D&hXdSYspzH>H{xnItZaX@pg0y(`>dyz;k5_@-#|mn!PR z2#d40N0OZ1p%E;9cI#3VU$IxHgI??H?t%BIrmJ-- zAIAB%EYNA&b7v0yMXFfcPQQHYPv%*!l^kJl@xWOz3B(dIbbElu}^Pz zAAR^%bMxuCb4gpDpSaET4yvTQI6V_&O1k4_*@o?rmr|xZYp8hDlR0_mCN==8+e42< C{Y(h} literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/88/80cfa9557a6ce785b43fb300748310b7e995ed b/tests/test_project_fixtures/test_project_multi_commit/git/objects/88/80cfa9557a6ce785b43fb300748310b7e995ed new file mode 100644 index 0000000000000000000000000000000000000000..688ed38090ad987ce51eaedaee97677dbe4ffa52 GIT binary patch literal 148 zcmV;F0Biqv0V^p=O;s>7F=a3`FfcPQQ7|wtFpN(wN=+-d#4b>SRpP83g5+4sz_H6E>*_$q2bN24mTvr}-ey CZ$gp) literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e b/tests/test_project_fixtures/test_project_multi_commit/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e new file mode 100644 index 0000000000000000000000000000000000000000..e68f806e4b9f3596d3c9fcc6aa1f59610147f291 GIT binary patch literal 77 zcmV-T0J8sh0R_Q94uBvG1VGQcViWINOnitx0I6C-SyS-f@14n&8S63~PD8mo literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/91/ea44a218fbd2f408430959283f0419c921093e b/tests/test_project_fixtures/test_project_multi_commit/git/objects/91/ea44a218fbd2f408430959283f0419c921093e new file mode 100644 index 0000000000000000000000000000000000000000..263fc8c87e325bcaa3c19492252655b82f498d2d GIT binary patch literal 77 zcmV-T0J8sh0ZYosPf{>5W=Jc_&s9jtO3X{o*DKD*FDgkcEh$#W%q;*i6^c^xQc{b! jxRe!~i&7IyQWYxmON$iBGE>Wo6*5wbQuVk1gVGqx_PZe6 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/92/8f9938db104a389b465923b8ea1fcce7b5c678 b/tests/test_project_fixtures/test_project_multi_commit/git/objects/92/8f9938db104a389b465923b8ea1fcce7b5c678 new file mode 100644 index 0000000000000000000000000000000000000000..b6aaa4070d37c8fc9187cd3439f1f5212e4a2886 GIT binary patch literal 124 zcmV-?0E7Q{0ZYosPf{>4Fl9(9%Fk6u$x6&i&(}*yQpn6L$S*2U$jwhl%_-*MO3q0v zE>>{VfbjKvLBg6=T%38OIXUrZnW;G`3bs(idY*YDsp+XjZXi(&kOJF~qS91NpyJf> e_`Lj*c;Ym9nz-4- zZ$bPH%*2cnL=&(W`;xK*!B@^G_&_6a2`&+BCS@va8jX+z0vARq7r>(iNg7IHL$Z_x zqETI-9-x`kTwXNYL!Wh@I>J`0P9}6i@{Ft0q zV$a|Gu~6#HJx>AXd9_+iQx5%}(O^-}qk=-RBoRwvlE@7lb(AF{qtYKofEYvuFb=ao z#RSA1LeP0nCz!ul{45vqt3UPqUW6>sCE{6vR#eUaqj5GxGUEw20-W6OuM&FFUf4`$nY-*;RGRzH8qF*njQqCr9HkW6Sob2K%}c3cnv0b?-8&ua)iWdh-V zC6d!I&J#($+`pH}*?}!34zSCol!yaI1Q7z_dT2X_ZGU=LTEdkAMX$Ajyjb{Ys%vob zp4D!5O$e{4pxALgrePS7mCp%=aAus!C+w7edh5M!c#XHTIK@p4%5EK1)r%##l|POW z5PX7L@N-Ye>Y%_nS`d+K&kT5nFqHBCrg(+ z5&cxLP3%ZRbcX%D>y3upR^Pr;33RZ|0S`$26zxtf7?W{VZK2@HrJ^im7&eOl-VIfug9wW=iBeWCwg7gk&_E`5f z*}czrCBEj&9u?KzGcUFf{#rl^4`9WE)3H=F>RK&Bq5Cp3R$@vqq~;;uBn1sPfLCEQXg;?+Q`U# z?+pycdFT(@-o4Sa0Ehl?Z{n3VsqS4-LMexNqHxyRIEzPua6_uTl1bvwm`1*;zW2p- z7%x#ONwG<+3bLaO^`OngS==SbRL*|9`l5VS;rQ|T?JOpo1}_+ZYypN_&}3l}Q$zp= z|Nc%!l(Q;rUMDaVbq%{SGCHQ$>bF(T)Jam$^3rSdOz%_Q&KE~+3-W9P1ESTuRtZ|n z9%`Z6e6zdYep>IVkt=W5`9v+ydCPGw(Qp3JcLGjRd5Nr8HT&A}X5FlI0`FfcPQQ7|wtFpN(wN=+-d#jnHX~&q4`2CkJ=bqZ40ZYosPf{>6HDX9B%Fk6u$x6&i&(}*yQpn6L$S*2U$jwhl%_-*MO3q0v zE>>{VfbjKvLBg6=T%38OIXUrZnW;G`3bs(idY*YDsp+XjZXi(&kOJF~qS91NpyJf> W_`Lj*c;Ym literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/e0/e9599616de90471fbedcf6627e3392aee37e47 b/tests/test_project_fixtures/test_project_multi_commit/git/objects/e0/e9599616de90471fbedcf6627e3392aee37e47 new file mode 100644 index 0000000000000000000000000000000000000000..8e9d3bdf63747ac36acef1c372bf9e423e5a54b1 GIT binary patch literal 458 zcmV;*0X6=30ew?VYui8&?ODHKDj(uNks-a5KnSKbNlI%Qq8@r$M$*XMRJ&t#M8{i647QE9s%JHT<21KUiSBRc{1FJFH2S*BZ1 z%Az5q;N}K$r3`ATRDPX7c-R+#LOZsFCuyj~zLR;r`m)^IZPnwtEFU&^kLufY_5JHQ z{{Xp=7j<;}M71arz*^O8jFwn0+U|XRnV7|mQ;XQ9b!?z{Lc8apW=DlVi+eI;1x~u@ znd)9hMQEZ#+o(=kN^JC8(^23dd0ack?l<`i$^!vbJkSf7!4X>29klGgvmszPkON2P zgH>2t-#Y?1poG`dBI=xh_P!4^K0>>0oFJ>DJf50xA54NU;J~^8gZ^hcNc>6a#4`!j zY(21rT^bQw6=%eocw)&ZhAE^o?0>#vl|$|6bu9C9X}pe4{+au(u@~p0CpQHwLjoiB zkfP9X;Xzw3!8J7y!iW4%DjY(nSal&!8*3fxew6py&2CxV!)cMyPzQ86;%;FTLW*7f z!WM?Jr!at!Wi5I@2~&iyjM8KGn(g*&?X+LfT5_LM{&Rcg;V&rA?T5?k7cF%H<(h}( Aga7~l literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/e5/d9d54f36eb3916eebe9ce689180572abc355f3 b/tests/test_project_fixtures/test_project_multi_commit/git/objects/e5/d9d54f36eb3916eebe9ce689180572abc355f3 new file mode 100644 index 0000000000000000000000000000000000000000..e6b6c0614ac8cdb9e0329b28bdab06de6557f09f GIT binary patch literal 168 zcmV;Z09XHb0V^p=O;s>7Gh#3_FfcPQQP4}zEXhpI%P&f0NSN&fry#9#mNbUpyi@kVdPe^sOa literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 b/tests/test_project_fixtures/test_project_multi_commit/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 new file mode 100644 index 0000000000000000000000000000000000000000..711223894375fe1186ac5bfffdc48fb1fa1e65cc GIT binary patch literal 15 Wcmb4Fkwh5%Fk6u$x6&i&(}*yQpn6L$S*2U$jwhl%_-*MO3q0v zE>>{VfbjKvLBg6=T%38OIXUrZnW;G`3bs(idY*YDsp+XjZXi(&kOJF~qS91NpyJf> e_`Lj*c;YmoeKbS6(DiPJS2($ literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/objects/fe/961bc4402a57bace36648e1a6f1998bae3c5e3 b/tests/test_project_fixtures/test_project_multi_commit/git/objects/fe/961bc4402a57bace36648e1a6f1998bae3c5e3 new file mode 100644 index 0000000000000000000000000000000000000000..abb994b9ad9aa9a5683809dc3781519b94d5eccb GIT binary patch literal 173 zcmV;e08;;W0i}*XZUZ3<0DI;Y+@nS|m|ZMYRV(EWIeRgrC?!OQwBK){JfX*#!)Q`( ztxoHRU*^c!u0<7Bbm~LdJO`kai!1?=bCKu;s1TN9t}^mvS|aa(9WJ~8#u5us1TB%* z%}0+Ah&j5n8M)1`KI}n$s=glkHhMbSH+|s#_lX~;CiQ!tdV9ARfFS@xvO919=5Ft! bGyfxDK2@!xl&>?ZZS^!{)_yU68L>{B8sSf* literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_multi_commit/git/refs/heads/master b/tests/test_project_fixtures/test_project_multi_commit/git/refs/heads/master new file mode 100644 index 0000000..fe0eab2 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/git/refs/heads/master @@ -0,0 +1 @@ +dc16039b7458a98bcf9be2b92389e176ae1d9461 diff --git a/tests/test_project_fixtures/test_project_multi_commit/manage.py b/tests/test_project_fixtures/test_project_multi_commit/manage.py new file mode 100644 index 0000000..e0e9599 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_multi_commit.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_app/__init__.py b/tests/test_project_fixtures/test_project_multi_commit/test_app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_app/admin.py b/tests/test_project_fixtures/test_project_multi_commit/test_app/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/test_app/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_app/apps.py b/tests/test_project_fixtures/test_project_multi_commit/test_app/apps.py new file mode 100644 index 0000000..fc04070 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/test_app/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class TestAppConfig(AppConfig): + name = 'test_app' diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/0001_create_table.py b/tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/0001_create_table.py new file mode 100644 index 0000000..09d00ce --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/0001_create_table.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 14:05 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='A', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('null_field', models.IntegerField(null=True)), + ], + ), + ] diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/0002_add_new_not_null_field.py b/tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/0002_add_new_not_null_field.py new file mode 100644 index 0000000..7347b0f --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/0002_add_new_not_null_field.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 14:06 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('test_app', '0001_create_table'), + ] + + operations = [ + migrations.AddField( + model_name='a', + name='new_not_null_field', + field=models.IntegerField(default=1), + preserve_default=False, + ), + ] diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/0003_add_new_nullable_field.py b/tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/0003_add_new_nullable_field.py new file mode 100644 index 0000000..4ce3b40 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/0003_add_new_nullable_field.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-26 20:34 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('test_app', '0002_add_new_not_null_field'), + ] + + operations = [ + migrations.AddField( + model_name='a', + name='new_nullable_field', + field=models.IntegerField(null=True), + ), + ] diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/__init__.py b/tests/test_project_fixtures/test_project_multi_commit/test_app/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_app/models.py b/tests/test_project_fixtures/test_project_multi_commit/test_app/models.py new file mode 100644 index 0000000..928f993 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/test_app/models.py @@ -0,0 +1,6 @@ +from django.db import models + +class A(models.Model): + null_field = models.IntegerField(null=True) + new_not_null_field = models.IntegerField(null=False) + new_nullable_field = models.IntegerField(null=True) diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_app/tests.py b/tests/test_project_fixtures/test_project_multi_commit/test_app/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/test_app/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_app/views.py b/tests/test_project_fixtures/test_project_multi_commit/test_app/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/test_app/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/__init__.py b/tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/settings.py b/tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/settings.py new file mode 100644 index 0000000..80c1a28 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/settings.py @@ -0,0 +1,120 @@ +""" +Django settings for test_project_multi_commit project. + +Generated by 'django-admin startproject' using Django 1.11.6. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.11/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'gtb+mohs%gf0+#fr89vw7e&#edmv=q8!iv+n&j_soawk$tkj3^' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'test_app' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'test_project_multi_commit.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'test_project_multi_commit.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.11/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django_fake_database_backends.backends.mysql', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.11/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.11/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/urls.py b/tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/urls.py new file mode 100644 index 0000000..735de5d --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/urls.py @@ -0,0 +1,21 @@ +"""linter_test_project URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.11/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url +from django.contrib import admin + +urlpatterns = [ + url(r'^admin/', admin.site.urls), +] diff --git a/tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/wsgi.py b/tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/wsgi.py new file mode 100644 index 0000000..6741b31 --- /dev/null +++ b/tests/test_project_fixtures/test_project_multi_commit/test_project_multi_commit/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for linter_test_project project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_add_not_null_column.settings") + +application = get_wsgi_application() diff --git a/tests/test_project_fixtures/test_project_rename_column b/tests/test_project_fixtures/test_project_rename_column deleted file mode 160000 index 0a898aa..0000000 --- a/tests/test_project_fixtures/test_project_rename_column +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0a898aa4fac2fd21adeabfa9a0f89df447b0b55e diff --git a/tests/test_project_fixtures/test_project_rename_column/.gitignore b/tests/test_project_fixtures/test_project_rename_column/.gitignore new file mode 100644 index 0000000..63973d0 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/.gitignore @@ -0,0 +1,3 @@ +*.pyc +__pycache__/ +*sqlite3 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/COMMIT_EDITMSG b/tests/test_project_fixtures/test_project_rename_column/git/COMMIT_EDITMSG new file mode 100644 index 0000000..64988b6 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/COMMIT_EDITMSG @@ -0,0 +1 @@ +All files diff --git a/tests/test_project_fixtures/test_project_rename_column/git/HEAD b/tests/test_project_fixtures/test_project_rename_column/git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/tests/test_project_fixtures/test_project_rename_column/git/config b/tests/test_project_fixtures/test_project_rename_column/git/config new file mode 100644 index 0000000..eeb8dd7 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/config @@ -0,0 +1,5 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true diff --git a/tests/test_project_fixtures/test_project_rename_column/git/description b/tests/test_project_fixtures/test_project_rename_column/git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/tests/test_project_fixtures/test_project_rename_column/git/hooks/applypatch-msg.sample b/tests/test_project_fixtures/test_project_rename_column/git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..8b2a2fe --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_rename_column/git/hooks/commit-msg.sample b/tests/test_project_fixtures/test_project_rename_column/git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/tests/test_project_fixtures/test_project_rename_column/git/hooks/post-update.sample b/tests/test_project_fixtures/test_project_rename_column/git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-applypatch.sample b/tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..b1f187c --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-commit.sample b/tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-commit.sample new file mode 100644 index 0000000..68d62d5 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-push.sample b/tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-push.sample new file mode 100644 index 0000000..1f3bceb --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-push.sample @@ -0,0 +1,54 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +IFS=' ' +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + else + if [ "$remote_sha" = $z40 ] + then + # New branch, examine all commits + range="$local_sha" + else + # Update to existing branch, examine new commits + range="$remote_sha..$local_sha" + fi + + # Check for WIP commit + commit=`git rev-list -n 1 --grep '^WIP' "$range"` + if [ -n "$commit" ] + then + echo "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-rebase.sample b/tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-rebase.sample new file mode 100644 index 0000000..33730ca --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up-to-date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/tests/test_project_fixtures/test_project_rename_column/git/hooks/prepare-commit-msg.sample b/tests/test_project_fixtures/test_project_rename_column/git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..f093a02 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first comments out the +# "Conflicts:" part of a merge commit. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/tests/test_project_fixtures/test_project_rename_column/git/hooks/update.sample b/tests/test_project_fixtures/test_project_rename_column/git/hooks/update.sample new file mode 100644 index 0000000..d847583 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to blocks unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero="0000000000000000000000000000000000000000" +if [ "$newrev" = "$zero" ]; then + newrev_type=delete +else + newrev_type=$(git cat-file -t $newrev) +fi + +case "$refname","$newrev_type" in + refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/index b/tests/test_project_fixtures/test_project_rename_column/git/index new file mode 100644 index 0000000000000000000000000000000000000000..abae302b61d6fbc2431cdf87ddba97b0bd8c2bd9 GIT binary patch literal 1400 zcmZ?q402{*U|<4b{>V>OHezC_3@{of#>c?5PMm?EaS4zO12W0eZ5d~DFP&0i)!=sW zM32@|^~>xGTzcu5C7J1Y`9-NPg^{0Zwy3c$nFFJN;vn-RQO#qvknk@pU-U+?VnKm^e0*kJW=VWJ$Ve~%nI}1CQ2~sGnwx}Xu6>Wi=g+sU z%DJ|Fp5fGVXvw~#CUfK%1mWf;rsQVk!Q3hB;HCpI4@5)FOF=U)>JJM$U$fcAI%^fC zh_v7&yX>v<=?nr0^9l-z!EOYG+a;Bk2OEIqU1Vx90Gb01zZ_KanA9dLmpv1`V%_&m z;=32S1pMn~X#SPWpaC~8H#5B`u_QA;uUOx}z`!s*xhOTUBsIPyF)0TeyukRj)*8vHyAW=*kcr5l$w{An;M^- zpHrF(4a1*rDmh(~#B_Mk>7&>zy0Q&#8a&aa9 zw1XlQ^X{tdH4l<*nqZ1wW)c^eCY1< zT@{h_`QM&c8XA?F7JoxZCm;*J#zua!2v^BpWC1cy(M)a%)VvHd^XwB z=s5a?&1IP4%Zt#;yfI<-6X`;|h9R?aqMDp5oM!lFYnx zSeQqCI4i4JsLBHJk4WsT8mK*GsP-^(6vsZj-F@`oTg}a<>&_)@eSYFL+dBp&JpL&y zLW|e4Y7(m12Y~jeNr?0UtpUet1*$!aYttP!%QkF}yp%HSSwqFEp3KQhH?iThr@S~l e6JE+NFz6XDNwKFNTcu?ks9*oFjeGL*q%Z)%9oX~$ literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/info/exclude b/tests/test_project_fixtures/test_project_rename_column/git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/tests/test_project_fixtures/test_project_rename_column/git/logs/HEAD b/tests/test_project_fixtures/test_project_rename_column/git/logs/HEAD new file mode 100644 index 0000000..e835dee --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/logs/HEAD @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 1c81ac236b008c087902e21ef7d41a45c8ae9bf7 David-Wobrock 1509047595 +0200 commit (initial): Init +1c81ac236b008c087902e21ef7d41a45c8ae9bf7 0a898aa4fac2fd21adeabfa9a0f89df447b0b55e David-Wobrock 1509047604 +0200 commit: All files diff --git a/tests/test_project_fixtures/test_project_rename_column/git/logs/refs/heads/master b/tests/test_project_fixtures/test_project_rename_column/git/logs/refs/heads/master new file mode 100644 index 0000000..e835dee --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/logs/refs/heads/master @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 1c81ac236b008c087902e21ef7d41a45c8ae9bf7 David-Wobrock 1509047595 +0200 commit (initial): Init +1c81ac236b008c087902e21ef7d41a45c8ae9bf7 0a898aa4fac2fd21adeabfa9a0f89df447b0b55e David-Wobrock 1509047604 +0200 commit: All files diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/0a/898aa4fac2fd21adeabfa9a0f89df447b0b55e b/tests/test_project_fixtures/test_project_rename_column/git/objects/0a/898aa4fac2fd21adeabfa9a0f89df447b0b55e new file mode 100644 index 0000000..bc4a0e9 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/objects/0a/898aa4fac2fd21adeabfa9a0f89df447b0b55e @@ -0,0 +1,2 @@ +x¥ŽM +Â0F]çÙ‹e’¦ùïàz2™j°5£^ߊGpù>x��Ê<ç&uoW­2ËÁ±ë{zpHQk›È%ƒè 1õF{qÇÊ·&y…´èÀx@³V<.‚B3�GqtŸíRª<â+§Í©ÄZè*·é‹Ýû‡ûóŒyê¨Ì;©`œ#× IJ.Gÿ‘‡i’cžø!>|Jÿ \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/18/4f7577a2fc2b094acc06a5a0fa10fd88bdfe93 b/tests/test_project_fixtures/test_project_rename_column/git/objects/18/4f7577a2fc2b094acc06a5a0fa10fd88bdfe93 new file mode 100644 index 0000000000000000000000000000000000000000..e3d8905468cfaa880c4e70b050fdb58d3cfefa1b GIT binary patch literal 459 zcmV;+0W|)20ew?VYui8&?ODHKDj(uNks;T764s0`Rj_d^3zkK=8XPIt6 zDT{`bf}0!2l`^QUQu%cT;bC6{3hmeyo}{4``%dQh>dSI-w^fhpvV7RwJ*scp)%UOK z`~&1dUewX?6V;*|CFYvD-XsFicJK4cL@jQddc;1hV*||-+C3LFJ1PuX+>;?Ia1u_> zRQEzELRHNsAR5(aONou1YdQ)%B$I3B*!?D-L3tp+iU)cjGdMzvx`UP-cs2wq2Xf#D zeeeov>w8Ba2bA!dT11^Q(BAif#z$z^jT2;*l*dyO?t@7X1{_#7V9@`J2Z=vPop>g} znym-6uuC(7tKy7!6HhET#W00*hW*cXta7M5y^dvmE{)gm$v<=7HTL41^yH?1Wk_J; z9#RxqE<9-KCAg*rLimvXNrgiQ6{{}fX=AN}-H-BqyV)(vdpK=U8tQ;fN8Bx}LP)X8 zU)aKM_7nyXvaCf9C}D~awo!WQUbEf4t)2EOT1)Pe%71RpJp2X)y8UpO{Q^A+12{&; B;(P!A literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/1c/81ac236b008c087902e21ef7d41a45c8ae9bf7 b/tests/test_project_fixtures/test_project_rename_column/git/objects/1c/81ac236b008c087902e21ef7d41a45c8ae9bf7 new file mode 100644 index 0000000..dd6880d --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/objects/1c/81ac236b008c087902e21ef7d41a45c8ae9bf7 @@ -0,0 +1 @@ +x¥�1!E­9ÅôÆÍ,BbÌ6žÀš�Y%+’V¯/Æ#X¾Ÿ¼ÿBÉ95í~Ó*3(²RÇ`” d˜œGƒ¬Í6'­�‰Y9T¯í^*œý+ÅݵP-a�cüâðþátË>=†Pò F�Ý:h§a‹Qôµ‡ÿq!.ÏÔÄ&¦;û \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/3c/ee643962df7bfab0b21688f02af79fa19a214a b/tests/test_project_fixtures/test_project_rename_column/git/objects/3c/ee643962df7bfab0b21688f02af79fa19a214a new file mode 100644 index 0000000000000000000000000000000000000000..99083d829991acca5162f55b735f1832ecf65720 GIT binary patch literal 240 zcmV5HDfR|FfcPQQHYPv%*!l^kJl@xWOz3B(d zXRX2%krtd}m%UX!-NXP06mm1uixNvR^Ye-sCIvU{`SEAv_w_5hnb^&=Ht-#JTmdyF zH$Npc2W-;%?R$68>844>P(>xF#U)@hHBXrj-JQOxBC7GiER}FfcPQQP4}zEXhpI%P&f0NScnP?VpQnp_fJl$w{An;M^-pHrHf#}F@JFEv3) X=8|y8hu8$K+5cuO?7j>DuJl9<3q(%l literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/5f/183f1a90221cd21354f05d604a9bfe9aa18bd3 b/tests/test_project_fixtures/test_project_rename_column/git/objects/5f/183f1a90221cd21354f05d604a9bfe9aa18bd3 new file mode 100644 index 0000000000000000000000000000000000000000..5d6ca71b47651081e93fdf168e746f1e45026134 GIT binary patch literal 148 zcmV;F0Biqv0V^p=O;s>7v0yMXFfcPQQHYPv%*!l^kJl@xWOz3B(ds2^nx%p43q$Krt%qG>vA{ z_yxr8z)r$AMudXNB#?wr1YbEL-~@^BCHRE3nUtxxX*41h3ZpPmxe&6XfoVf&Y)F=p zP&BGrGz$H4hS4O8V-yo15u0po8PEtUVZzZeh%+p{%NWO#ElUbSjU*}KU_xlx8M@6# z9HBIjGXb{~B*My81syoEPzyxdz8jk76|8K>X~aB|0&6RmCCjyho9 z;~Ca8v)k=ISZ)7(-}PKr{rn}z+)UG$gaxf5JRy|iXll0OdLRM<=3tPY*ARTl1TsQK zB`0GePbB?v|6V3%2eyV#oc2L{W@a0mlY}Gvh=)8E*Nfx88ffYhz1`TioQJ?AB4J6$zt8D}Nj% zAo#>+!OuOxtAhgTXhB4_Ju~4Q!cfNlMez#rZ56#D4hLnEHDX2xL|e>*Z~=AJ_~VX4 ziRh<_ZDL0nqBHFGJ%2Rpw))PUN}$7q-pF_?AX_}EH|Uz4wPET%c~EoC-kPlsmeba6 z*7TJ)Nn>aV#u(heG^%R0QIvnL+^)EjYk`vIf{M>y3byBKkQ=HLs&$oRTRZ)MXZIbo zv2i39$*KQW-nT-)j&Y%suANn9)Tc_cwWt4;GxGc|iC9P#zsJaO{0RL-enWbPG<&QE zoAlmiyb@oNW{-+$@0k}{2!Aagg$K~$!R^?p9ChuMsnC6a8Y?j+1|)n{-+(4i+uH%O zk3eAfdt|fN>7!>+DGx2QZF;6^e~NTPlyxYfK^DuMuGrw&F?k{gjg{iscC_LqeWl*U)NO8t*52FdZ`b{3XNps zz4r&E>pt{{ZU5fv+JHlUxHt34n^gC%IH8ooL{T{FZ=5wo0&`QU&XP&&l7z&8s=xQe zbr>&EDp|3~tO~ND4fUYWC0WwNbSh^*UVTx(t8n~y{Z5u(PQq^(fOG+d+t6lV7E?q3 z2>pck;!N*MdA7!H8%#uT_Q? z(}!B9!!(a-|G1! Z0GEKF#R literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 b/tests/test_project_fixtures/test_project_rename_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 new file mode 100644 index 0000000..cf19499 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 @@ -0,0 +1 @@ +xm�OOA Å=ϧhö‰îãE& Á(ÀxœvºË�Ît3S@¿½Ëžš¦¯ï÷Ú5ñîoŠ¢P_Ëé jŽ�o¡áä£`2‚YL—x‹µÀ¥–JÍð»ãŒdƒp^¶DvM6ƒ…ÀnGxG¸G‚½Mþ4Š6 ƒª²]G¾¶â9VUï÷Ú'{x8 €coî34žð2¢ÚˆtùIkÇu.ÝÖÆ–ÿ2Õ4F=*G#½áƒ°vØÿŒ¢¹õZÏT>tœ8+Õ$pv)ë^ep´(æØ›«¨Jq.1î}âXf‡�Ý‘ ŠñÛË|º0ËÉj5›O—æc1þ|Ÿ·P\ÿÏXçLd1qGdj¦]8Ùˆ�m.†J]¡àþK0ª_òCš€ \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee b/tests/test_project_fixtures/test_project_rename_column/git/objects/73/5de5db8bc5e1ed29b3cb7ece62b5e7c8db06ee new file mode 100644 index 0000000000000000000000000000000000000000..66ccc09794ebf5efe30fa53a069a0084dc53b13f GIT binary patch literal 391 zcmV;20eJp+0gX~!OT#b}^*O)dGK8*B6Xt`1f)64N2R?~DiO#f5w~QvYB&i?&-kYq2 zF;MJN8qPiE+;dWOSiy36bvB#LI&Fh;o1lEy^bYr`4)FZ=0Jmscy&aqk8ZBc_I|c89 z>v|aoZv8uS+6Qnr&}1C&5D-4J`t%%D=)j;;plyrJBns#|CA|W#RLOw8T?oA|g=nz$ zyxB{;#ZjNvXoRw2!50e=u-CO05iLmH3wHM<4Uzehtp;01dk5Xby5MlrG$1W#)1wO| zK6IR}2iNeD+>IS3L^O~N-0Pr{dS0+s_5=3-1~NL0#8UtO literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 b/tests/test_project_fixtures/test_project_rename_column/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 new file mode 100644 index 0000000000000000000000000000000000000000..250bef6ac737f97163f7f541ed98f1f4581b0f67 GIT binary patch literal 72 zcmV-O0Jr~m0ZYosPf{>5U`Q*<&s9jtO3X{o*DFaaE>XzLEyyn_Q3wIDofC^wxww=S eoQqNuOHvgo^Gk~qKx&E=GE$3D^|$~d*cUrI-yGBc literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e b/tests/test_project_fixtures/test_project_rename_column/git/objects/8c/38f3f3dad51e4585f3984282c2a4bec5349c1e new file mode 100644 index 0000000000000000000000000000000000000000..e68f806e4b9f3596d3c9fcc6aa1f59610147f291 GIT binary patch literal 77 zcmV-T0J8sh0R_Q94uBvG1VGQcViWINOnitx0I6C-SyS-f@14n&8S63~PD8mo literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/90/a71dcc5ba8aef7b217bba34450fe8f0083fa6b b/tests/test_project_fixtures/test_project_rename_column/git/objects/90/a71dcc5ba8aef7b217bba34450fe8f0083fa6b new file mode 100644 index 0000000..e91e43a --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/objects/90/a71dcc5ba8aef7b217bba34450fe8f0083fa6b @@ -0,0 +1,3 @@ +x]PËjÃ0ìÙ_±�ƒ�›(4m øRrÈ­·„m­�ZY2zÒ¯¯dåY„˜™�™U-T Ëåüaùc�b\v+p¶Í_’Là%êÊ"ƒú›¯Jv +HAHñ JÂbN^r2ÏK O+²HZ­z ´uÖi¤x?(mÁIîÍ‘ +n½›0I²Ñ¯`õY×ó·q%Í z?”I#*c`¦²«¨¸€ÓU’€?\rË+%|h‡c8 d(ŽÆŸ£ð95„íBà… 67oýúûP&'ެz,Óu:»C[Ž‚™2†Da¼³”³ô¼U±vVmƒ4«ü‹6c+Cé š÷•>Òo<žƒÚoűÜúßó’Ôµ2Hc‰Ý&�Nï{„Ð,•N:VºFï¤ÅuL‚1ãÿüájwr>$n$£$ \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/91/ea44a218fbd2f408430959283f0419c921093e b/tests/test_project_fixtures/test_project_rename_column/git/objects/91/ea44a218fbd2f408430959283f0419c921093e new file mode 100644 index 0000000000000000000000000000000000000000..263fc8c87e325bcaa3c19492252655b82f498d2d GIT binary patch literal 77 zcmV-T0J8sh0ZYosPf{>5W=Jc_&s9jtO3X{o*DKD*FDgkcEh$#W%q;*i6^c^xQc{b! jxRe!~i&7IyQWYxmON$iBGE>Wo6*5wbQuVk1gVGqx_PZe6 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/92/5381bcf8fca9f7afa84b0207362ab00ec4e378 b/tests/test_project_fixtures/test_project_rename_column/git/objects/92/5381bcf8fca9f7afa84b0207362ab00ec4e378 new file mode 100644 index 0000000000000000000000000000000000000000..842d4a85db185eea94f50af0a2f38578816242f1 GIT binary patch literal 140 zcmV;70CWF%0V^p=O;s>7He)a}FfcPQQ7|wtFpN(wN=+8Kq@=6&^&V&0>AVu)=!Q uziS(AKsCh2XXa&=#K(h_J)8Sz_NI&1oV~j>*Of=zIP|0^cp?B@E<2XspFhn2 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/af/f774d1a90f96c114789edd25bd37521b829233 b/tests/test_project_fixtures/test_project_rename_column/git/objects/af/f774d1a90f96c114789edd25bd37521b829233 new file mode 100644 index 0000000000000000000000000000000000000000..75a2266e56ab3b219208785a2bb659113ee6edec GIT binary patch literal 105 zcmV-v0G9uF0ZYosPf{>6Fk(n6%Fk6u$x6&i&(}*yQpn6L$S*2U$jwhl%_-*MO3q0v zE>>{VfbjKvLBg6=T%38Sq)S8%*xS3AhBbEv&GuB~7SO@5ygvV$jdILLq+)F(W=OV@hf1?R;rcn2lp zcR6Qyc>;c{cuAVUcOXPFg=s(`z;wMI0!+@ta1_>rm}W<^fO^g=v|72&w6V;17YR~Z zIgaqWO4+wrY~sEm1mbAy(P?zG!4b~zI*ZB3XuvTD+4uASlrhFdJzzXY1gR|2{b5Gm zmKfisV^jaHkRQ!2=wyeF2CdGvl2p{i`>aUjnM%5(COwU}`r^3BTG6E6e-MWsD{^`L M!?snw059}^|I5OIx&QzG literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/objects/fc/04070e8336f17e3b2402586653623e6bb51f67 b/tests/test_project_fixtures/test_project_rename_column/git/objects/fc/04070e8336f17e3b2402586653623e6bb51f67 new file mode 100644 index 0000000000000000000000000000000000000000..a0339be7c120f5ad7bb6d3595d3826bf03fb9027 GIT binary patch literal 88 zcmV-e0H^oeKbS6(DiPJS2($ literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_column/git/refs/heads/master b/tests/test_project_fixtures/test_project_rename_column/git/refs/heads/master new file mode 100644 index 0000000..5b17443 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/git/refs/heads/master @@ -0,0 +1 @@ +0a898aa4fac2fd21adeabfa9a0f89df447b0b55e diff --git a/tests/test_project_fixtures/test_project_rename_column/manage.py b/tests/test_project_fixtures/test_project_rename_column/manage.py new file mode 100644 index 0000000..184f757 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_rename_column.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) diff --git a/tests/test_project_fixtures/test_project_rename_column/test_app/__init__.py b/tests/test_project_fixtures/test_project_rename_column/test_app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_rename_column/test_app/admin.py b/tests/test_project_fixtures/test_project_rename_column/test_app/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/test_app/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/tests/test_project_fixtures/test_project_rename_column/test_app/apps.py b/tests/test_project_fixtures/test_project_rename_column/test_app/apps.py new file mode 100644 index 0000000..fc04070 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/test_app/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class TestAppConfig(AppConfig): + name = 'test_app' diff --git a/tests/test_project_fixtures/test_project_rename_column/test_app/migrations/0001_create_table.py b/tests/test_project_fixtures/test_project_rename_column/test_app/migrations/0001_create_table.py new file mode 100644 index 0000000..90a71dc --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/test_app/migrations/0001_create_table.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 14:12 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='A', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('null_field', models.IntegerField(null=True)), + ], + ), + ] diff --git a/tests/test_project_fixtures/test_project_rename_column/test_app/migrations/0002_rename_column.py b/tests/test_project_fixtures/test_project_rename_column/test_app/migrations/0002_rename_column.py new file mode 100644 index 0000000..e998757 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/test_app/migrations/0002_rename_column.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 14:12 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('test_app', '0001_create_table'), + ] + + operations = [ + migrations.RenameField( + model_name='a', + old_name='null_field', + new_name='new_name_field', + ), + ] diff --git a/tests/test_project_fixtures/test_project_rename_column/test_app/migrations/__init__.py b/tests/test_project_fixtures/test_project_rename_column/test_app/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_rename_column/test_app/models.py b/tests/test_project_fixtures/test_project_rename_column/test_app/models.py new file mode 100644 index 0000000..aff774d --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/test_app/models.py @@ -0,0 +1,4 @@ +from django.db import models + +class A(models.Model): + new_name_field = models.IntegerField(null=True) diff --git a/tests/test_project_fixtures/test_project_rename_column/test_app/tests.py b/tests/test_project_fixtures/test_project_rename_column/test_app/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/test_app/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/tests/test_project_fixtures/test_project_rename_column/test_app/views.py b/tests/test_project_fixtures/test_project_rename_column/test_app/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/test_app/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/__init__.py b/tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/settings.py b/tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/settings.py new file mode 100644 index 0000000..62bc1d2 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/settings.py @@ -0,0 +1,121 @@ +""" +Django settings for test_project_rename_column project. + +Generated by 'django-admin startproject' using Django 1.11.6. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.11/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'gtb+mohs%gf0+#fr89vw7e&#edmv=q8!iv+n&j_soawk$tkj3^' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'test_app' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'test_project_rename_column.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'test_project_rename_column.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.11/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.11/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.11/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/urls.py b/tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/urls.py new file mode 100644 index 0000000..735de5d --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/urls.py @@ -0,0 +1,21 @@ +"""linter_test_project URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.11/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url +from django.contrib import admin + +urlpatterns = [ + url(r'^admin/', admin.site.urls), +] diff --git a/tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/wsgi.py b/tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/wsgi.py new file mode 100644 index 0000000..6741b31 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_column/test_project_rename_column/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for linter_test_project project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_add_not_null_column.settings") + +application = get_wsgi_application() diff --git a/tests/test_project_fixtures/test_project_rename_table b/tests/test_project_fixtures/test_project_rename_table deleted file mode 160000 index cd1aa87..0000000 --- a/tests/test_project_fixtures/test_project_rename_table +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cd1aa87abf1095d2ca6b9b64308931ab52e598c8 diff --git a/tests/test_project_fixtures/test_project_rename_table/.gitignore b/tests/test_project_fixtures/test_project_rename_table/.gitignore new file mode 100644 index 0000000..63973d0 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/.gitignore @@ -0,0 +1,3 @@ +*.pyc +__pycache__/ +*sqlite3 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/COMMIT_EDITMSG b/tests/test_project_fixtures/test_project_rename_table/git/COMMIT_EDITMSG new file mode 100644 index 0000000..64988b6 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/COMMIT_EDITMSG @@ -0,0 +1 @@ +All files diff --git a/tests/test_project_fixtures/test_project_rename_table/git/HEAD b/tests/test_project_fixtures/test_project_rename_table/git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/tests/test_project_fixtures/test_project_rename_table/git/config b/tests/test_project_fixtures/test_project_rename_table/git/config new file mode 100644 index 0000000..eeb8dd7 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/config @@ -0,0 +1,5 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true diff --git a/tests/test_project_fixtures/test_project_rename_table/git/description b/tests/test_project_fixtures/test_project_rename_table/git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/tests/test_project_fixtures/test_project_rename_table/git/hooks/applypatch-msg.sample b/tests/test_project_fixtures/test_project_rename_table/git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..8b2a2fe --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_rename_table/git/hooks/commit-msg.sample b/tests/test_project_fixtures/test_project_rename_table/git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/tests/test_project_fixtures/test_project_rename_table/git/hooks/post-update.sample b/tests/test_project_fixtures/test_project_rename_table/git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-applypatch.sample b/tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..b1f187c --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} +: diff --git a/tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-commit.sample b/tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-commit.sample new file mode 100644 index 0000000..68d62d5 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-push.sample b/tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-push.sample new file mode 100644 index 0000000..1f3bceb --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-push.sample @@ -0,0 +1,54 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +IFS=' ' +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + else + if [ "$remote_sha" = $z40 ] + then + # New branch, examine all commits + range="$local_sha" + else + # Update to existing branch, examine new commits + range="$remote_sha..$local_sha" + fi + + # Check for WIP commit + commit=`git rev-list -n 1 --grep '^WIP' "$range"` + if [ -n "$commit" ] + then + echo "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-rebase.sample b/tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-rebase.sample new file mode 100644 index 0000000..33730ca --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up-to-date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/tests/test_project_fixtures/test_project_rename_table/git/hooks/prepare-commit-msg.sample b/tests/test_project_fixtures/test_project_rename_table/git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..f093a02 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first comments out the +# "Conflicts:" part of a merge commit. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/tests/test_project_fixtures/test_project_rename_table/git/hooks/update.sample b/tests/test_project_fixtures/test_project_rename_table/git/hooks/update.sample new file mode 100644 index 0000000..d847583 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to blocks unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero="0000000000000000000000000000000000000000" +if [ "$newrev" = "$zero" ]; then + newrev_type=delete +else + newrev_type=$(git cat-file -t $newrev) +fi + +case "$refname","$newrev_type" in + refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/index b/tests/test_project_fixtures/test_project_rename_table/git/index new file mode 100644 index 0000000000000000000000000000000000000000..c9d764587bebc0c86c47a7082c08bf5a0b916239 GIT binary patch literal 1384 zcmZ?q402{*U|<4b{>V>OHezC_3@{of#>c?5u8x7BaS4zO12W0eZ5d~DFP&0i)!=sW zM32@|^~>xGTzcu5C7J1Y`9-NPg^{0ZBba77ioj@~ILN#PRP&h4?>+vTx9G5Hz396e zyUIAezM8GTrpLgUo0ylFo~l<+$q@Nr&j#_2MQdO*)SUCE<}ffkoBL??ri<5{y}LEn zl}Ft;^rR+?VnKm^e0*kJW=VWJ$Ve~%nI}1CQ2~sGntKAxT>Bo2&!2By zm2++VJj1E!(2{*eP3Fik2*S-xOv%m6gSk`M!A%Eb9*BmTcM8qCs6Q<1e9dMb>#S9n zBGQ7B?6SAYr!xp3%qu7;2D=d$ZuPp$oo@imyU6OF0CX2P{4SxI$E0?{eSOYXF4gu< zFaOhBg?f%sx7Ph-(14qlo0(peSdy8aSFCSfU|<-ZT$Gwvk{Vx|x7X zApo`KDylt5(7XJfB@uP`L4$gU^Gw&l#b7$nQK$?l=;xz>ANZ->+`=ou{1O)H7)*z zlukevfQ^m(WD%~CzsLe)o}!uD6sURU(9E-+_{wFG#P3UAIGi~nHSAd=PbzZSA(>Z} znOY7rFIQx7cLT^g!K_|b{5?Q34}1Pl1^c_8C_gJTxdbK7Fft4;)=SKrGe@g*Hv=Afic?EUGV{{mK_2 zp!VEFwTGFbIQHr7?xPRiYHmJVcP?q`^Aoq(-Z3cR_D^XMBwB&yt4XM49{|%Ly+Gr^ z@p&KBe8#ouj+ 1509047712 +0200 commit (initial): Init +bdc56b5a08fe5d060b09bcc9a54cf5d9c8b88dfa cd1aa87abf1095d2ca6b9b64308931ab52e598c8 David-Wobrock 1509047722 +0200 commit: All files diff --git a/tests/test_project_fixtures/test_project_rename_table/git/logs/refs/heads/master b/tests/test_project_fixtures/test_project_rename_table/git/logs/refs/heads/master new file mode 100644 index 0000000..c50678d --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/logs/refs/heads/master @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 bdc56b5a08fe5d060b09bcc9a54cf5d9c8b88dfa David-Wobrock 1509047712 +0200 commit (initial): Init +bdc56b5a08fe5d060b09bcc9a54cf5d9c8b88dfa cd1aa87abf1095d2ca6b9b64308931ab52e598c8 David-Wobrock 1509047722 +0200 commit: All files diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/26/33c5502148ad76d39331a6f075cbc2aa3413ba b/tests/test_project_fixtures/test_project_rename_table/git/objects/26/33c5502148ad76d39331a6f075cbc2aa3413ba new file mode 100644 index 0000000000000000000000000000000000000000..82bf5469087e87cdf10f792f1c9e0c83f7584c6e GIT binary patch literal 98 zcmV-o0G8V9-AW;pF0^5+H(o{_@0G0G4 EidgqARR910 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 b/tests/test_project_fixtures/test_project_rename_table/git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 new file mode 100644 index 0000000000000000000000000000000000000000..adf64119a33d7621aeeaa505d30adb58afaa5559 GIT binary patch literal 15 WcmbR literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 b/tests/test_project_fixtures/test_project_rename_table/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 new file mode 100644 index 0000000..cf19499 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/objects/67/41b31d80b759d26496e68078ea8c6993a5b206 @@ -0,0 +1 @@ +xm�OOA Å=ϧhö‰îãE& Á(ÀxœvºË�Ît3S@¿½Ëžš¦¯ï÷Ú5ñîoŠ¢P_Ëé jŽ�o¡áä£`2‚YL—x‹µÀ¥–JÍð»ãŒdƒp^¶DvM6ƒ…ÀnGxG¸G‚½Mþ4Š6 ƒª²]G¾¶â9VUï÷Ú'{x8 €coî34žð2¢ÚˆtùIkÇu.ÝÖÆ–ÿ2Õ4F=*G#½áƒ°vØÿŒ¢¹õZÏT>tœ8+Õ$pv)ë^ep´(æØ›«¨Jq.1î}âXf‡�Ý‘ ŠñÛË|º0ËÉj5›O—æc1þ|Ÿ·P\ÿÏXçLd1qGdj¦]8Ùˆ�m.†J]¡àþK0ª_òCš€ \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/71/6d88c3f72dfc3e2d9d97f861c19ba2318c9ef5 b/tests/test_project_fixtures/test_project_rename_table/git/objects/71/6d88c3f72dfc3e2d9d97f861c19ba2318c9ef5 new file mode 100644 index 0000000000000000000000000000000000000000..76af69654cc49e56145b37171ddf83e250c54b6d GIT binary patch literal 168 zcmV;Z09XHb0V^p=O;s>7Gh#3_FfcPQQP4}zEXhpI%P&f0NSv|aoZv8uS+6Qnr&}1C&5D-4J`t%%D=)j;;plyrJBns#|CA|W#RLOw8T?oA|g=nz$ zyxB{;#ZjNvXoRw2!50e=u-CO05iLmH3wHM<4Uzehtp;01dk5Xby5MlrG$1W#)1wO| zK6IR}2iNeD+>IS3L^O~N-0Pr{dS0+s_5=3-1~NL0#8UtO literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 b/tests/test_project_fixtures/test_project_rename_table/git/objects/7c/e503c2dd97ba78597f6ff6e4393132753573f6 new file mode 100644 index 0000000000000000000000000000000000000000..250bef6ac737f97163f7f541ed98f1f4581b0f67 GIT binary patch literal 72 zcmV-O0Jr~m0ZYosPf{>5U`Q*<&s9jtO3X{o*DFaaE>XzLEyyn_Q3wIDofC^wxww=S eoQqNuOHvgo^Gk~qKx&E=GE$3D^|$~d*cUrI-yGBc literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/7f/c9a68ff524659a2182df44137c56335a1d80b6 b/tests/test_project_fixtures/test_project_rename_table/git/objects/7f/c9a68ff524659a2182df44137c56335a1d80b6 new file mode 100644 index 0000000000000000000000000000000000000000..2c43bef577973a85a0f52a688a26aa20f2855b0d GIT binary patch literal 132 zcmV-~0DJ#<0V^p=O;s>7Hf1n0FfcPQQ7|wtFpN(wN=+bm;dRmLOn;RTkHNJ)EmVYrRF8(BB}o#xAfr3%&ev4n64!o(KT&hC2dj5HDfR|FfcPQQHYPv%*!l^kJl@xWOz3B(d zXRX2%krtd}m%UX!-NXP06mm1uixNvR^Ye-s>Q64~|EiKYOR?#`i*QYtag=PsHmEtd z`6;P6V3X90j|M1utS!4d*>Ks1($j}lnF#NKDk@1WE&;2ldCGj~?(|(1k@flCo>&?h qm6{fRgQ_XZOf3hinfS_Ok;LyyUpSmOBQ@+o literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/91/ea44a218fbd2f408430959283f0419c921093e b/tests/test_project_fixtures/test_project_rename_table/git/objects/91/ea44a218fbd2f408430959283f0419c921093e new file mode 100644 index 0000000000000000000000000000000000000000..263fc8c87e325bcaa3c19492252655b82f498d2d GIT binary patch literal 77 zcmV-T0J8sh0ZYosPf{>5W=Jc_&s9jtO3X{o*DKD*FDgkcEh$#W%q;*i6^c^xQc{b! jxRe!~i&7IyQWYxmON$iBGE>Wo6*5wbQuVk1gVGqx_PZe6 literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/92/a21e6d935deaba88f676457f189e9c9c2a75bb b/tests/test_project_fixtures/test_project_rename_table/git/objects/92/a21e6d935deaba88f676457f189e9c9c2a75bb new file mode 100644 index 0000000000000000000000000000000000000000..76f1a718f3124526a392b6333e8e5ed4622937a0 GIT binary patch literal 1258 zcmVam2>xs`>W%r_<9@tv&aXDMNxtNt3BS6ULDwLV77@ za}r38lf;jSC;f3mPe z?029hW}G0JfX3LDlqCqhaz?=h8j(vdiD)w^Q*qO1ge(xaP*Rx?u(&~zhLYHjETw^H zR8BMs`Eo|kB#R;xQ6UkVY@GCy5Hu0W(bA7HBECx*CzCBrDux=3Q^rAs(6lpjo6#sl zsV`>&yc0AeN>>#+FlM0+sJMaqSY5+&Mw9bf!!f}F+=M~%Y zcYiFDxO2}_0rb3Dt)?l1e$QyIsOMQhAz6}$r7=n5CLDE?B_g9miWLAL#$gtyoB+E+ z2s$zkGq#ef5t1}wPfA52n2}(i!Vf6{NoH#_wA_#A!5G?>-MK*vLee}sf&`pMcz*)G z0H^>)8zaC{MLp3#z|eHP59UV*i$0a(iuM z&FFUf4`$nY-*;RGPCtLiV{W8rM1um>A(_yG=F!wF+i`&f7>vOnzpo+qlm&zXmPk&= zI4>mqaz8DTvjZf>4q=y1DG>**2qFaJ^$Kb_7v)b*h z3F$ReD0a+`X&6Ri<#U1|of)U{2|MMV-kSCetMQf;r|{$;@77i56){V2D}NltAov8g z;OCx_)j@`Jwjd+hmKpF4X(;pmP4+70+ah{J9uD%x>xkh1fVP5>_o67v0}2$rW^RDbVp85b^m-0rvb1N<(!*b*_qRi_#ysR^L{HjUhQp zj{Lv!sTDxz7#B+D+E{f*eX2TJTl!xzP1}K5f-u7X5_=3RS zBS*!~6g>+|ei)!_!!^|KQxkD#_JW1a#Zz zsoT}?d^U4+;I5czWpuQ!xo-nsh!x|Z+7&1mT1>_N<)%t*JuT(cOL>4*7$YP1y*Dr% z=b=Ard-q1yf;jYtdke4hr1HChgc1(>L}9GAF&2*m;f7RmC6mOVF^zoHeeVl*7%!t# zf?`uxRmhH3)Ppe>XK|M#Q#t$b;*0iOrQ^rTx3idV8oZzYss#{k!H|VbOaTEx`1f}r zqTE$!^E!d0sB74rk#G;é \ No newline at end of file diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/cd/1aa87abf1095d2ca6b9b64308931ab52e598c8 b/tests/test_project_fixtures/test_project_rename_table/git/objects/cd/1aa87abf1095d2ca6b9b64308931ab52e598c8 new file mode 100644 index 0000000000000000000000000000000000000000..e08128ce581aef160544de731c2ef0c7ea407b2b GIT binary patch literal 163 zcmV;U09^lg0i}*R4gw(*0IfL%y>at^<(C+viFdGu_dtoPm=*Q*LT#cB;BwLg1|s-~=z|_H zYx3x#bCd%M&wgn$KZaMK&8fw?;gxUci^Kbe`|}h^9k5M1E;M);t(B6mK?1PFE~7pD Rkzj{fc`h|Q*asVLOnc6@O^g5l literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/d8/47af6cf50a2587894a4fcb8a712e411adaaefd b/tests/test_project_fixtures/test_project_rename_table/git/objects/d8/47af6cf50a2587894a4fcb8a712e411adaaefd new file mode 100644 index 0000000000000000000000000000000000000000..93b09f840dbd29e656cdf1ce6f2327cb878c5b88 GIT binary patch literal 324 zcmV-K0lWTq0bNkbYQr!P?Ac$jkb|8Pn<&(63HT5iQgXVT36n%2oBRsaTyz8PeHd5L zEMV{hL7B9oHU51{X-~|O_PBSN7e&Y=_Xy=pdClSOcg_-Fy2|pS$f&3*f^_pL7LV6McXNa zRiX3(M$Ly>pXeu^&WJ(nx8mPe?fma~$rtKI8Kkkqew)tcw>?5=mP#iCohn_U_tIjI WI;ID~l<|N5c(pq_ACn(*!J{WGLY(6O literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/de/e3fd6ea2c3257f15eed8ba7608f5ea9b20062e b/tests/test_project_fixtures/test_project_rename_table/git/objects/de/e3fd6ea2c3257f15eed8ba7608f5ea9b20062e new file mode 100644 index 0000000000000000000000000000000000000000..074d608a340c4b355b408ed87be5238a0e5c3ff4 GIT binary patch literal 457 zcmV;)0XF`40ew?VYui8&?ODHKDj(uNks-a5KnSKbNlI%Qq8@r$M$*XMRJ&t#M8{i647QE9s%JHT<21KUiSBRc{1FJFH2S*BZ1 z%Az5q;N}K$r3`ATRDPX7c-R+#LOZsFCuyj~zLR;r`m)^IZPnwtEFU&^kLufY_5JHQ z{{Xp=7j<;}M71bKiCM7fDAtR%d!Jt>W^v=xBDQHA8)%-;?zyPhQDM;Ho(x%mlWuyZ zx))Lrs%ka?(Wp*aN^JC8(^23dd0ack?l<`i$^!vbJkSf7!4X>29klGgvmszPkON2P zgH>2t-#Y?1poG`dBI=xh_P!4^K0>>0oFJ>DJf50xA54NU;J~^8gZ^hcNc>6a#4`!j zY(21rT^bQw6=%eocw)&ZhAE^o?0>#vl|$|6bu9C9X}pe4{+au(u@~p0CpQHwLjoiB zkfP9X;Xzw3!8J7y!iW4%DjY(naoW*TsCBUWQQmJiyJdL~r$tIb9nk5ByM^+wdesQOcBB|N{`)Zw%fP0(|$#3$$e7!&+VCqzo0<3A17v0yMXFfcPQQHYPv%*!l^kJl@xWOz3B(d)i{x@A$G+Ot@vY3YUSi&yIa;N=p~^~&a==Q8W1rsc zKKk&j=H}CN=aRNQKXIGw9aKqqae5}mlyt|6+$6ht}E CCQZ}; literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/f7/5ea5c1a969f7e950efb86deadd0a4e4fe1a256 b/tests/test_project_fixtures/test_project_rename_table/git/objects/f7/5ea5c1a969f7e950efb86deadd0a4e4fe1a256 new file mode 100644 index 0000000000000000000000000000000000000000..bd4ba1a8eeb1559e04d72fe8e78a547ae8242e20 GIT binary patch literal 247 zcmV0l*AhvS(4>feZ_+w- ze9L<;=kOZi8n`>Mn+=q=CA3ay+t)C~t~}<1Y~U3wjxwTx<{MrG<_FS^ZU7;=DNZ8_0ebLmj4)Z9;3$laiDm*>hHBLyN1kx$=XcgL4V}KL9&tWbK8Zks6y{9{%j4>|S5z|8=%Elnw?&j&o xf^j}SoBjVFSLQdga=>$X#uTe0i=0s+S10;J7iLcLS^WBKp0Ao!`~wM?a2UP)b;$q# literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/objects/fc/04070e8336f17e3b2402586653623e6bb51f67 b/tests/test_project_fixtures/test_project_rename_table/git/objects/fc/04070e8336f17e3b2402586653623e6bb51f67 new file mode 100644 index 0000000000000000000000000000000000000000..a0339be7c120f5ad7bb6d3595d3826bf03fb9027 GIT binary patch literal 88 zcmV-e0H^oeKbS6(DiPJS2($ literal 0 HcmV?d00001 diff --git a/tests/test_project_fixtures/test_project_rename_table/git/refs/heads/master b/tests/test_project_fixtures/test_project_rename_table/git/refs/heads/master new file mode 100644 index 0000000..b95031a --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/git/refs/heads/master @@ -0,0 +1 @@ +cd1aa87abf1095d2ca6b9b64308931ab52e598c8 diff --git a/tests/test_project_fixtures/test_project_rename_table/manage.py b/tests/test_project_fixtures/test_project_rename_table/manage.py new file mode 100644 index 0000000..dee3fd6 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_rename_table.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) diff --git a/tests/test_project_fixtures/test_project_rename_table/test_app/__init__.py b/tests/test_project_fixtures/test_project_rename_table/test_app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_rename_table/test_app/admin.py b/tests/test_project_fixtures/test_project_rename_table/test_app/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/test_app/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/tests/test_project_fixtures/test_project_rename_table/test_app/apps.py b/tests/test_project_fixtures/test_project_rename_table/test_app/apps.py new file mode 100644 index 0000000..fc04070 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/test_app/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class TestAppConfig(AppConfig): + name = 'test_app' diff --git a/tests/test_project_fixtures/test_project_rename_table/test_app/migrations/0001_create_table.py b/tests/test_project_fixtures/test_project_rename_table/test_app/migrations/0001_create_table.py new file mode 100644 index 0000000..d847af6 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/test_app/migrations/0001_create_table.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 14:15 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='A', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('null_field', models.IntegerField(null=True)), + ], + ), + ] diff --git a/tests/test_project_fixtures/test_project_rename_table/test_app/migrations/0002_rename_table.py b/tests/test_project_fixtures/test_project_rename_table/test_app/migrations/0002_rename_table.py new file mode 100644 index 0000000..f75ea5c --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/test_app/migrations/0002_rename_table.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-25 14:15 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('test_app', '0001_create_table'), + ] + + operations = [ + migrations.RenameModel( + old_name='A', + new_name='B', + ), + ] diff --git a/tests/test_project_fixtures/test_project_rename_table/test_app/migrations/__init__.py b/tests/test_project_fixtures/test_project_rename_table/test_app/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_rename_table/test_app/models.py b/tests/test_project_fixtures/test_project_rename_table/test_app/models.py new file mode 100644 index 0000000..2633c55 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/test_app/models.py @@ -0,0 +1,4 @@ +from django.db import models + +class B(models.Model): + null_field = models.IntegerField(null=True) diff --git a/tests/test_project_fixtures/test_project_rename_table/test_app/tests.py b/tests/test_project_fixtures/test_project_rename_table/test_app/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/test_app/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/tests/test_project_fixtures/test_project_rename_table/test_app/views.py b/tests/test_project_fixtures/test_project_rename_table/test_app/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/test_app/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/__init__.py b/tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/settings.py b/tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/settings.py new file mode 100644 index 0000000..92a21e6 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/settings.py @@ -0,0 +1,121 @@ +""" +Django settings for test_project_rename_table project. + +Generated by 'django-admin startproject' using Django 1.11.6. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.11/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'gtb+mohs%gf0+#fr89vw7e&#edmv=q8!iv+n&j_soawk$tkj3^' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'test_app' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'test_project_rename_table.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'test_project_rename_table.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.11/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.11/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.11/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/urls.py b/tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/urls.py new file mode 100644 index 0000000..735de5d --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/urls.py @@ -0,0 +1,21 @@ +"""linter_test_project URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.11/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url +from django.contrib import admin + +urlpatterns = [ + url(r'^admin/', admin.site.urls), +] diff --git a/tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/wsgi.py b/tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/wsgi.py new file mode 100644 index 0000000..6741b31 --- /dev/null +++ b/tests/test_project_fixtures/test_project_rename_table/test_project_rename_table/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for linter_test_project project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project_add_not_null_column.settings") + +application = get_wsgi_application() diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 40cc1bb..151f48b 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -19,6 +19,12 @@ from django_migration_linter import MigrationLinter, valid_folder class UtilityFunctionTest(unittest.TestCase): + def tearDown(self, *args, **kwargs): + #fixtures.clear_all_git_projects() + super( + UtilityFunctionTest, + self).tearDown(*args, **kwargs) + def test_split_migration_path(self): input_path = 'apps/the_app/migrations/0001_stuff.py' app, mig = MigrationLinter._split_migration_path(input_path) @@ -32,10 +38,14 @@ class UtilityFunctionTest(unittest.TestCase): self.assertEqual(mig, '0001_stuff') def test_detect_valid_folder(self): - self.assertTrue(valid_folder(fixtures.ADD_NOT_NULL_COLUMN_PROJECT)) + test_project_path = fixtures.MULTI_COMMIT_PROJECT + fixtures.prepare_git_project(test_project_path) + self.assertTrue(valid_folder(test_project_path)) def test_detect_not_django_project(self): - self.assertFalse(valid_folder(fixtures.NOT_DJANGO_GIT_PROJECT)) + test_project_path = fixtures.NOT_DJANGO_GIT_PROJECT + fixtures.prepare_git_project(test_project_path) + self.assertFalse(valid_folder(test_project_path)) def test_detect_not_git_project(self): self.assertFalse(valid_folder(fixtures.NOT_GIT_DJANGO_PROJECT)) From 767ce8c9941beaa6613e0fc0be287e8b368b920d Mon Sep 17 00:00:00 2001 From: David Wobrock Date: Thu, 16 Nov 2017 16:38:04 +0100 Subject: [PATCH 4/4] Fix typo and clean up todo comments in setup.py --- setup.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/setup.py b/setup.py index ae711ef..b88b8db 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ setup( name='django-migration-linter', version='0.0.1', - description='Fetect backward incompatible migrations for your django project', + description='Detect backward incompatible migrations for your django project', long_description=long_description, url='https://github.com/3YOURMIND/django-migration-linter', author='3YOURMIND GmbH', @@ -61,10 +61,5 @@ setup( 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', - # TODO verify Python 3 compatible - # 'Programming Language :: Python :: 3', - # 'Programming Language :: Python :: 3.3', - # 'Programming Language :: Python :: 3.4', - # 'Programming Language :: Python :: 3.5', ] )