tests: test patching of symbolic refspecs i.e branches

That once caused issues when rolling back (checkout) since our local
branch we patched and commited on had the desired name.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Henning Schild 2019-09-24 09:18:25 +02:00 committed by Jan Kiszka
parent 26a1a0b03b
commit e29035407f
4 changed files with 20 additions and 0 deletions

View File

@ -36,3 +36,4 @@ def test_patch(tmpdir):
kas.kas(['shell', 'test.yml', '-c', 'true'])
for f in ['kas/tests/test_patch/hello.sh', 'hello/hello.sh']:
assert os.stat(f)[stat.ST_MODE] & stat.S_IXUSR
kas.kas(['shell', 'test.yml', '-c', 'true'])

View File

@ -0,0 +1 @@
../hello/quilt/003.patch

View File

@ -0,0 +1 @@
../kas/quilt/003.patch

View File

@ -15,6 +15,14 @@ repos:
repo: this
path: patches/kas/quilt/
kas-branch:
url: https://github.com/siemens/kas.git
refspec: master
patches:
plain:
repo: this
path: patches/kas-branch/003.patch
hello:
url: https://www.mercurial-scm.org/repo/hello/
refspec: 82e55d328c8c
@ -26,3 +34,12 @@ repos:
quilt:
repo: this
path: patches/hello/quilt/
hello-branch:
url: https://www.mercurial-scm.org/repo/hello/
refspec: default
type: hg
patches:
plain:
repo: this
path: patches/hello-branch/003.patch