##// END OF EJS Templates
release: Merge default into stable for release preparation
marcink -
r644:62834191 merge stable
parent child Browse files
Show More
@@ -1,5 +1,5 b''
1 [bumpversion]
1 [bumpversion]
2 current_version = 4.15.2
2 current_version = 4.16.0
3 message = release: Bump version {current_version} to {new_version}
3 message = release: Bump version {current_version} to {new_version}
4
4
5 [bumpversion:file:vcsserver/VERSION]
5 [bumpversion:file:vcsserver/VERSION]
@@ -5,12 +5,10 b' done = false'
5 done = true
5 done = true
6
6
7 [task:fixes_on_stable]
7 [task:fixes_on_stable]
8 done = true
9
8
10 [task:pip2nix_generated]
9 [task:pip2nix_generated]
11 done = true
12
10
13 [release]
11 [release]
14 state = prepared
12 state = in_progress
15 version = 4.15.2
13 version = 4.16.0
16
14
@@ -1,10 +1,10 b''
1
1
2 .PHONY: clean test test-clean test-only
2 .PHONY: clean test test-clean test-only generate-pkgs
3
3
4
4
5 clean:
5 clean:
6 make test-clean
6 make test-clean
7 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' \) -exec rm '{}' ';'
7 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
8
8
9 test:
9 test:
10 make test-clean
10 make test-clean
@@ -15,4 +15,9 b' test-clean:'
15 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
15 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
16
16
17 test-only:
17 test-only:
18 PYTHONHASHSEED=random py.test -vv -r xw -p no:sugar --cov=vcsserver --cov-report=term-missing --cov-report=html vcsserver
18 PYTHONHASHSEED=random \
19 py.test -x -vv -r xw -p no:sugar \
20 --cov=vcsserver --cov-report=term-missing --cov-report=html vcsserver
21
22 generate-pkgs:
23 nix-shell pkgs/shell-generate.nix --command "pip2nix generate --licenses"
@@ -5,14 +5,15 b''
5 # "shell.nix" so that it does not have to clutter this file.
5 # "shell.nix" so that it does not have to clutter this file.
6
6
7 args@
7 args@
8 { pythonPackages ? "python27Packages"
8 { system ? builtins.currentSystem
9 , pythonPackages ? "python27Packages"
9 , pythonExternalOverrides ? self: super: {}
10 , pythonExternalOverrides ? self: super: {}
10 , doCheck ? false
11 , doCheck ? false
11 , ...
12 , ...
12 }:
13 }:
13
14
14 let
15 let
15 pkgs_ = (import <nixpkgs> {});
16 pkgs_ = args.pkgs or (import <nixpkgs> { inherit system; });
16 in
17 in
17
18
18 let
19 let
@@ -1,10 +1,10 b''
1 self: super: {
1 self: super: {
2 # bump GIT version
2 # bump GIT version
3 git = super.lib.overrideDerivation super.git (oldAttrs: {
3 git = super.lib.overrideDerivation super.git (oldAttrs: {
4 name = "git-2.19.1";
4 name = "git-2.19.2";
5 src = self.fetchurl {
5 src = self.fetchurl {
6 url = "https://www.kernel.org/pub/software/scm/git/git-2.19.1.tar.xz";
6 url = "https://www.kernel.org/pub/software/scm/git/git-2.19.2.tar.xz";
7 sha256 = "1dfv43lmdnxz42504jc89sihbv1d4d6kgqcz3c5ji140kfm5cl1l";
7 sha256 = "1scbggzghkzzfqg4ky3qh7h9w87c3zya4ls5disz7dbx56is7sgw";
8 };
8 };
9
9
10 # patches come from: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/version-management/git-and-tools/git
10 # patches come from: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/version-management/git-and-tools/git
@@ -99,11 +99,14 b' self: super: {'
99 };
99 };
100 };
100 };
101 "dogpile.cache" = super.buildPythonPackage {
101 "dogpile.cache" = super.buildPythonPackage {
102 name = "dogpile.cache-0.6.7";
102 name = "dogpile.cache-0.7.1";
103 doCheck = false;
103 doCheck = false;
104 propagatedBuildInputs = [
105 self."decorator"
106 ];
104 src = fetchurl {
107 src = fetchurl {
105 url = "https://files.pythonhosted.org/packages/ee/bd/440da735a11c6087eed7cc8747fc4b995cbac2464168682f8ee1c8e43844/dogpile.cache-0.6.7.tar.gz";
108 url = "https://files.pythonhosted.org/packages/84/3e/dbf1cfc5228f1d3dca80ef714db2c5aaec5cd9efaf54d7e3daef6bc48b19/dogpile.cache-0.7.1.tar.gz";
106 sha256 = "1aw8rx8vhb75y7zc6gi67g21sw057jdx7i8m3jq7kf3nqavxx9zw";
109 sha256 = "0caazmrzhnfqb5yrp8myhw61ny637jj69wcngrpbvi31jlcpy6v9";
107 };
110 };
108 meta = {
111 meta = {
109 license = [ pkgs.lib.licenses.bsdOriginal ];
112 license = [ pkgs.lib.licenses.bsdOriginal ];
@@ -154,14 +157,14 b' self: super: {'
154 };
157 };
155 };
158 };
156 "gevent" = super.buildPythonPackage {
159 "gevent" = super.buildPythonPackage {
157 name = "gevent-1.3.7";
160 name = "gevent-1.4.0";
158 doCheck = false;
161 doCheck = false;
159 propagatedBuildInputs = [
162 propagatedBuildInputs = [
160 self."greenlet"
163 self."greenlet"
161 ];
164 ];
162 src = fetchurl {
165 src = fetchurl {
163 url = "https://files.pythonhosted.org/packages/10/c1/9499b146bfa43aa4f1e0ed1bab1bd3209a4861d25650c11725036c731cf5/gevent-1.3.7.tar.gz";
166 url = "https://files.pythonhosted.org/packages/ed/27/6c49b70808f569b66ec7fac2e78f076e9b204db9cf5768740cff3d5a07ae/gevent-1.4.0.tar.gz";
164 sha256 = "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz";
167 sha256 = "1lchr4akw2jkm5v4kz7bdm4wv3knkfhbfn9vkkz4s5yrkcxzmdqy";
165 };
168 };
166 meta = {
169 meta = {
167 license = [ pkgs.lib.licenses.mit ];
170 license = [ pkgs.lib.licenses.mit ];
@@ -302,11 +305,11 b' self: super: {'
302 };
305 };
303 };
306 };
304 "markupsafe" = super.buildPythonPackage {
307 "markupsafe" = super.buildPythonPackage {
305 name = "markupsafe-1.0";
308 name = "markupsafe-1.1.0";
306 doCheck = false;
309 doCheck = false;
307 src = fetchurl {
310 src = fetchurl {
308 url = "https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz";
311 url = "https://files.pythonhosted.org/packages/ac/7e/1b4c2e05809a4414ebce0892fe1e32c14ace86ca7d50c70f00979ca9b3a3/MarkupSafe-1.1.0.tar.gz";
309 sha256 = "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6";
312 sha256 = "1lxirjypbdd3l9jl4vliilhfnhy7c7f2vlldqg1b0i74khn375sf";
310 };
313 };
311 meta = {
314 meta = {
312 license = [ pkgs.lib.licenses.bsdOriginal ];
315 license = [ pkgs.lib.licenses.bsdOriginal ];
@@ -335,14 +338,14 b' self: super: {'
335 };
338 };
336 };
339 };
337 "more-itertools" = super.buildPythonPackage {
340 "more-itertools" = super.buildPythonPackage {
338 name = "more-itertools-4.3.0";
341 name = "more-itertools-5.0.0";
339 doCheck = false;
342 doCheck = false;
340 propagatedBuildInputs = [
343 propagatedBuildInputs = [
341 self."six"
344 self."six"
342 ];
345 ];
343 src = fetchurl {
346 src = fetchurl {
344 url = "https://files.pythonhosted.org/packages/88/ff/6d485d7362f39880810278bdc906c13300db05485d9c65971dec1142da6a/more-itertools-4.3.0.tar.gz";
347 url = "https://files.pythonhosted.org/packages/dd/26/30fc0d541d9fdf55faf5ba4b0fd68f81d5bd2447579224820ad525934178/more-itertools-5.0.0.tar.gz";
345 sha256 = "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4";
348 sha256 = "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q";
346 };
349 };
347 meta = {
350 meta = {
348 license = [ pkgs.lib.licenses.mit ];
351 license = [ pkgs.lib.licenses.mit ];
@@ -360,26 +363,26 b' self: super: {'
360 };
363 };
361 };
364 };
362 "pastedeploy" = super.buildPythonPackage {
365 "pastedeploy" = super.buildPythonPackage {
363 name = "pastedeploy-1.5.2";
366 name = "pastedeploy-2.0.1";
364 doCheck = false;
367 doCheck = false;
365 src = fetchurl {
368 src = fetchurl {
366 url = "https://files.pythonhosted.org/packages/0f/90/8e20cdae206c543ea10793cbf4136eb9a8b3f417e04e40a29d72d9922cbd/PasteDeploy-1.5.2.tar.gz";
369 url = "https://files.pythonhosted.org/packages/19/a0/5623701df7e2478a68a1b685d1a84518024eef994cde7e4da8449a31616f/PasteDeploy-2.0.1.tar.gz";
367 sha256 = "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm";
370 sha256 = "02imfbbx1mi2h546f3sr37m47dk9qizaqhzzlhx8bkzxa6fzn8yl";
368 };
371 };
369 meta = {
372 meta = {
370 license = [ pkgs.lib.licenses.mit ];
373 license = [ pkgs.lib.licenses.mit ];
371 };
374 };
372 };
375 };
373 "pathlib2" = super.buildPythonPackage {
376 "pathlib2" = super.buildPythonPackage {
374 name = "pathlib2-2.3.2";
377 name = "pathlib2-2.3.3";
375 doCheck = false;
378 doCheck = false;
376 propagatedBuildInputs = [
379 propagatedBuildInputs = [
377 self."six"
380 self."six"
378 self."scandir"
381 self."scandir"
379 ];
382 ];
380 src = fetchurl {
383 src = fetchurl {
381 url = "https://files.pythonhosted.org/packages/db/a8/7d6439c1aec525ed70810abee5b7d7f3aa35347f59bc28343e8f62019aa2/pathlib2-2.3.2.tar.gz";
384 url = "https://files.pythonhosted.org/packages/bf/d7/a2568f4596b75d2c6e2b4094a7e64f620decc7887f69a1f2811931ea15b9/pathlib2-2.3.3.tar.gz";
382 sha256 = "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf";
385 sha256 = "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695";
383 };
386 };
384 meta = {
387 meta = {
385 license = [ pkgs.lib.licenses.mit ];
388 license = [ pkgs.lib.licenses.mit ];
@@ -443,11 +446,11 b' self: super: {'
443 };
446 };
444 };
447 };
445 "pluggy" = super.buildPythonPackage {
448 "pluggy" = super.buildPythonPackage {
446 name = "pluggy-0.8.0";
449 name = "pluggy-0.8.1";
447 doCheck = false;
450 doCheck = false;
448 src = fetchurl {
451 src = fetchurl {
449 url = "https://files.pythonhosted.org/packages/65/25/81d0de17cd00f8ca994a4e74e3c4baf7cd25072c0b831dad5c7d9d6138f8/pluggy-0.8.0.tar.gz";
452 url = "https://files.pythonhosted.org/packages/38/e1/83b10c17688af7b2998fa5342fec58ecbd2a5a7499f31e606ae6640b71ac/pluggy-0.8.1.tar.gz";
450 sha256 = "1580p47l2zqzsza8jcnw1h2wh3vvmygk6ly8bvi4w0g8j14sjys4";
453 sha256 = "05l6g42p9ilmabw0hlbiyxy6gyzjri41m5l11a8dzgvi77q35p4d";
451 };
454 };
452 meta = {
455 meta = {
453 license = [ pkgs.lib.licenses.mit ];
456 license = [ pkgs.lib.licenses.mit ];
@@ -469,11 +472,11 b' self: super: {'
469 };
472 };
470 };
473 };
471 "psutil" = super.buildPythonPackage {
474 "psutil" = super.buildPythonPackage {
472 name = "psutil-5.4.7";
475 name = "psutil-5.4.8";
473 doCheck = false;
476 doCheck = false;
474 src = fetchurl {
477 src = fetchurl {
475 url = "https://files.pythonhosted.org/packages/7d/9a/1e93d41708f8ed2b564395edfa3389f0fd6d567597401c2e5e2775118d8b/psutil-5.4.7.tar.gz";
478 url = "https://files.pythonhosted.org/packages/e3/58/0eae6e4466e5abf779d7e2b71fac7fba5f59e00ea36ddb3ed690419ccb0f/psutil-5.4.8.tar.gz";
476 sha256 = "0fsgmvzwbdbszkwfnqhib8jcxm4w6zyhvlxlcda0rfm5cyqj4qsv";
479 sha256 = "1hyna338sml2cl1mfb2gs89np18z27mvyhmq4ifh22x07n7mq9kf";
477 };
480 };
478 meta = {
481 meta = {
479 license = [ pkgs.lib.licenses.bsdOriginal ];
482 license = [ pkgs.lib.licenses.bsdOriginal ];
@@ -502,35 +505,34 b' self: super: {'
502 };
505 };
503 };
506 };
504 "pygments" = super.buildPythonPackage {
507 "pygments" = super.buildPythonPackage {
505 name = "pygments-2.3.0";
508 name = "pygments-2.3.1";
506 doCheck = false;
509 doCheck = false;
507 src = fetchurl {
510 src = fetchurl {
508 url = "https://files.pythonhosted.org/packages/63/a2/91c31c4831853dedca2a08a0f94d788fc26a48f7281c99a303769ad2721b/Pygments-2.3.0.tar.gz";
511 url = "https://files.pythonhosted.org/packages/64/69/413708eaf3a64a6abb8972644e0f20891a55e621c6759e2c3f3891e05d63/Pygments-2.3.1.tar.gz";
509 sha256 = "1z34ms51dh4jq4h3cizp7vd1dmsxcbvffkjsd2xxfav22nn6lrl2";
512 sha256 = "0ji87g09jph8jqcvclgb02qvxasdnr9pzvk90rl66d90yqcxmyjz";
510 };
513 };
511 meta = {
514 meta = {
512 license = [ pkgs.lib.licenses.bsdOriginal ];
515 license = [ pkgs.lib.licenses.bsdOriginal ];
513 };
516 };
514 };
517 };
515 "pyramid" = super.buildPythonPackage {
518 "pyramid" = super.buildPythonPackage {
516 name = "pyramid-1.9.2";
519 name = "pyramid-1.10.1";
517 doCheck = false;
520 doCheck = false;
518 propagatedBuildInputs = [
521 propagatedBuildInputs = [
519 self."setuptools"
522 self."hupper"
520 self."webob"
521 self."repoze.lru"
522 self."zope.interface"
523 self."zope.deprecation"
524 self."venusian"
525 self."translationstring"
526 self."pastedeploy"
527 self."plaster"
523 self."plaster"
528 self."plaster-pastedeploy"
524 self."plaster-pastedeploy"
529 self."hupper"
525 self."setuptools"
526 self."translationstring"
527 self."venusian"
528 self."webob"
529 self."zope.deprecation"
530 self."zope.interface"
531 self."repoze.lru"
530 ];
532 ];
531 src = fetchurl {
533 src = fetchurl {
532 url = "https://files.pythonhosted.org/packages/a0/c1/b321d07cfc4870541989ad131c86a1d593bfe802af0eca9718a0dadfb97a/pyramid-1.9.2.tar.gz";
534 url = "https://files.pythonhosted.org/packages/0a/3e/22e3ac9be1b70a01139adba8906ee4b8f628bb469fea3c52f6c97b73063c/pyramid-1.10.1.tar.gz";
533 sha256 = "09drsl0346nchgxp2j7sa5hlk7mkhfld9wvbd0wicacrp26a92fg";
535 sha256 = "1h5105nfh6rsrfjiyw20aavyibj36la3hajy6vh1fa77xb4y3hrp";
534 };
536 };
535 meta = {
537 meta = {
536 license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
538 license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
@@ -656,7 +658,7 b' self: super: {'
656 };
658 };
657 };
659 };
658 "rhodecode-vcsserver" = super.buildPythonPackage {
660 "rhodecode-vcsserver" = super.buildPythonPackage {
659 name = "rhodecode-vcsserver-4.15.2";
661 name = "rhodecode-vcsserver-4.16.0";
660 buildInputs = [
662 buildInputs = [
661 self."pytest"
663 self."pytest"
662 self."py"
664 self."py"
@@ -667,9 +669,10 b' self: super: {'
667 self."pytest-timeout"
669 self."pytest-timeout"
668 self."gprof2dot"
670 self."gprof2dot"
669 self."mock"
671 self."mock"
670 self."webtest"
671 self."cov-core"
672 self."cov-core"
672 self."coverage"
673 self."coverage"
674 self."webtest"
675 self."beautifulsoup4"
673 self."configobj"
676 self."configobj"
674 ];
677 ];
675 doCheck = true;
678 doCheck = true;
@@ -702,6 +705,7 b' self: super: {'
702 self."webob"
705 self."webob"
703 self."zope.deprecation"
706 self."zope.deprecation"
704 self."zope.interface"
707 self."zope.interface"
708 self."venusian"
705 self."gevent"
709 self."gevent"
706 self."greenlet"
710 self."greenlet"
707 self."gunicorn"
711 self."gunicorn"
@@ -718,9 +722,10 b' self: super: {'
718 self."pytest-timeout"
722 self."pytest-timeout"
719 self."gprof2dot"
723 self."gprof2dot"
720 self."mock"
724 self."mock"
721 self."webtest"
722 self."cov-core"
725 self."cov-core"
723 self."coverage"
726 self."coverage"
727 self."webtest"
728 self."beautifulsoup4"
724 ];
729 ];
725 src = ./.;
730 src = ./.;
726 meta = {
731 meta = {
@@ -750,11 +755,11 b' self: super: {'
750 };
755 };
751 };
756 };
752 "setuptools" = super.buildPythonPackage {
757 "setuptools" = super.buildPythonPackage {
753 name = "setuptools-40.6.2";
758 name = "setuptools-40.7.3";
754 doCheck = false;
759 doCheck = false;
755 src = fetchurl {
760 src = fetchurl {
756 url = "https://files.pythonhosted.org/packages/b0/d1/8acb42f391cba52e35b131e442e80deffbb8d0676b93261d761b1f0ef8fb/setuptools-40.6.2.zip";
761 url = "https://files.pythonhosted.org/packages/90/86/00ab839a8647e0fee435fe77f70795865ca4534387872a6c23b22fd85ac8/setuptools-40.7.3.zip";
757 sha256 = "0r2c5hapirlzm34h7pl1lgkm6gk7bcrlrdj28qgsvaqg3f74vfw6";
762 sha256 = "0c54kklk7c97g0dhm7ilg9cd4n4s464ps6mspsa5m9hhrcqxsbvh";
758 };
763 };
759 meta = {
764 meta = {
760 license = [ pkgs.lib.licenses.mit ];
765 license = [ pkgs.lib.licenses.mit ];
@@ -772,11 +777,11 b' self: super: {'
772 };
777 };
773 };
778 };
774 "simplejson" = super.buildPythonPackage {
779 "simplejson" = super.buildPythonPackage {
775 name = "simplejson-3.11.1";
780 name = "simplejson-3.16.0";
776 doCheck = false;
781 doCheck = false;
777 src = fetchurl {
782 src = fetchurl {
778 url = "https://files.pythonhosted.org/packages/08/48/c97b668d6da7d7bebe7ea1817a6f76394b0ec959cb04214ca833c34359df/simplejson-3.11.1.tar.gz";
783 url = "https://files.pythonhosted.org/packages/e3/24/c35fb1c1c315fc0fffe61ea00d3f88e85469004713dab488dee4f35b0aff/simplejson-3.16.0.tar.gz";
779 sha256 = "1rr58dppsq73p0qcd9bsw066cdd3v63sqv7j6sqni8frvm4jv8h1";
784 sha256 = "19cws1syk8jzq2pw43878dv6fjkb0ifvjpx0i9aajix6kc9jkwxi";
780 };
785 };
781 meta = {
786 meta = {
782 license = [ { fullName = "Academic Free License (AFL)"; } pkgs.lib.licenses.mit ];
787 license = [ { fullName = "Academic Free License (AFL)"; } pkgs.lib.licenses.mit ];
@@ -794,11 +799,11 b' self: super: {'
794 };
799 };
795 };
800 };
796 "subprocess32" = super.buildPythonPackage {
801 "subprocess32" = super.buildPythonPackage {
797 name = "subprocess32-3.5.2";
802 name = "subprocess32-3.5.3";
798 doCheck = false;
803 doCheck = false;
799 src = fetchurl {
804 src = fetchurl {
800 url = "https://files.pythonhosted.org/packages/c3/5f/7117737fc7114061837a4f51670d863dd7f7f9c762a6546fa8a0dcfe61c8/subprocess32-3.5.2.tar.gz";
805 url = "https://files.pythonhosted.org/packages/be/2b/beeba583e9877e64db10b52a96915afc0feabf7144dcbf2a0d0ea68bf73d/subprocess32-3.5.3.tar.gz";
801 sha256 = "11v62shwmdys48g7ncs3a8jwwnkcl8d4zcwy6dk73z1zy2f9hazb";
806 sha256 = "1hr5fan8i719hmlmz73hf8rhq74014w07d8ryg7krvvf6692kj3b";
802 };
807 };
803 meta = {
808 meta = {
804 license = [ pkgs.lib.licenses.psfl ];
809 license = [ pkgs.lib.licenses.psfl ];
@@ -855,11 +860,11 b' self: super: {'
855 };
860 };
856 };
861 };
857 "venusian" = super.buildPythonPackage {
862 "venusian" = super.buildPythonPackage {
858 name = "venusian-1.1.0";
863 name = "venusian-1.2.0";
859 doCheck = false;
864 doCheck = false;
860 src = fetchurl {
865 src = fetchurl {
861 url = "https://files.pythonhosted.org/packages/38/24/b4b470ab9e0a2e2e9b9030c7735828c8934b4c6b45befd1bb713ec2aeb2d/venusian-1.1.0.tar.gz";
866 url = "https://files.pythonhosted.org/packages/7e/6f/40a9d43ac77cb51cb62be5b5662d170f43f8037bdc4eab56336c4ca92bb7/venusian-1.2.0.tar.gz";
862 sha256 = "0zapz131686qm0gazwy8bh11vr57pr89jbwbl50s528sqy9f80lr";
867 sha256 = "0ghyx66g8ikx9nx1mnwqvdcqm11i1vlq0hnvwl50s48bp22q5v34";
863 };
868 };
864 meta = {
869 meta = {
865 license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
870 license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
@@ -888,18 +893,18 b' self: super: {'
888 };
893 };
889 };
894 };
890 "webob" = super.buildPythonPackage {
895 "webob" = super.buildPythonPackage {
891 name = "webob-1.7.4";
896 name = "webob-1.8.4";
892 doCheck = false;
897 doCheck = false;
893 src = fetchurl {
898 src = fetchurl {
894 url = "https://files.pythonhosted.org/packages/75/34/731e23f52371852dfe7490a61644826ba7fe70fd52a377aaca0f4956ba7f/WebOb-1.7.4.tar.gz";
899 url = "https://files.pythonhosted.org/packages/e4/6c/99e322c3d4cc11d9060a67a9bf2f7c9c581f40988c11fffe89bb8c36bc5e/WebOb-1.8.4.tar.gz";
895 sha256 = "1na01ljg04z40il7vcrn8g29vaw7nvg1xvhk64cr4jys5wcay44d";
900 sha256 = "16cfg5y4n6sihz59vsmns2yqbfm0gfsn3l5xgz2g0pdhilaib0x4";
896 };
901 };
897 meta = {
902 meta = {
898 license = [ pkgs.lib.licenses.mit ];
903 license = [ pkgs.lib.licenses.mit ];
899 };
904 };
900 };
905 };
901 "webtest" = super.buildPythonPackage {
906 "webtest" = super.buildPythonPackage {
902 name = "webtest-2.0.29";
907 name = "webtest-2.0.32";
903 doCheck = false;
908 doCheck = false;
904 propagatedBuildInputs = [
909 propagatedBuildInputs = [
905 self."six"
910 self."six"
@@ -908,8 +913,8 b' self: super: {'
908 self."beautifulsoup4"
913 self."beautifulsoup4"
909 ];
914 ];
910 src = fetchurl {
915 src = fetchurl {
911 url = "https://files.pythonhosted.org/packages/94/de/8f94738be649997da99c47b104aa3c3984ecec51a1d8153ed09638253d56/WebTest-2.0.29.tar.gz";
916 url = "https://files.pythonhosted.org/packages/27/9f/9e74449d272ffbef4fb3012e6dbc53c0b24822d545e7a33a342f80131e59/WebTest-2.0.32.tar.gz";
912 sha256 = "0bcj1ica5lnmj5zbvk46x28kgphcsgh7sfnwjmn0cr94mhawrg6v";
917 sha256 = "0qp0nnbazzm4ibjiyqfcn6f230svk09i4g58zg2i9x1ga06h48a2";
913 };
918 };
914 meta = {
919 meta = {
915 license = [ pkgs.lib.licenses.mit ];
920 license = [ pkgs.lib.licenses.mit ];
@@ -1,12 +1,20 b''
1 # This file defines how to "build" for packaging.
1 # This file defines how to "build" for packaging.
2
2
3 { doCheck ? true
3 { pkgs ? import <nixpkgs> {}
4 , system ? builtins.currentSystem
5 , doCheck ? false
4 }:
6 }:
5
7
6 let
8 let
7 vcsserver = import ./default.nix {
9 vcsserver = import ./default.nix {
8 inherit
10 inherit
9 doCheck;
11 doCheck
12 system;
13
14 # disable checkPhase for build
15 checkPhase = ''
16 '';
17
10 };
18 };
11
19
12 in {
20 in {
@@ -4,37 +4,38 b''
4 https://code.rhodecode.com/upstream/configobj/archive/a11ff0a0bd4fbda9e3a91267e720f88329efb4a6.tar.gz?md5=9916c524ea11a6c418217af6b28d4b3c#egg=configobj==5.0.6
4 https://code.rhodecode.com/upstream/configobj/archive/a11ff0a0bd4fbda9e3a91267e720f88329efb4a6.tar.gz?md5=9916c524ea11a6c418217af6b28d4b3c#egg=configobj==5.0.6
5 atomicwrites==1.2.1
5 atomicwrites==1.2.1
6 attrs==18.2.0
6 attrs==18.2.0
7 dogpile.cache==0.6.7
7 dogpile.cache==0.7.1
8 dogpile.core==0.4.1
8 dogpile.core==0.4.1
9 decorator==4.1.2
9 decorator==4.1.2
10 dulwich==0.13.0
10 dulwich==0.13.0
11 hgsubversion==1.9.3
11 hgsubversion==1.9.3
12 hg-evolve==8.0.1
12 hg-evolve==8.0.1
13 mako==1.0.7
13 mako==1.0.7
14 markupsafe==1.0.0
14 markupsafe==1.1.0
15 mercurial==4.6.2
15 mercurial==4.6.2
16 msgpack-python==0.5.6
16 msgpack-python==0.5.6
17
17
18 pastedeploy==1.5.2
18 pastedeploy==2.0.1
19 psutil==5.4.7
19 psutil==5.4.8
20 pyramid==1.9.2
20 pyramid==1.10.1
21 pyramid-mako==1.0.2
21 pyramid-mako==1.0.2
22
22
23 pygments==2.3.0
23 pygments==2.3.1
24 pathlib2==2.3.2
24 pathlib2==2.3.3
25 repoze.lru==0.7
25 repoze.lru==0.7
26 simplejson==3.11.1
26 simplejson==3.16.0
27 subprocess32==3.5.2
27 subprocess32==3.5.3
28 subvertpy==0.10.1
28 subvertpy==0.10.1
29
29
30 six==1.11.0
30 six==1.11.0
31 translationstring==1.3
31 translationstring==1.3
32 webob==1.7.4
32 webob==1.8.4
33 zope.deprecation==4.3.0
33 zope.deprecation==4.3.0
34 zope.interface==4.5.0
34 zope.interface==4.5.0
35 venusian==1.2.0
35
36
36 ## http servers
37 ## http servers
37 gevent==1.3.7
38 gevent==1.4.0
38 greenlet==0.4.15
39 greenlet==0.4.15
39 gunicorn==19.9.0
40 gunicorn==19.9.0
40 waitress==1.1.0
41 waitress==1.1.0
@@ -9,6 +9,8 b' pytest-timeout==1.3.2'
9 gprof2dot==2017.9.19
9 gprof2dot==2017.9.19
10
10
11 mock==1.0.1
11 mock==1.0.1
12 webtest==2.0.29
13 cov-core==1.15.0
12 cov-core==1.15.0
14 coverage==4.5.1
13 coverage==4.5.1
14
15 webtest==2.0.32
16 beautifulsoup4==4.6.3
@@ -1,6 +1,6 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # RhodeCode VCSServer provides access to different vcs backends via network.
3 # Copyright (C) 2014-2017 RodeCode GmbH
3 # Copyright (C) 2014-2019 RodeCode GmbH
4 #
4 #
5 # This program is free software; you can redistribute it and/or modify
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
6 # it under the terms of the GNU General Public License as published by
@@ -1,1 +1,1 b''
1 4.15.2 No newline at end of file
1 4.16.0 No newline at end of file
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -84,8 +84,11 b' def raise_from_original(new_type):'
84 Raise a new exception type with original args and traceback.
84 Raise a new exception type with original args and traceback.
85 """
85 """
86 exc_type, exc_value, exc_traceback = sys.exc_info()
86 exc_type, exc_value, exc_traceback = sys.exc_info()
87 new_exc = new_type(*exc_value.args)
88 # store the original traceback into the new exc
89 new_exc._org_exc_tb = traceback.format_exc(exc_traceback)
87
90
88 try:
91 try:
89 raise new_type(*exc_value.args), None, exc_traceback
92 raise new_exc, None, exc_traceback
90 finally:
93 finally:
91 del exc_traceback
94 del exc_traceback
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -37,6 +37,7 b' def _make_exception(kind, org_exc, *args'
37 exc = Exception(*args)
37 exc = Exception(*args)
38 exc._vcs_kind = kind
38 exc._vcs_kind = kind
39 exc._org_exc = org_exc
39 exc._org_exc = org_exc
40 exc._org_exc_tb = ''
40 return exc
41 return exc
41
42
42
43
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 b' import urllib'
25 import urllib2
25 import urllib2
26 from functools import wraps
26 from functools import wraps
27
27
28 import more_itertools
28 from dulwich import index, objects
29 from dulwich import index, objects
29 from dulwich.client import HttpGitClient, LocalGitClient
30 from dulwich.client import HttpGitClient, LocalGitClient
30 from dulwich.errors import (
31 from dulwich.errors import (
@@ -118,6 +119,15 b' class GitRemote(object):'
118 repo = self._factory.repo(wire)
119 repo = self._factory.repo(wire)
119 repo[ref] = commit_id
120 repo[ref] = commit_id
120
121
122 def _remote_conf(self, config):
123 params = [
124 '-c', 'core.askpass=""',
125 ]
126 ssl_cert_dir = config.get('vcs_ssl_dir')
127 if ssl_cert_dir:
128 params.extend(['-c', 'http.sslCAinfo={}'.format(ssl_cert_dir)])
129 return params
130
121 @reraise_safe_exceptions
131 @reraise_safe_exceptions
122 def add_object(self, wire, content):
132 def add_object(self, wire, content):
123 repo = self._factory.repo(wire)
133 repo = self._factory.repo(wire)
@@ -456,11 +466,11 b' class GitRemote(object):'
456 repo = self._factory.repo(wire)
466 repo = self._factory.repo(wire)
457 if refs and not isinstance(refs, (list, tuple)):
467 if refs and not isinstance(refs, (list, tuple)):
458 refs = [refs]
468 refs = [refs]
459
469 config = self._wire_to_config(wire)
460 # get all remote refs we'll use to fetch later
470 # get all remote refs we'll use to fetch later
461 output, __ = self.run_git_command(
471 output, __ = self.run_git_command(
462 wire, ['ls-remote', url], fail_on_stderr=False,
472 wire, ['ls-remote', url], fail_on_stderr=False,
463 _copts=['-c', 'core.askpass=""'],
473 _copts=self._remote_conf(config),
464 extra_env={'GIT_TERMINAL_PROMPT': '0'})
474 extra_env={'GIT_TERMINAL_PROMPT': '0'})
465
475
466 remote_refs = collections.OrderedDict()
476 remote_refs = collections.OrderedDict()
@@ -486,12 +496,15 b' class GitRemote(object):'
486 fetch_refs.append('{}:{}'.format(ref, ref))
496 fetch_refs.append('{}:{}'.format(ref, ref))
487 elif not refs:
497 elif not refs:
488 fetch_refs.append('{}:{}'.format(ref, ref))
498 fetch_refs.append('{}:{}'.format(ref, ref))
489
499 log.debug('Finished obtaining fetch refs, total: %s', len(fetch_refs))
490 if fetch_refs:
500 if fetch_refs:
501 for chunk in more_itertools.chunked(fetch_refs, 1024 * 4):
502 fetch_refs_chunks = list(chunk)
503 log.debug('Fetching %s refs from import url', len(fetch_refs_chunks))
491 _out, _err = self.run_git_command(
504 _out, _err = self.run_git_command(
492 wire, ['fetch', url, '--force', '--prune', '--'] + fetch_refs,
505 wire, ['fetch', url, '--force', '--prune', '--'] + fetch_refs_chunks,
493 fail_on_stderr=False,
506 fail_on_stderr=False,
494 _copts=['-c', 'core.askpass=""'],
507 _copts=self._remote_conf(config),
495 extra_env={'GIT_TERMINAL_PROMPT': '0'})
508 extra_env={'GIT_TERMINAL_PROMPT': '0'})
496
509
497 return remote_refs
510 return remote_refs
@@ -500,11 +513,11 b' class GitRemote(object):'
500 def sync_push(self, wire, url, refs=None):
513 def sync_push(self, wire, url, refs=None):
501 if not self.check_url(url, wire):
514 if not self.check_url(url, wire):
502 return
515 return
503
516 config = self._wire_to_config(wire)
504 repo = self._factory.repo(wire)
517 repo = self._factory.repo(wire)
505 self.run_git_command(
518 self.run_git_command(
506 wire, ['push', url, '--mirror'], fail_on_stderr=False,
519 wire, ['push', url, '--mirror'], fail_on_stderr=False,
507 _copts=['-c', 'core.askpass=""'],
520 _copts=self._remote_conf(config),
508 extra_env={'GIT_TERMINAL_PROMPT': '0'})
521 extra_env={'GIT_TERMINAL_PROMPT': '0'})
509
522
510 @reraise_safe_exceptions
523 @reraise_safe_exceptions
@@ -711,6 +724,16 b' class GitRemote(object):'
711 repo = self._factory.repo(wire)
724 repo = self._factory.repo(wire)
712 return install_git_hooks(repo.path, repo.bare, force_create=force)
725 return install_git_hooks(repo.path, repo.bare, force_create=force)
713
726
727 @reraise_safe_exceptions
728 def get_hooks_info(self, wire):
729 from vcsserver.hook_utils import (
730 get_git_pre_hook_version, get_git_post_hook_version)
731 repo = self._factory.repo(wire)
732 return {
733 'pre_version': get_git_pre_hook_version(repo.path, repo.bare),
734 'post_version': get_git_post_hook_version(repo.path, repo.bare),
735 }
736
714
737
715 def str_to_dulwich(value):
738 def str_to_dulwich(value):
716 """
739 """
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -27,6 +27,7 b' from mercurial import commands'
27 from mercurial import unionrepo
27 from mercurial import unionrepo
28 from mercurial import verify
28 from mercurial import verify
29
29
30 import vcsserver
30 from vcsserver import exceptions
31 from vcsserver import exceptions
31 from vcsserver.base import RepoFactory, obfuscate_qs, raise_from_original
32 from vcsserver.base import RepoFactory, obfuscate_qs, raise_from_original
32 from vcsserver.hgcompat import (
33 from vcsserver.hgcompat import (
@@ -793,3 +794,10 b' class HgRemote(object):'
793 def install_hooks(self, wire, force=False):
794 def install_hooks(self, wire, force=False):
794 # we don't need any special hooks for Mercurial
795 # we don't need any special hooks for Mercurial
795 pass
796 pass
797
798 @reraise_safe_exceptions
799 def get_hooks_info(self, wire):
800 return {
801 'pre_version': vcsserver.__version__,
802 'post_version': vcsserver.__version__,
803 }
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 b' def _dynamic_capabilities_wrapper(lfprot'
63 def patch_subrepo_type_mapping():
63 def patch_subrepo_type_mapping():
64 from collections import defaultdict
64 from collections import defaultdict
65 from hgcompat import subrepo
65 from hgcompat import subrepo
66 from exceptions import SubrepoMergeException
66 from vcsserver.exceptions import SubrepoMergeException
67
67
68 class NoOpSubrepo(subrepo.abstractsubrepo):
68 class NoOpSubrepo(subrepo.abstractsubrepo):
69
69
@@ -1,7 +1,7 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2
2
3 # RhodeCode VCSServer provides access to different vcs backends via network.
3 # RhodeCode VCSServer provides access to different vcs backends via network.
4 # Copyright (C) 2014-2018 RhodeCode GmbH
4 # Copyright (C) 2014-2019 RhodeCode GmbH
5 #
5 #
6 # This program is free software; you can redistribute it and/or modify
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
7 # it under the terms of the GNU General Public License as published by
@@ -29,6 +29,14 b' import vcsserver'
29 log = logging.getLogger(__name__)
29 log = logging.getLogger(__name__)
30
30
31
31
32 def get_git_hooks_path(repo_path, bare):
33 hooks_path = os.path.join(repo_path, 'hooks')
34 if not bare:
35 hooks_path = os.path.join(repo_path, '.git', 'hooks')
36
37 return hooks_path
38
39
32 def install_git_hooks(repo_path, bare, executable=None, force_create=False):
40 def install_git_hooks(repo_path, bare, executable=None, force_create=False):
33 """
41 """
34 Creates a RhodeCode hook inside a git repository
42 Creates a RhodeCode hook inside a git repository
@@ -38,9 +46,8 b' def install_git_hooks(repo_path, bare, e'
38 :param force_create: Create even if same name hook exists
46 :param force_create: Create even if same name hook exists
39 """
47 """
40 executable = executable or sys.executable
48 executable = executable or sys.executable
41 hooks_path = os.path.join(repo_path, 'hooks')
49 hooks_path = get_git_hooks_path(repo_path, bare)
42 if not bare:
50
43 hooks_path = os.path.join(repo_path, '.git', 'hooks')
44 if not os.path.isdir(hooks_path):
51 if not os.path.isdir(hooks_path):
45 os.makedirs(hooks_path, mode=0o777)
52 os.makedirs(hooks_path, mode=0o777)
46
53
@@ -78,6 +85,12 b' def install_git_hooks(repo_path, bare, e'
78 return True
85 return True
79
86
80
87
88 def get_svn_hooks_path(repo_path):
89 hooks_path = os.path.join(repo_path, 'hooks')
90
91 return hooks_path
92
93
81 def install_svn_hooks(repo_path, executable=None, force_create=False):
94 def install_svn_hooks(repo_path, executable=None, force_create=False):
82 """
95 """
83 Creates RhodeCode hooks inside a svn repository
96 Creates RhodeCode hooks inside a svn repository
@@ -87,7 +100,7 b' def install_svn_hooks(repo_path, executa'
87 :param force_create: Create even if same name hook exists
100 :param force_create: Create even if same name hook exists
88 """
101 """
89 executable = executable or sys.executable
102 executable = executable or sys.executable
90 hooks_path = os.path.join(repo_path, 'hooks')
103 hooks_path = get_svn_hooks_path(repo_path)
91 if not os.path.isdir(hooks_path):
104 if not os.path.isdir(hooks_path):
92 os.makedirs(hooks_path, mode=0o777)
105 os.makedirs(hooks_path, mode=0o777)
93
106
@@ -127,6 +140,19 b' def install_svn_hooks(repo_path, executa'
127 return True
140 return True
128
141
129
142
143 def get_version_from_hook(hook_path):
144 version = ''
145 hook_content = read_hook_content(hook_path)
146 matches = re.search(r'(?:RC_HOOK_VER)\s*=\s*(.*)', hook_content)
147 if matches:
148 try:
149 version = matches.groups()[0]
150 log.debug('got version %s from hooks.', version)
151 except Exception:
152 log.exception("Exception while reading the hook version.")
153 return version.replace("'", "")
154
155
130 def check_rhodecode_hook(hook_path):
156 def check_rhodecode_hook(hook_path):
131 """
157 """
132 Check if the hook was created by RhodeCode
158 Check if the hook was created by RhodeCode
@@ -134,16 +160,11 b' def check_rhodecode_hook(hook_path):'
134 if not os.path.exists(hook_path):
160 if not os.path.exists(hook_path):
135 return True
161 return True
136
162
137 log.debug('hook exists, checking if it is from rhodecode')
163 log.debug('hook exists, checking if it is from RhodeCode')
138 hook_content = read_hook_content(hook_path)
164
139 matches = re.search(r'(?:RC_HOOK_VER)\s*=\s*(.*)', hook_content)
165 version = get_version_from_hook(hook_path)
140 if matches:
166 if version:
141 try:
142 version = matches.groups()[0]
143 log.debug('got version %s from hooks.', version)
144 return True
167 return True
145 except Exception:
146 log.exception("Exception while reading the hook version.")
147
168
148 return False
169 return False
149
170
@@ -152,3 +173,31 b' def read_hook_content(hook_path):'
152 with open(hook_path, 'rb') as f:
173 with open(hook_path, 'rb') as f:
153 content = f.read()
174 content = f.read()
154 return content
175 return content
176
177
178 def get_git_pre_hook_version(repo_path, bare):
179 hooks_path = get_git_hooks_path(repo_path, bare)
180 _hook_file = os.path.join(hooks_path, 'pre-receive')
181 version = get_version_from_hook(_hook_file)
182 return version
183
184
185 def get_git_post_hook_version(repo_path, bare):
186 hooks_path = get_git_hooks_path(repo_path, bare)
187 _hook_file = os.path.join(hooks_path, 'post-receive')
188 version = get_version_from_hook(_hook_file)
189 return version
190
191
192 def get_svn_pre_hook_version(repo_path):
193 hooks_path = get_svn_hooks_path(repo_path)
194 _hook_file = os.path.join(hooks_path, 'pre-commit')
195 version = get_version_from_hook(_hook_file)
196 return version
197
198
199 def get_svn_post_hook_version(repo_path):
200 hooks_path = get_svn_hooks_path(repo_path)
201 _hook_file = os.path.join(hooks_path, 'post-commit')
202 version = get_version_from_hook(_hook_file)
203 return version
@@ -1,7 +1,7 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2
2
3 # RhodeCode VCSServer provides access to different vcs backends via network.
3 # RhodeCode VCSServer provides access to different vcs backends via network.
4 # Copyright (C) 2014-2018 RhodeCode GmbH
4 # Copyright (C) 2014-2019 RhodeCode GmbH
5 #
5 #
6 # This program is free software; you can redistribute it and/or modify
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
7 # it under the terms of the GNU General Public License as published by
@@ -511,15 +511,14 b' def git_pre_receive(unused_repo_path, re'
511
511
512 type_ = push_ref['type']
512 type_ = push_ref['type']
513 new_branch = push_ref['old_rev'] == empty_commit_id
513 new_branch = push_ref['old_rev'] == empty_commit_id
514 if type_ == 'heads' and not new_branch:
514 delete_branch = push_ref['new_rev'] == empty_commit_id
515 if type_ == 'heads' and not (new_branch or delete_branch):
515 old_rev = push_ref['old_rev']
516 old_rev = push_ref['old_rev']
516 new_rev = push_ref['new_rev']
517 new_rev = push_ref['new_rev']
517 cmd = [settings.GIT_EXECUTABLE, 'rev-list',
518 cmd = [settings.GIT_EXECUTABLE, 'rev-list', old_rev, '^{}'.format(new_rev)]
518 old_rev, '^{}'.format(new_rev)]
519 stdout, stderr = subprocessio.run_command(
519 stdout, stderr = subprocessio.run_command(
520 cmd, env=os.environ.copy())
520 cmd, env=os.environ.copy())
521 # means we're having some non-reachable objects, this forced push
521 # means we're having some non-reachable objects, this forced push was used
522 # was used
523 if stdout:
522 if stdout:
524 push_ref['pruned_sha'] = stdout.splitlines()
523 push_ref['pruned_sha'] = stdout.splitlines()
525
524
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -362,8 +362,10 b' class HTTPApplication(object):'
362
362
363 org_exc = getattr(e, '_org_exc', None)
363 org_exc = getattr(e, '_org_exc', None)
364 org_exc_name = None
364 org_exc_name = None
365 org_exc_tb = ''
365 if org_exc:
366 if org_exc:
366 org_exc_name = org_exc.__class__.__name__
367 org_exc_name = org_exc.__class__.__name__
368 org_exc_tb = getattr(e, '_org_exc_tb', '')
367 # replace our "faked" exception with our org
369 # replace our "faked" exception with our org
368 exc_info[0] = org_exc.__class__
370 exc_info[0] = org_exc.__class__
369 exc_info[1] = org_exc
371 exc_info[1] = org_exc
@@ -383,6 +385,7 b' class HTTPApplication(object):'
383 'message': e.message,
385 'message': e.message,
384 'traceback': tb_info,
386 'traceback': tb_info,
385 'org_exc': org_exc_name,
387 'org_exc': org_exc_name,
388 'org_exc_tb': org_exc_tb,
386 'type': type_
389 'type': type_
387 }
390 }
388 }
391 }
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,7 +1,7 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2
2
3 # RhodeCode VCSServer provides access to different vcs backends via network.
3 # RhodeCode VCSServer provides access to different vcs backends via network.
4 # Copyright (C) 2014-2018 RhodeCode GmbH
4 # Copyright (C) 2014-2019 RhodeCode GmbH
5 #
5 #
6 # This program is free software; you can redistribute it and/or modify
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
7 # it under the terms of the GNU General Public License as published by
@@ -1,7 +1,7 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2
2
3 # RhodeCode VCSServer provides access to different vcs backends via network.
3 # RhodeCode VCSServer provides access to different vcs backends via network.
4 # Copyright (C) 2014-2018 RhodeCode GmbH
4 # Copyright (C) 2014-2019 RhodeCode GmbH
5 #
5 #
6 # This program is free software; you can redistribute it and/or modify
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
7 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -66,6 +66,7 b' class StreamFeeder(Thread):'
66
66
67 def run(self):
67 def run(self):
68 t = self.writeiface
68 t = self.writeiface
69 try:
69 if self.bytes:
70 if self.bytes:
70 os.write(t, self.bytes)
71 os.write(t, self.bytes)
71 else:
72 else:
@@ -74,6 +75,7 b' class StreamFeeder(Thread):'
74 while b:
75 while b:
75 os.write(t, b)
76 os.write(t, b)
76 b = s.read(4096)
77 b = s.read(4096)
78 finally:
77 os.close(t)
79 os.close(t)
78
80
79 @property
81 @property
@@ -436,6 +438,7 b' class SubprocessIOChunker(object):'
436 self.process = _p
438 self.process = _p
437 self.output = bg_out
439 self.output = bg_out
438 self.error = bg_err
440 self.error = bg_err
441 self.inputstream = inputstream
439
442
440 def __iter__(self):
443 def __iter__(self):
441 return self
444 return self
@@ -484,6 +487,10 b' class SubprocessIOChunker(object):'
484 self.error.close()
487 self.error.close()
485 except:
488 except:
486 pass
489 pass
490 try:
491 os.close(self.inputstream)
492 except:
493 pass
487
494
488 def __del__(self):
495 def __del__(self):
489 self.close()
496 self.close()
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -458,6 +458,16 b' class SvnRemote(object):'
458 return install_svn_hooks(
458 return install_svn_hooks(
459 repo_path, executable=executable, force_create=force)
459 repo_path, executable=executable, force_create=force)
460
460
461 @reraise_safe_exceptions
462 def get_hooks_info(self, wire):
463 from vcsserver.hook_utils import (
464 get_svn_pre_hook_version, get_svn_post_hook_version)
465 repo_path = wire['path']
466 return {
467 'pre_version': get_svn_pre_hook_version(repo_path),
468 'post_version': get_svn_post_hook_version(repo_path),
469 }
470
461
471
462 class SvnDiffer(object):
472 class SvnDiffer(object):
463 """
473 """
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -24,6 +24,29 b' import pytest'
24 from vcsserver import subprocessio
24 from vcsserver import subprocessio
25
25
26
26
27 class KindaFilelike(object): # pragma: no cover
28
29 def __init__(self, data, size):
30 chunks = size / len(data)
31
32 self.stream = self._get_stream(data, chunks)
33
34 def _get_stream(self, data, chunks):
35 for x in xrange(chunks):
36 yield data
37
38 def read(self, n):
39
40 buffer_stream = ''
41 for chunk in self.stream:
42 buffer_stream += chunk
43 if len(buffer_stream) >= n:
44 break
45
46 # self.stream = self.bytes[n:]
47 return buffer_stream
48
49
27 @pytest.fixture(scope='module')
50 @pytest.fixture(scope='module')
28 def environ():
51 def environ():
29 """Delete coverage variables, as they make the tests fail."""
52 """Delete coverage variables, as they make the tests fail."""
@@ -101,8 +124,9 b' def test_output_with_no_input_does_not_f'
101
124
102 @pytest.mark.parametrize('size', [1, 10 ** 5])
125 @pytest.mark.parametrize('size', [1, 10 ** 5])
103 def test_output_with_input(size, environ):
126 def test_output_with_input(size, environ):
104 data = 'X' * size
127 data_len = size
105 inputstream = io.BytesIO(data)
128 inputstream = KindaFilelike('X', size)
129
106 # This acts like the cat command.
130 # This acts like the cat command.
107 args = _get_python_args('shutil.copyfileobj(sys.stdin, sys.stdout)')
131 args = _get_python_args('shutil.copyfileobj(sys.stdin, sys.stdout)')
108 output = ''.join(
132 output = ''.join(
@@ -111,14 +135,14 b' def test_output_with_input(size, environ'
111 )
135 )
112 )
136 )
113
137
114 print("{} {}".format(len(data * size), len(output)))
138 assert len(output) == data_len
115 assert output == data
116
139
117
140
118 @pytest.mark.parametrize('size', [1, 10 ** 5])
141 @pytest.mark.parametrize('size', [1, 10 ** 5])
119 def test_output_with_input_skipping_iterator(size, environ):
142 def test_output_with_input_skipping_iterator(size, environ):
120 data = 'X' * size
143 data_len = size
121 inputstream = io.BytesIO(data)
144 inputstream = KindaFilelike('X', size)
145
122 # This acts like the cat command.
146 # This acts like the cat command.
123 args = _get_python_args('shutil.copyfileobj(sys.stdin, sys.stdout)')
147 args = _get_python_args('shutil.copyfileobj(sys.stdin, sys.stdout)')
124
148
@@ -128,5 +152,4 b' def test_output_with_input_skipping_iter'
128 )
152 )
129 output = ''.join(chunker.output)
153 output = ''.join(chunker.output)
130
154
131 print("{} {}".format(len(data * size), len(output)))
155 assert len(output) == data_len
132 assert output == data
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
@@ -1,5 +1,5 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2018 RhodeCode GmbH
2 # Copyright (C) 2014-2019 RhodeCode GmbH
3 #
3 #
4 # This program is free software; you can redistribute it and/or modify
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
5 # it under the terms of the GNU General Public License as published by
General Comments 0
You need to be logged in to leave comments. Login now