##// END OF EJS Templates
release: Merge default into stable for release preparation
marcink -
r702:778db25c merge stable
parent child Browse files
Show More
@@ -0,0 +1,12 b''
1 # contains not directly required libraries we want to pin the version.
2
3 atomicwrites==1.2.1
4 attrs==18.2.0
5 hupper==1.6.1
6 pathlib2==2.3.4
7 pygments==2.4.2
8 psutil==5.5.1
9 pluggy==0.11.0
10 scandir==1.10.0
11 setproctitle==1.1.10
12 venusian==1.2.0
@@ -1,5 +1,5 b''
1 1 [bumpversion]
2 current_version = 4.16.2
2 current_version = 4.17.0
3 3 message = release: Bump version {current_version} to {new_version}
4 4
5 5 [bumpversion:file:vcsserver/VERSION]
@@ -5,12 +5,10 b' done = false'
5 5 done = true
6 6
7 7 [task:fixes_on_stable]
8 done = true
9 8
10 9 [task:pip2nix_generated]
11 done = true
12 10
13 11 [release]
14 state = prepared
15 version = 4.16.2
12 state = in_progress
13 version = 4.17.0
16 14
@@ -30,10 +30,12 b" loglevel = 'debug'"
30 30 # SECURITY
31 31
32 32 # The maximum size of HTTP request line in bytes.
33 limit_request_line = 4094
33 # 0 for unlimited
34 limit_request_line = 0
34 35
35 36 # Limit the number of HTTP headers fields in a request.
36 limit_request_fields = 1024
37 # By default this value is 100 and can’t be larger than 32768.
38 limit_request_fields = 10240
37 39
38 40 # Limit the allowed size of an HTTP request header field.
39 41 # Value is a positive number or 0.
@@ -1,3 +1,3 b''
1 1 [pip2nix]
2 requirements = ., -r ./requirements.txt
2 requirements = ., -r ./requirements.txt, -r ./requirements_pinned.txt
3 3 output = ./pkgs/python-packages.nix
@@ -55,8 +55,8 b' self: super: {'
55 55 self."six"
56 56 ];
57 57 src = fetchurl {
58 url = "https://code.rhodecode.com/upstream/configobj/archive/a11ff0a0bd4fbda9e3a91267e720f88329efb4a6.tar.gz?md5=9916c524ea11a6c418217af6b28d4b3c";
59 sha256 = "1hhcxirwvg58grlfr177b3awhbq8hlx1l3lh69ifl1ki7lfd1s1x";
58 url = "https://code.rhodecode.com/upstream/configobj/artifacts/download/0-012de99a-b1e1-4f64-a5c0-07a98a41b324.tar.gz?md5=6a513f51fe04b2c18cf84c1395a7c626";
59 sha256 = "0kqfrdfr14mw8yd8qwq14dv2xghpkjmd3yjsy8dfcbvpcc17xnxp";
60 60 };
61 61 meta = {
62 62 license = [ pkgs.lib.licenses.bsdOriginal ];
@@ -77,11 +77,11 b' self: super: {'
77 77 };
78 78 };
79 79 "coverage" = super.buildPythonPackage {
80 name = "coverage-4.5.1";
80 name = "coverage-4.5.3";
81 81 doCheck = false;
82 82 src = fetchurl {
83 url = "https://files.pythonhosted.org/packages/35/fe/e7df7289d717426093c68d156e0fd9117c8f4872b6588e8a8928a0f68424/coverage-4.5.1.tar.gz";
84 sha256 = "1wbrzpxka3xd4nmmkc6q0ir343d91kymwsm8pbmwa0d2a7q4ir2n";
83 url = "https://files.pythonhosted.org/packages/82/70/2280b5b29a0352519bb95ab0ef1ea942d40466ca71c53a2085bdeff7b0eb/coverage-4.5.3.tar.gz";
84 sha256 = "02f6m073qdispn96rc616hg0rnmw1pgqzw3bgxwiwza4zf9hirlx";
85 85 };
86 86 meta = {
87 87 license = [ pkgs.lib.licenses.asl20 ];
@@ -204,11 +204,11 b' self: super: {'
204 204 };
205 205 };
206 206 "hg-evolve" = super.buildPythonPackage {
207 name = "hg-evolve-8.0.1";
207 name = "hg-evolve-8.5.1";
208 208 doCheck = false;
209 209 src = fetchurl {
210 url = "https://files.pythonhosted.org/packages/06/1a/c5c12d8f117426f05285a820ee5a23121882f5381104e86276b72598934f/hg-evolve-8.0.1.tar.gz";
211 sha256 = "1brafifb42k71gl7qssb5m3ijnm7y30lfvm90z8xxcr2fgz19p29";
210 url = "https://files.pythonhosted.org/packages/e3/ce/6594aa403e3464831d4daf20e45fd2e3ef553d968ac13d2c7fa791d4eedd/hg-evolve-8.5.1.tar.gz";
211 sha256 = "09avqn7c1biz97vb1zw91q6nfzydpcqv43mgpfrj7ywp0fscfgf3";
212 212 };
213 213 meta = {
214 214 license = [ { fullName = "GPLv2+"; } ];
@@ -230,26 +230,26 b' self: super: {'
230 230 };
231 231 };
232 232 "hupper" = super.buildPythonPackage {
233 name = "hupper-1.4.2";
233 name = "hupper-1.6.1";
234 234 doCheck = false;
235 235 src = fetchurl {
236 url = "https://files.pythonhosted.org/packages/f1/75/1915dc7650b4867fa3049256e24ca8eddb5989998fcec788cf52b9812dfc/hupper-1.4.2.tar.gz";
237 sha256 = "16vb9fkiaakdpcp6pn56h3w0dwvm67bxq2k2dv4i382qhqwphdzb";
236 url = "https://files.pythonhosted.org/packages/85/d9/e005d357b11249c5d70ddf5b7adab2e4c0da4e8b0531ff146917a04fe6c0/hupper-1.6.1.tar.gz";
237 sha256 = "0d3cvkc8ssgwk54wvhbifj56ry97qi10pfzwfk8vwzzcikbfp3zy";
238 238 };
239 239 meta = {
240 240 license = [ pkgs.lib.licenses.mit ];
241 241 };
242 242 };
243 243 "ipdb" = super.buildPythonPackage {
244 name = "ipdb-0.11";
244 name = "ipdb-0.12";
245 245 doCheck = false;
246 246 propagatedBuildInputs = [
247 247 self."setuptools"
248 248 self."ipython"
249 249 ];
250 250 src = fetchurl {
251 url = "https://files.pythonhosted.org/packages/80/fe/4564de08f174f3846364b3add8426d14cebee228f741c27e702b2877e85b/ipdb-0.11.tar.gz";
252 sha256 = "02m0l8wrhhd3z7dg3czn5ys1g5pxib516hpshdzp7rxzsxgcd0bh";
251 url = "https://files.pythonhosted.org/packages/6d/43/c3c2e866a8803e196d6209595020a4a6db1a3c5d07c01455669497ae23d0/ipdb-0.12.tar.gz";
252 sha256 = "1khr2n7xfy8hg65kj1bsrjq9g7656pp0ybfa8abpbzpdawji3qnw";
253 253 };
254 254 meta = {
255 255 license = [ pkgs.lib.licenses.bsdOriginal ];
@@ -316,11 +316,11 b' self: super: {'
316 316 };
317 317 };
318 318 "mercurial" = super.buildPythonPackage {
319 name = "mercurial-4.6.2";
319 name = "mercurial-4.9.1";
320 320 doCheck = false;
321 321 src = fetchurl {
322 url = "https://files.pythonhosted.org/packages/d9/fb/c7ecf2b7fd349878dbf45b8390b8db735cef73d49dd9ce8a364b4ca3a846/mercurial-4.6.2.tar.gz";
323 sha256 = "1bv6wgcdx8glihjjfg22khhc52mclsn4kwfqvzbzlg0b42h4xl0w";
322 url = "https://files.pythonhosted.org/packages/60/58/a1c52d5f5c0b755e231faf7c4f507dc51fe26d979d36346bc9d28f4f8a75/mercurial-4.9.1.tar.gz";
323 sha256 = "0iybbkd9add066729zg01kwz5hhc1s6lhp9rrnsmzq6ihyxj3p8v";
324 324 };
325 325 meta = {
326 326 license = [ pkgs.lib.licenses.gpl1 pkgs.lib.licenses.gpl2Plus ];
@@ -374,29 +374,29 b' self: super: {'
374 374 };
375 375 };
376 376 "pathlib2" = super.buildPythonPackage {
377 name = "pathlib2-2.3.3";
377 name = "pathlib2-2.3.4";
378 378 doCheck = false;
379 379 propagatedBuildInputs = [
380 380 self."six"
381 381 self."scandir"
382 382 ];
383 383 src = fetchurl {
384 url = "https://files.pythonhosted.org/packages/bf/d7/a2568f4596b75d2c6e2b4094a7e64f620decc7887f69a1f2811931ea15b9/pathlib2-2.3.3.tar.gz";
385 sha256 = "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695";
384 url = "https://files.pythonhosted.org/packages/b5/f4/9c7cc726ece2498b6c8b62d3262aa43f59039b953fe23c9964ac5e18d40b/pathlib2-2.3.4.tar.gz";
385 sha256 = "1y0f9rkm1924zrc5dn4bwxlhgdkbml82lkcc28l5rgmr7d918q24";
386 386 };
387 387 meta = {
388 388 license = [ pkgs.lib.licenses.mit ];
389 389 };
390 390 };
391 391 "pexpect" = super.buildPythonPackage {
392 name = "pexpect-4.6.0";
392 name = "pexpect-4.7.0";
393 393 doCheck = false;
394 394 propagatedBuildInputs = [
395 395 self."ptyprocess"
396 396 ];
397 397 src = fetchurl {
398 url = "https://files.pythonhosted.org/packages/89/43/07d07654ee3e25235d8cea4164cdee0ec39d1fda8e9203156ebe403ffda4/pexpect-4.6.0.tar.gz";
399 sha256 = "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia";
398 url = "https://files.pythonhosted.org/packages/1c/b1/362a0d4235496cb42c33d1d8732b5e2c607b0129ad5fdd76f5a583b9fcb3/pexpect-4.7.0.tar.gz";
399 sha256 = "1sv2rri15zwhds85a4kamwh9pj49qcxv7m4miyr4jfpfwv81yb4y";
400 400 };
401 401 meta = {
402 402 license = [ pkgs.lib.licenses.isc { fullName = "ISC License (ISCL)"; } ];
@@ -431,52 +431,52 b' self: super: {'
431 431 };
432 432 };
433 433 "plaster-pastedeploy" = super.buildPythonPackage {
434 name = "plaster-pastedeploy-0.6";
434 name = "plaster-pastedeploy-0.7";
435 435 doCheck = false;
436 436 propagatedBuildInputs = [
437 437 self."pastedeploy"
438 438 self."plaster"
439 439 ];
440 440 src = fetchurl {
441 url = "https://files.pythonhosted.org/packages/3f/e7/6a6833158d2038ec40085433308a1e164fd1dac595513f6dd556d5669bb8/plaster_pastedeploy-0.6.tar.gz";
442 sha256 = "1bkggk18f4z2bmsmxyxabvf62znvjwbivzh880419r3ap0616cf2";
441 url = "https://files.pythonhosted.org/packages/99/69/2d3bc33091249266a1bd3cf24499e40ab31d54dffb4a7d76fe647950b98c/plaster_pastedeploy-0.7.tar.gz";
442 sha256 = "1zg7gcsvc1kzay1ry5p699rg2qavfsxqwl17mqxzr0gzw6j9679r";
443 443 };
444 444 meta = {
445 445 license = [ pkgs.lib.licenses.mit ];
446 446 };
447 447 };
448 448 "pluggy" = super.buildPythonPackage {
449 name = "pluggy-0.8.1";
449 name = "pluggy-0.11.0";
450 450 doCheck = false;
451 451 src = fetchurl {
452 url = "https://files.pythonhosted.org/packages/38/e1/83b10c17688af7b2998fa5342fec58ecbd2a5a7499f31e606ae6640b71ac/pluggy-0.8.1.tar.gz";
453 sha256 = "05l6g42p9ilmabw0hlbiyxy6gyzjri41m5l11a8dzgvi77q35p4d";
452 url = "https://files.pythonhosted.org/packages/0d/a1/862ab336e8128fde20981d2c1aa8506693412daf5083b1911d539412676b/pluggy-0.11.0.tar.gz";
453 sha256 = "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895";
454 454 };
455 455 meta = {
456 456 license = [ pkgs.lib.licenses.mit ];
457 457 };
458 458 };
459 459 "prompt-toolkit" = super.buildPythonPackage {
460 name = "prompt-toolkit-1.0.15";
460 name = "prompt-toolkit-1.0.16";
461 461 doCheck = false;
462 462 propagatedBuildInputs = [
463 463 self."six"
464 464 self."wcwidth"
465 465 ];
466 466 src = fetchurl {
467 url = "https://files.pythonhosted.org/packages/8a/ad/cf6b128866e78ad6d7f1dc5b7f99885fb813393d9860778b2984582e81b5/prompt_toolkit-1.0.15.tar.gz";
468 sha256 = "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5";
467 url = "https://files.pythonhosted.org/packages/f1/03/bb36771dc9fa7553ac4bdc639a9ecdf6fda0ff4176faf940d97e3c16e41d/prompt_toolkit-1.0.16.tar.gz";
468 sha256 = "1d65hm6nf0cbq0q0121m60zzy4s1fpg9fn761s1yxf08dridvkn1";
469 469 };
470 470 meta = {
471 471 license = [ pkgs.lib.licenses.bsdOriginal ];
472 472 };
473 473 };
474 474 "psutil" = super.buildPythonPackage {
475 name = "psutil-5.4.8";
475 name = "psutil-5.5.1";
476 476 doCheck = false;
477 477 src = fetchurl {
478 url = "https://files.pythonhosted.org/packages/e3/58/0eae6e4466e5abf779d7e2b71fac7fba5f59e00ea36ddb3ed690419ccb0f/psutil-5.4.8.tar.gz";
479 sha256 = "1hyna338sml2cl1mfb2gs89np18z27mvyhmq4ifh22x07n7mq9kf";
478 url = "https://files.pythonhosted.org/packages/c7/01/7c30b247cdc5ba29623faa5c8cf1f1bbf7e041783c340414b0ed7e067c64/psutil-5.5.1.tar.gz";
479 sha256 = "045qaqvn6k90bj5bcy259yrwcd2afgznaav3sfhphy9b8ambzkkj";
480 480 };
481 481 meta = {
482 482 license = [ pkgs.lib.licenses.bsdOriginal ];
@@ -505,18 +505,18 b' self: super: {'
505 505 };
506 506 };
507 507 "pygments" = super.buildPythonPackage {
508 name = "pygments-2.3.1";
508 name = "pygments-2.4.2";
509 509 doCheck = false;
510 510 src = fetchurl {
511 url = "https://files.pythonhosted.org/packages/64/69/413708eaf3a64a6abb8972644e0f20891a55e621c6759e2c3f3891e05d63/Pygments-2.3.1.tar.gz";
512 sha256 = "0ji87g09jph8jqcvclgb02qvxasdnr9pzvk90rl66d90yqcxmyjz";
511 url = "https://files.pythonhosted.org/packages/7e/ae/26808275fc76bf2832deb10d3a3ed3107bc4de01b85dcccbe525f2cd6d1e/Pygments-2.4.2.tar.gz";
512 sha256 = "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748";
513 513 };
514 514 meta = {
515 515 license = [ pkgs.lib.licenses.bsdOriginal ];
516 516 };
517 517 };
518 518 "pyramid" = super.buildPythonPackage {
519 name = "pyramid-1.10.1";
519 name = "pyramid-1.10.4";
520 520 doCheck = false;
521 521 propagatedBuildInputs = [
522 522 self."hupper"
@@ -531,8 +531,8 b' self: super: {'
531 531 self."repoze.lru"
532 532 ];
533 533 src = fetchurl {
534 url = "https://files.pythonhosted.org/packages/0a/3e/22e3ac9be1b70a01139adba8906ee4b8f628bb469fea3c52f6c97b73063c/pyramid-1.10.1.tar.gz";
535 sha256 = "1h5105nfh6rsrfjiyw20aavyibj36la3hajy6vh1fa77xb4y3hrp";
534 url = "https://files.pythonhosted.org/packages/c2/43/1ae701c9c6bb3a434358e678a5e72c96e8aa55cf4cb1d2fa2041b5dd38b7/pyramid-1.10.4.tar.gz";
535 sha256 = "0rkxs1ajycg2zh1c94xlmls56mx5m161sn8112skj0amza6cn36q";
536 536 };
537 537 meta = {
538 538 license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
@@ -658,7 +658,7 b' self: super: {'
658 658 };
659 659 };
660 660 "rhodecode-vcsserver" = super.buildPythonPackage {
661 name = "rhodecode-vcsserver-4.16.2";
661 name = "rhodecode-vcsserver-4.17.0";
662 662 buildInputs = [
663 663 self."pytest"
664 664 self."py"
@@ -678,8 +678,6 b' self: super: {'
678 678 doCheck = true;
679 679 propagatedBuildInputs = [
680 680 self."configobj"
681 self."atomicwrites"
682 self."attrs"
683 681 self."dogpile.cache"
684 682 self."dogpile.core"
685 683 self."decorator"
@@ -691,11 +689,8 b' self: super: {'
691 689 self."mercurial"
692 690 self."msgpack-python"
693 691 self."pastedeploy"
694 self."psutil"
695 692 self."pyramid"
696 693 self."pyramid-mako"
697 self."pygments"
698 self."pathlib2"
699 694 self."repoze.lru"
700 695 self."simplejson"
701 696 self."subprocess32"
@@ -705,12 +700,10 b' self: super: {'
705 700 self."webob"
706 701 self."zope.deprecation"
707 702 self."zope.interface"
708 self."venusian"
709 703 self."gevent"
710 704 self."greenlet"
711 705 self."gunicorn"
712 706 self."waitress"
713 self."setproctitle"
714 707 self."ipdb"
715 708 self."ipython"
716 709 self."pytest"
@@ -733,11 +726,11 b' self: super: {'
733 726 };
734 727 };
735 728 "scandir" = super.buildPythonPackage {
736 name = "scandir-1.9.0";
729 name = "scandir-1.10.0";
737 730 doCheck = false;
738 731 src = fetchurl {
739 url = "https://files.pythonhosted.org/packages/16/2a/557af1181e6b4e30254d5a6163b18f5053791ca66e251e77ab08887e8fe3/scandir-1.9.0.tar.gz";
740 sha256 = "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4";
732 url = "https://files.pythonhosted.org/packages/df/f5/9c052db7bd54d0cbf1bc0bb6554362bba1012d03e5888950a4f5c5dadc4e/scandir-1.10.0.tar.gz";
733 sha256 = "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd";
741 734 };
742 735 meta = {
743 736 license = [ pkgs.lib.licenses.bsdOriginal { fullName = "New BSD License"; } ];
@@ -755,11 +748,11 b' self: super: {'
755 748 };
756 749 };
757 750 "setuptools" = super.buildPythonPackage {
758 name = "setuptools-40.8.0";
751 name = "setuptools-41.0.1";
759 752 doCheck = false;
760 753 src = fetchurl {
761 url = "https://files.pythonhosted.org/packages/c2/f7/c7b501b783e5a74cf1768bc174ee4fb0a8a6ee5af6afa92274ff964703e0/setuptools-40.8.0.zip";
762 sha256 = "0k9hifpgahnw2a26w3cr346iy733k6d3nwh3f7g9m13y6f8fqkkf";
754 url = "https://files.pythonhosted.org/packages/1d/64/a18a487b4391a05b9c7f938b94a16d80305bf0369c6b0b9509e86165e1d3/setuptools-41.0.1.zip";
755 sha256 = "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2";
763 756 };
764 757 meta = {
765 758 license = [ pkgs.lib.licenses.mit ];
@@ -799,11 +792,11 b' self: super: {'
799 792 };
800 793 };
801 794 "subprocess32" = super.buildPythonPackage {
802 name = "subprocess32-3.5.3";
795 name = "subprocess32-3.5.4";
803 796 doCheck = false;
804 797 src = fetchurl {
805 url = "https://files.pythonhosted.org/packages/be/2b/beeba583e9877e64db10b52a96915afc0feabf7144dcbf2a0d0ea68bf73d/subprocess32-3.5.3.tar.gz";
806 sha256 = "1hr5fan8i719hmlmz73hf8rhq74014w07d8ryg7krvvf6692kj3b";
798 url = "https://files.pythonhosted.org/packages/32/c8/564be4d12629b912ea431f1a50eb8b3b9d00f1a0b1ceff17f266be190007/subprocess32-3.5.4.tar.gz";
799 sha256 = "17f7mvwx2271s1wrl0qac3wjqqnrqag866zs3qc8v5wp0k43fagb";
807 800 };
808 801 meta = {
809 802 license = [ pkgs.lib.licenses.psfl ];
@@ -871,11 +864,11 b' self: super: {'
871 864 };
872 865 };
873 866 "waitress" = super.buildPythonPackage {
874 name = "waitress-1.1.0";
867 name = "waitress-1.3.0";
875 868 doCheck = false;
876 869 src = fetchurl {
877 url = "https://files.pythonhosted.org/packages/3c/68/1c10dd5c556872ceebe88483b0436140048d39de83a84a06a8baa8136f4f/waitress-1.1.0.tar.gz";
878 sha256 = "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k";
870 url = "https://files.pythonhosted.org/packages/43/50/9890471320d5ad22761ae46661cf745f487b1c8c4ec49352b99e1078b970/waitress-1.3.0.tar.gz";
871 sha256 = "09j5dzbbcxib7vdskhx39s1qsydlr4n2p2png71d7mjnr9pnwajf";
879 872 };
880 873 meta = {
881 874 license = [ pkgs.lib.licenses.zpl21 ];
@@ -893,18 +886,18 b' self: super: {'
893 886 };
894 887 };
895 888 "webob" = super.buildPythonPackage {
896 name = "webob-1.8.4";
889 name = "webob-1.8.5";
897 890 doCheck = false;
898 891 src = fetchurl {
899 url = "https://files.pythonhosted.org/packages/e4/6c/99e322c3d4cc11d9060a67a9bf2f7c9c581f40988c11fffe89bb8c36bc5e/WebOb-1.8.4.tar.gz";
900 sha256 = "16cfg5y4n6sihz59vsmns2yqbfm0gfsn3l5xgz2g0pdhilaib0x4";
892 url = "https://files.pythonhosted.org/packages/9d/1a/0c89c070ee2829c934cb6c7082287c822e28236a4fcf90063e6be7c35532/WebOb-1.8.5.tar.gz";
893 sha256 = "11khpzaxc88q31v25ic330gsf56fwmbdc9b30br8mvp0fmwspah5";
901 894 };
902 895 meta = {
903 896 license = [ pkgs.lib.licenses.mit ];
904 897 };
905 898 };
906 899 "webtest" = super.buildPythonPackage {
907 name = "webtest-2.0.32";
900 name = "webtest-2.0.33";
908 901 doCheck = false;
909 902 propagatedBuildInputs = [
910 903 self."six"
@@ -913,36 +906,36 b' self: super: {'
913 906 self."beautifulsoup4"
914 907 ];
915 908 src = fetchurl {
916 url = "https://files.pythonhosted.org/packages/27/9f/9e74449d272ffbef4fb3012e6dbc53c0b24822d545e7a33a342f80131e59/WebTest-2.0.32.tar.gz";
917 sha256 = "0qp0nnbazzm4ibjiyqfcn6f230svk09i4g58zg2i9x1ga06h48a2";
909 url = "https://files.pythonhosted.org/packages/a8/b0/ffc9413b637dbe26e291429bb0f6ed731e518d0cd03da28524a8fe2e8a8f/WebTest-2.0.33.tar.gz";
910 sha256 = "1l3z0cwqslsf4rcrhi2gr8kdfh74wn2dw76376i4g9i38gz8wd21";
918 911 };
919 912 meta = {
920 913 license = [ pkgs.lib.licenses.mit ];
921 914 };
922 915 };
923 916 "zope.deprecation" = super.buildPythonPackage {
924 name = "zope.deprecation-4.3.0";
917 name = "zope.deprecation-4.4.0";
925 918 doCheck = false;
926 919 propagatedBuildInputs = [
927 920 self."setuptools"
928 921 ];
929 922 src = fetchurl {
930 url = "https://files.pythonhosted.org/packages/a1/18/2dc5e6bfe64fdc3b79411b67464c55bb0b43b127051a20f7f492ab767758/zope.deprecation-4.3.0.tar.gz";
931 sha256 = "095jas41wbxgmw95kwdxqhbc3bgihw2hzj9b3qpdg85apcsf2lkx";
923 url = "https://files.pythonhosted.org/packages/34/da/46e92d32d545dd067b9436279d84c339e8b16de2ca393d7b892bc1e1e9fd/zope.deprecation-4.4.0.tar.gz";
924 sha256 = "1pz2cv7gv9y1r3m0bdv7ks1alagmrn5msm5spwdzkb2by0w36i8d";
932 925 };
933 926 meta = {
934 927 license = [ pkgs.lib.licenses.zpl21 ];
935 928 };
936 929 };
937 930 "zope.interface" = super.buildPythonPackage {
938 name = "zope.interface-4.5.0";
931 name = "zope.interface-4.6.0";
939 932 doCheck = false;
940 933 propagatedBuildInputs = [
941 934 self."setuptools"
942 935 ];
943 936 src = fetchurl {
944 url = "https://files.pythonhosted.org/packages/ac/8a/657532df378c2cd2a1fe6b12be3b4097521570769d4852ec02c24bd3594e/zope.interface-4.5.0.tar.gz";
945 sha256 = "0k67m60ij06wkg82n15qgyn96waf4pmrkhv0njpkfzpmv5q89hsp";
937 url = "https://files.pythonhosted.org/packages/4e/d0/c9d16bd5b38de44a20c6dc5d5ed80a49626fafcb3db9f9efdc2a19026db6/zope.interface-4.6.0.tar.gz";
938 sha256 = "1rgh2x3rcl9r0v0499kf78xy86rnmanajf4ywmqb943wpk50sg8v";
946 939 };
947 940 meta = {
948 941 license = [ pkgs.lib.licenses.zpl21 ];
@@ -1,48 +1,42 b''
1 1 ## dependencies
2 2
3 3 # our custom configobj
4 https://code.rhodecode.com/upstream/configobj/archive/a11ff0a0bd4fbda9e3a91267e720f88329efb4a6.tar.gz?md5=9916c524ea11a6c418217af6b28d4b3c#egg=configobj==5.0.6
5 atomicwrites==1.2.1
6 attrs==18.2.0
4 https://code.rhodecode.com/upstream/configobj/artifacts/download/0-012de99a-b1e1-4f64-a5c0-07a98a41b324.tar.gz?md5=6a513f51fe04b2c18cf84c1395a7c626#egg=configobj==5.0.6
5
7 6 dogpile.cache==0.7.1
8 7 dogpile.core==0.4.1
9 8 decorator==4.1.2
10 9 dulwich==0.13.0
11 10 hgsubversion==1.9.3
12 hg-evolve==8.0.1
11 hg-evolve==8.5.1
13 12 mako==1.0.7
14 13 markupsafe==1.1.0
15 mercurial==4.6.2
14 mercurial==4.9.1
16 15 msgpack-python==0.5.6
17 16
18 17 pastedeploy==2.0.1
19 psutil==5.4.8
20 pyramid==1.10.1
18 pyramid==1.10.4
21 19 pyramid-mako==1.0.2
22 20
23 pygments==2.3.1
24 pathlib2==2.3.3
25 21 repoze.lru==0.7
26 22 simplejson==3.16.0
27 subprocess32==3.5.3
23 subprocess32==3.5.4
28 24 subvertpy==0.10.1
29 25
30 26 six==1.11.0
31 27 translationstring==1.3
32 webob==1.8.4
33 zope.deprecation==4.3.0
34 zope.interface==4.5.0
35 venusian==1.2.0
28 webob==1.8.5
29 zope.deprecation==4.4.0
30 zope.interface==4.6.0
36 31
37 32 ## http servers
38 33 gevent==1.4.0
39 34 greenlet==0.4.15
40 35 gunicorn==19.9.0
41 waitress==1.1.0
42 setproctitle==1.1.10
36 waitress==1.3.0
43 37
44 38 ## debug
45 ipdb==0.11.0
39 ipdb==0.12.0
46 40 ipython==5.1.0
47 41
48 42 ## test related requirements
@@ -10,7 +10,7 b' gprof2dot==2017.9.19'
10 10
11 11 mock==1.0.1
12 12 cov-core==1.15.0
13 coverage==4.5.1
13 coverage==4.5.3
14 14
15 webtest==2.0.32
15 webtest==2.0.33
16 16 beautifulsoup4==4.6.3
@@ -1,1 +1,1 b''
1 4.16.2 No newline at end of file
1 4.17.0 No newline at end of file
@@ -37,7 +37,7 b' def _make_exception(kind, org_exc, *args'
37 37 exc = Exception(*args)
38 38 exc._vcs_kind = kind
39 39 exc._org_exc = org_exc
40 exc._org_exc_tb = ''
40 exc._org_exc_tb = getattr(org_exc, '_org_exc_tb', '')
41 41 return exc
42 42
43 43
@@ -129,6 +129,15 b' class GitRemote(object):'
129 129 return params
130 130
131 131 @reraise_safe_exceptions
132 def is_empty(self, wire):
133 repo = self._factory.repo(wire)
134 try:
135 return not repo.head()
136 except Exception:
137 log.exception("failed to read object_store")
138 return True
139
140 @reraise_safe_exceptions
132 141 def add_object(self, wire, content):
133 142 repo = self._factory.repo(wire)
134 143 blob = objects.Blob()
@@ -557,7 +566,8 b' class GitRemote(object):'
557 566 return {
558 567 'id': obj.id,
559 568 'type': obj.type_name,
560 'commit_id': commit_id
569 'commit_id': commit_id,
570 'idx': 0
561 571 }
562 572
563 573 @reraise_safe_exceptions
@@ -90,6 +90,8 b' def lfs_objects_batch(request):'
90 90 repo = request.matchdict.get('repo')
91 91 data = request.json
92 92 operation = data.get('operation')
93 http_scheme = request.registry.git_lfs_http_scheme
94
93 95 if operation not in ('download', 'upload'):
94 96 log.debug('LFS: unsupported operation:%s', operation)
95 97 return write_response_error(
@@ -114,8 +116,10 b' def lfs_objects_batch(request):'
114 116
115 117 obj_data = {'oid': oid}
116 118
117 obj_href = request.route_url('lfs_objects_oid', repo=repo, oid=oid)
118 obj_verify_href = request.route_url('lfs_objects_verify', repo=repo)
119 obj_href = request.route_url('lfs_objects_oid', repo=repo, oid=oid,
120 _scheme=http_scheme)
121 obj_verify_href = request.route_url('lfs_objects_verify', repo=repo,
122 _scheme=http_scheme)
119 123 store = LFSOidStore(
120 124 oid, repo, store_location=request.registry.git_lfs_store_path)
121 125 handler = OidHandler(
@@ -274,11 +278,12 b' def git_lfs_app(config):'
274 278 config.add_notfound_view(not_found, renderer='json')
275 279
276 280
277 def create_app(git_lfs_enabled, git_lfs_store_path):
281 def create_app(git_lfs_enabled, git_lfs_store_path, git_lfs_http_scheme):
278 282 config = Configurator()
279 283 if git_lfs_enabled:
280 284 config.include(git_lfs_app)
281 285 config.registry.git_lfs_store_path = git_lfs_store_path
286 config.registry.git_lfs_http_scheme = git_lfs_http_scheme
282 287 else:
283 288 # not found handler for API, reporting disabled LFS support
284 289 config.add_notfound_view(lfs_disabled, renderer='json')
@@ -26,7 +26,17 b' from vcsserver.git_lfs.app import create'
26 26 @pytest.fixture(scope='function')
27 27 def git_lfs_app(tmpdir):
28 28 custom_app = WebObTestApp(create_app(
29 git_lfs_enabled=True, git_lfs_store_path=str(tmpdir)))
29 git_lfs_enabled=True, git_lfs_store_path=str(tmpdir),
30 git_lfs_http_scheme='http'))
31 custom_app._store = str(tmpdir)
32 return custom_app
33
34
35 @pytest.fixture(scope='function')
36 def git_lfs_https_app(tmpdir):
37 custom_app = WebObTestApp(create_app(
38 git_lfs_enabled=True, git_lfs_store_path=str(tmpdir),
39 git_lfs_http_scheme='https'))
30 40 custom_app._store = str(tmpdir)
31 41 return custom_app
32 42
@@ -58,7 +68,7 b' class TestLFSApplication(object):'
58 68 assert json.loads(response.text) == {
59 69 u'message': u'GIT LFS locking api not supported'}
60 70
61 def test_app_batch_api_missing_auth(self, git_lfs_app,):
71 def test_app_batch_api_missing_auth(self, git_lfs_app):
62 72 git_lfs_app.post_json(
63 73 '/repo/info/lfs/objects/batch', params={}, status=403)
64 74
@@ -155,8 +165,31 b' class TestLFSApplication(object):'
155 165 assert json.loads(response.text) == {
156 166 'objects': expected_objects, 'transfer': 'basic'}
157 167
168 def test_app_batch_api_upload_for_https(self, git_lfs_https_app, http_auth):
169 params = {'operation': 'upload',
170 'objects': [{'oid': '123', 'size': '1024'}]}
171 response = git_lfs_https_app.post_json(
172 '/repo/info/lfs/objects/batch', params=params,
173 extra_environ=http_auth)
174 expected_objects = [
175 {u'authenticated': True,
176 u'actions': {
177 u'upload': {
178 u'header': {u'Authorization': u'Basic XXXXX',
179 u'Transfer-Encoding': u'chunked'},
180 u'href': u'https://localhost/repo/info/lfs/objects/123'},
181 u'verify': {
182 u'header': {u'Authorization': u'Basic XXXXX'},
183 u'href': u'https://localhost/repo/info/lfs/verify'}
184 },
185 u'oid': u'123',
186 u'size': u'1024'}
187 ]
188 assert json.loads(response.text) == {
189 'objects': expected_objects, 'transfer': 'basic'}
190
158 191 def test_app_verify_api_missing_data(self, git_lfs_app):
159 params = {'oid': 'missing',}
192 params = {'oid': 'missing'}
160 193 response = git_lfs_app.post_json(
161 194 '/repo/info/lfs/verify', params=params,
162 195 status=400)
@@ -20,6 +20,7 b' import logging'
20 20 import stat
21 21 import urllib
22 22 import urllib2
23 import traceback
23 24
24 25 from hgext import largefiles, rebase
25 26 from hgext.strip import strip as hgext_strip
@@ -31,9 +32,9 b' import vcsserver'
31 32 from vcsserver import exceptions
32 33 from vcsserver.base import RepoFactory, obfuscate_qs, raise_from_original
33 34 from vcsserver.hgcompat import (
34 archival, bin, clone, config as hgconfig, diffopts, hex,
35 archival, bin, clone, config as hgconfig, diffopts, hex, get_ctx,
35 36 hg_url as url_parser, httpbasicauthhandler, httpdigestauthhandler,
36 makepeer, localrepository, match, memctx, exchange, memfilectx, nullrev,
37 makepeer, instance, match, memctx, exchange, memfilectx, nullrev, hg_merge,
37 38 patch, peer, revrange, ui, hg_tag, Abort, LookupError, RepoError,
38 39 RepoLookupError, InterventionRequired, RequirementError)
39 40
@@ -41,7 +42,29 b' log = logging.getLogger(__name__)'
41 42
42 43
43 44 def make_ui_from_config(repo_config):
44 baseui = ui.ui()
45
46 class LoggingUI(ui.ui):
47 def status(self, *msg, **opts):
48 log.info(' '.join(msg).rstrip('\n'))
49 super(LoggingUI, self).status(*msg, **opts)
50
51 def warn(self, *msg, **opts):
52 log.warn(' '.join(msg).rstrip('\n'))
53 super(LoggingUI, self).warn(*msg, **opts)
54
55 def error(self, *msg, **opts):
56 log.error(' '.join(msg).rstrip('\n'))
57 super(LoggingUI, self).error(*msg, **opts)
58
59 def note(self, *msg, **opts):
60 log.info(' '.join(msg).rstrip('\n'))
61 super(LoggingUI, self).note(*msg, **opts)
62
63 def debug(self, *msg, **opts):
64 log.debug(' '.join(msg).rstrip('\n'))
65 super(LoggingUI, self).debug(*msg, **opts)
66
67 baseui = LoggingUI()
45 68
46 69 # clean the baseui object
47 70 baseui._ocfg = hgconfig.config()
@@ -55,6 +78,9 b' def make_ui_from_config(repo_config):'
55 78 baseui.setconfig('ui', 'quiet', 'true')
56 79
57 80 baseui.setconfig('ui', 'paginate', 'never')
81 # for better Error reporting of Mercurial
82 baseui.setconfig('ui', 'message-output', 'stderr')
83
58 84 # force mercurial to only use 1 thread, otherwise it may try to set a
59 85 # signal in a non-main thread, thus generating a ValueError.
60 86 baseui.setconfig('worker', 'numcpus', 1)
@@ -114,7 +140,7 b' class MercurialFactory(RepoFactory):'
114 140
115 141 def _create_repo(self, wire, create):
116 142 baseui = self._create_config(wire["config"])
117 return localrepository(baseui, wire["path"], create)
143 return instance(baseui, wire["path"], create)
118 144
119 145
120 146 class HgRemote(object):
@@ -137,12 +163,25 b' class HgRemote(object):'
137 163 "_file_paths": self.ctx_list,
138 164 }
139 165
166 def _get_ctx(self, repo, ref):
167 return get_ctx(repo, ref)
168
140 169 @reraise_safe_exceptions
141 170 def discover_hg_version(self):
142 171 from mercurial import util
143 172 return util.version()
144 173
145 174 @reraise_safe_exceptions
175 def is_empty(self, wire):
176 repo = self._factory.repo(wire)
177
178 try:
179 return len(repo) == 0
180 except Exception:
181 log.exception("failed to read object_store")
182 return False
183
184 @reraise_safe_exceptions
146 185 def archive_repo(self, archive_path, mtime, file_info, kind):
147 186 if kind == "tgz":
148 187 archiver = archival.tarit(archive_path, mtime, "gz")
@@ -198,7 +237,15 b' class HgRemote(object):'
198 237 self, wire, message, parents, commit_time, commit_timezone,
199 238 user, files, extra, removed, updated):
200 239
201 def _filectxfn(_repo, memctx, path):
240 repo = self._factory.repo(wire)
241 baseui = self._factory._create_config(wire['config'])
242 publishing = baseui.configbool('phases', 'publish')
243 if publishing:
244 new_commit = 'public'
245 else:
246 new_commit = 'draft'
247
248 def _filectxfn(_repo, ctx, path):
202 249 """
203 250 Marks given path as added/changed/removed in a given _repo. This is
204 251 for internal mercurial commit function.
@@ -214,7 +261,7 b' class HgRemote(object):'
214 261 if node['path'] == path:
215 262 return memfilectx(
216 263 _repo,
217 changectx=memctx,
264 changectx=ctx,
218 265 path=node['path'],
219 266 data=node['content'],
220 267 islink=False,
@@ -225,103 +272,94 b' class HgRemote(object):'
225 272 "Given path haven't been marked as added, "
226 273 "changed or removed (%s)" % path)
227 274
228 repo = self._factory.repo(wire)
275 with repo.ui.configoverride({('phases', 'new-commit'): new_commit}):
229 276
230 commit_ctx = memctx(
231 repo=repo,
232 parents=parents,
233 text=message,
234 files=files,
235 filectxfn=_filectxfn,
236 user=user,
237 date=(commit_time, commit_timezone),
238 extra=extra)
277 commit_ctx = memctx(
278 repo=repo,
279 parents=parents,
280 text=message,
281 files=files,
282 filectxfn=_filectxfn,
283 user=user,
284 date=(commit_time, commit_timezone),
285 extra=extra)
239 286
240 n = repo.commitctx(commit_ctx)
241 new_id = hex(n)
287 n = repo.commitctx(commit_ctx)
288 new_id = hex(n)
242 289
243 return new_id
290 return new_id
244 291
245 292 @reraise_safe_exceptions
246 293 def ctx_branch(self, wire, revision):
247 294 repo = self._factory.repo(wire)
248 ctx = repo[revision]
295 ctx = self._get_ctx(repo, revision)
249 296 return ctx.branch()
250 297
251 298 @reraise_safe_exceptions
252 299 def ctx_children(self, wire, revision):
253 300 repo = self._factory.repo(wire)
254 ctx = repo[revision]
301 ctx = self._get_ctx(repo, revision)
255 302 return [child.rev() for child in ctx.children()]
256 303
257 304 @reraise_safe_exceptions
258 305 def ctx_date(self, wire, revision):
259 306 repo = self._factory.repo(wire)
260 ctx = repo[revision]
307 ctx = self._get_ctx(repo, revision)
261 308 return ctx.date()
262 309
263 310 @reraise_safe_exceptions
264 311 def ctx_description(self, wire, revision):
265 312 repo = self._factory.repo(wire)
266 ctx = repo[revision]
313 ctx = self._get_ctx(repo, revision)
267 314 return ctx.description()
268 315
269 316 @reraise_safe_exceptions
270 def ctx_diff(
271 self, wire, revision, git=True, ignore_whitespace=True, context=3):
272 repo = self._factory.repo(wire)
273 ctx = repo[revision]
274 result = ctx.diff(
275 git=git, ignore_whitespace=ignore_whitespace, context=context)
276 return list(result)
277
278 @reraise_safe_exceptions
279 317 def ctx_files(self, wire, revision):
280 318 repo = self._factory.repo(wire)
281 ctx = repo[revision]
319 ctx = self._get_ctx(repo, revision)
282 320 return ctx.files()
283 321
284 322 @reraise_safe_exceptions
285 323 def ctx_list(self, path, revision):
286 324 repo = self._factory.repo(path)
287 ctx = repo[revision]
325 ctx = self._get_ctx(repo, revision)
288 326 return list(ctx)
289 327
290 328 @reraise_safe_exceptions
291 329 def ctx_parents(self, wire, revision):
292 330 repo = self._factory.repo(wire)
293 ctx = repo[revision]
331 ctx = self._get_ctx(repo, revision)
294 332 return [parent.rev() for parent in ctx.parents()]
295 333
296 334 @reraise_safe_exceptions
297 335 def ctx_phase(self, wire, revision):
298 336 repo = self._factory.repo(wire)
299 ctx = repo[revision]
337 ctx = self._get_ctx(repo, revision)
300 338 # public=0, draft=1, secret=3
301 339 return ctx.phase()
302 340
303 341 @reraise_safe_exceptions
304 342 def ctx_obsolete(self, wire, revision):
305 343 repo = self._factory.repo(wire)
306 ctx = repo[revision]
344 ctx = self._get_ctx(repo, revision)
307 345 return ctx.obsolete()
308 346
309 347 @reraise_safe_exceptions
310 348 def ctx_hidden(self, wire, revision):
311 349 repo = self._factory.repo(wire)
312 ctx = repo[revision]
350 ctx = self._get_ctx(repo, revision)
313 351 return ctx.hidden()
314 352
315 353 @reraise_safe_exceptions
316 354 def ctx_substate(self, wire, revision):
317 355 repo = self._factory.repo(wire)
318 ctx = repo[revision]
356 ctx = self._get_ctx(repo, revision)
319 357 return ctx.substate
320 358
321 359 @reraise_safe_exceptions
322 360 def ctx_status(self, wire, revision):
323 361 repo = self._factory.repo(wire)
324 ctx = repo[revision]
362 ctx = self._get_ctx(repo, revision)
325 363 status = repo[ctx.p1().node()].status(other=ctx.node())
326 364 # object of status (odd, custom named tuple in mercurial) is not
327 365 # correctly serializable, we make it a list, as the underling
@@ -331,7 +369,7 b' class HgRemote(object):'
331 369 @reraise_safe_exceptions
332 370 def ctx_user(self, wire, revision):
333 371 repo = self._factory.repo(wire)
334 ctx = repo[revision]
372 ctx = self._get_ctx(repo, revision)
335 373 return ctx.user()
336 374
337 375 @reraise_safe_exceptions
@@ -421,13 +459,17 b' class HgRemote(object):'
421 459 def node_history(self, wire, revision, path, limit):
422 460 repo = self._factory.repo(wire)
423 461
424 ctx = repo[revision]
462 ctx = self._get_ctx(repo, revision)
425 463 fctx = ctx.filectx(path)
426 464
427 465 def history_iter():
428 466 limit_rev = fctx.rev()
429 467 for obj in reversed(list(fctx.filelog())):
430 468 obj = fctx.filectx(obj)
469 ctx = obj.changectx()
470 if ctx.hidden() or ctx.obsolete():
471 continue
472
431 473 if limit_rev >= obj.rev():
432 474 yield obj
433 475
@@ -442,7 +484,7 b' class HgRemote(object):'
442 484 @reraise_safe_exceptions
443 485 def node_history_untill(self, wire, revision, path, limit):
444 486 repo = self._factory.repo(wire)
445 ctx = repo[revision]
487 ctx = self._get_ctx(repo, revision)
446 488 fctx = ctx.filectx(path)
447 489
448 490 file_log = list(fctx.filelog())
@@ -455,7 +497,7 b' class HgRemote(object):'
455 497 @reraise_safe_exceptions
456 498 def fctx_annotate(self, wire, revision, path):
457 499 repo = self._factory.repo(wire)
458 ctx = repo[revision]
500 ctx = self._get_ctx(repo, revision)
459 501 fctx = ctx.filectx(path)
460 502
461 503 result = []
@@ -469,29 +511,30 b' class HgRemote(object):'
469 511 @reraise_safe_exceptions
470 512 def fctx_data(self, wire, revision, path):
471 513 repo = self._factory.repo(wire)
472 ctx = repo[revision]
514 ctx = self._get_ctx(repo, revision)
473 515 fctx = ctx.filectx(path)
474 516 return fctx.data()
475 517
476 518 @reraise_safe_exceptions
477 519 def fctx_flags(self, wire, revision, path):
478 520 repo = self._factory.repo(wire)
479 ctx = repo[revision]
521 ctx = self._get_ctx(repo, revision)
480 522 fctx = ctx.filectx(path)
481 523 return fctx.flags()
482 524
483 525 @reraise_safe_exceptions
484 526 def fctx_size(self, wire, revision, path):
485 527 repo = self._factory.repo(wire)
486 ctx = repo[revision]
528 ctx = self._get_ctx(repo, revision)
487 529 fctx = ctx.filectx(path)
488 530 return fctx.size()
489 531
490 532 @reraise_safe_exceptions
491 533 def get_all_commit_ids(self, wire, name):
492 534 repo = self._factory.repo(wire)
493 revs = repo.filtered(name).changelog.index
494 return map(lambda x: hex(x[7]), revs)[:-1]
535 repo = repo.filtered(name)
536 revs = map(lambda x: hex(x[7]), repo.changelog.index)
537 return revs
495 538
496 539 @reraise_safe_exceptions
497 540 def get_config_value(self, wire, section, name, untrusted=False):
@@ -544,22 +587,19 b' class HgRemote(object):'
544 587
545 588 if isinstance(revision, int):
546 589 # NOTE(marcink):
547 # since Mercurial doesn't support indexes properly
590 # since Mercurial doesn't support negative indexes properly
548 591 # we need to shift accordingly by one to get proper index, e.g
549 592 # repo[-1] => repo[-2]
550 593 # repo[0] => repo[-1]
551 # repo[1] => repo[2] we also never call repo[0] because
552 # it's actually second commit
553 594 if revision <= 0:
554 595 revision = revision + -1
555 else:
556 revision = revision + 1
557
558 596 try:
559 ctx = repo[revision]
560 except RepoLookupError as e:
597 ctx = self._get_ctx(repo, revision)
598 except (TypeError, RepoLookupError) as e:
599 e._org_exc_tb = traceback.format_exc()
561 600 raise exceptions.LookupException(e)(revision)
562 601 except LookupError as e:
602 e._org_exc_tb = traceback.format_exc()
563 603 raise exceptions.LookupException(e)(e.name)
564 604
565 605 if not both:
@@ -605,7 +645,7 b' class HgRemote(object):'
605 645 @reraise_safe_exceptions
606 646 def revision(self, wire, rev):
607 647 repo = self._factory.repo(wire)
608 ctx = repo[rev]
648 ctx = self._get_ctx(repo, rev)
609 649 return ctx.rev()
610 650
611 651 @reraise_safe_exceptions
@@ -638,7 +678,7 b' class HgRemote(object):'
638 678 # case when we want to compare two independent repositories
639 679 if other_path and other_path != wire["path"]:
640 680 baseui = self._factory._create_config(wire["config"])
641 repo = unionrepo.unionrepository(baseui, other_path, wire["path"])
681 repo = unionrepo.makeunionrepository(baseui, other_path, wire["path"])
642 682 else:
643 683 repo = self._factory.repo(wire)
644 684 return list(repo.revs(rev_spec, *args))
@@ -646,7 +686,7 b' class HgRemote(object):'
646 686 @reraise_safe_exceptions
647 687 def strip(self, wire, revision, update, backup):
648 688 repo = self._factory.repo(wire)
649 ctx = repo[revision]
689 ctx = self._get_ctx(repo, revision)
650 690 hgext_strip(
651 691 repo.baseui, repo, ctx.node(), update=update, backup=backup)
652 692
@@ -669,7 +709,7 b' class HgRemote(object):'
669 709 def tag(self, wire, name, revision, message, local, user,
670 710 tag_time, tag_timezone):
671 711 repo = self._factory.repo(wire)
672 ctx = repo[revision]
712 ctx = self._get_ctx(repo, revision)
673 713 node = ctx.node()
674 714
675 715 date = (tag_time, tag_timezone)
@@ -766,8 +806,20 b' class HgRemote(object):'
766 806 # setting the interactive flag to `False` mercurial doesn't prompt the
767 807 # used but instead uses a default value.
768 808 repo.ui.setconfig('ui', 'interactive', False)
809 commands.merge(baseui, repo, rev=revision)
769 810
770 commands.merge(baseui, repo, rev=revision)
811 @reraise_safe_exceptions
812 def merge_state(self, wire):
813 repo = self._factory.repo(wire)
814 repo.ui.setconfig('ui', 'merge', 'internal:dump')
815
816 # In case of sub repositories are used mercurial prompts the user in
817 # case of merge conflicts or different sub repository sources. By
818 # setting the interactive flag to `False` mercurial doesn't prompt the
819 # used but instead uses a default value.
820 repo.ui.setconfig('ui', 'interactive', False)
821 ms = hg_merge.mergestate(repo)
822 return [x for x in ms.unresolved()]
771 823
772 824 @reraise_safe_exceptions
773 825 def commit(self, wire, message, username, close_branch=False):
@@ -776,6 +828,7 b' class HgRemote(object):'
776 828 repo.ui.setconfig('ui', 'username', username)
777 829 commands.commit(baseui, repo, message=message, close_branch=close_branch)
778 830
831
779 832 @reraise_safe_exceptions
780 833 def rebase(self, wire, source=None, dest=None, abort=False):
781 834 repo = self._factory.repo(wire)
@@ -42,9 +42,9 b' from mercurial.commands import clone, nu'
42 42 from mercurial.context import memctx, memfilectx
43 43 from mercurial.error import (
44 44 LookupError, RepoError, RepoLookupError, Abort, InterventionRequired,
45 RequirementError)
45 RequirementError, ProgrammingError)
46 46 from mercurial.hgweb import hgweb_mod
47 from mercurial.localrepo import localrepository
47 from mercurial.localrepo import instance
48 48 from mercurial.match import match
49 49 from mercurial.mdiff import diffopts
50 50 from mercurial.node import bin, hex
@@ -53,7 +53,7 b' from mercurial.discovery import findcomm'
53 53 from mercurial.hg import peer
54 54 from mercurial.httppeer import makepeer
55 55 from mercurial.util import url as hg_url
56 from mercurial.scmutil import revrange
56 from mercurial.scmutil import revrange, revsymbol
57 57 from mercurial.node import nullrev
58 58 from mercurial import exchange
59 59 from hgext import largefiles
@@ -61,3 +61,14 b' from hgext import largefiles'
61 61 # those authnadlers are patched for python 2.6.5 bug an
62 62 # infinit looping when given invalid resources
63 63 from mercurial.url import httpbasicauthhandler, httpdigestauthhandler
64
65
66 def get_ctx(repo, ref):
67 try:
68 ctx = repo[ref]
69 except ProgrammingError:
70 # we're unable to find the rev using a regular lookup, we fallback
71 # to slower, but backward compat revsymbol usage
72 ctx = revsymbol(repo, ref)
73
74 return ctx
@@ -170,8 +170,10 b' def check_rhodecode_hook(hook_path):'
170 170
171 171
172 172 def read_hook_content(hook_path):
173 with open(hook_path, 'rb') as f:
174 content = f.read()
173 content = ''
174 if os.path.isfile(hook_path):
175 with open(hook_path, 'rb') as f:
176 content = f.read()
175 177 return content
176 178
177 179
@@ -33,6 +33,7 b' import mercurial.node'
33 33 import simplejson as json
34 34
35 35 from vcsserver import exceptions, subprocessio, settings
36 from vcsserver.hgcompat import get_ctx
36 37
37 38 log = logging.getLogger(__name__)
38 39
@@ -177,11 +178,11 b' def _rev_range_hash(repo, node, check_he'
177 178
178 179 commits = []
179 180 revs = []
180 start = repo[node].rev()
181 start = get_ctx(repo, node).rev()
181 182 end = len(repo)
182 183 for rev in range(start, end):
183 184 revs.append(rev)
184 ctx = repo[rev]
185 ctx = get_ctx(repo, rev)
185 186 commit_id = mercurial.node.hex(ctx.node())
186 187 branch = ctx.branch()
187 188 commits.append((commit_id, branch))
@@ -204,12 +205,12 b' def _check_heads(repo, start, end, commi'
204 205 parents.add(p)
205 206
206 207 for p in parents:
207 branch = repo[p].branch()
208 branch = get_ctx(repo, p).branch()
208 209 # The heads descending from that parent, on the same branch
209 210 parent_heads = set([p])
210 211 reachable = set([p])
211 212 for x in xrange(p + 1, end):
212 if repo[x].branch() != branch:
213 if get_ctx(repo, x).branch() != branch:
213 214 continue
214 215 for pp in changelog.parentrevs(x):
215 216 if pp in reachable:
@@ -385,7 +386,7 b' def post_push_ssh(ui, repo, node, **kwar'
385 386 def key_push(ui, repo, **kwargs):
386 387 if kwargs['new'] != '0' and kwargs['namespace'] == 'bookmarks':
387 388 # store new bookmarks in our UI object propagated later to post_push
388 ui._rc_pushkey_branches = repo[kwargs['key']].bookmarks()
389 ui._rc_pushkey_branches = get_ctx(repo, kwargs['key']).bookmarks()
389 390 return
390 391
391 392
@@ -622,7 +623,7 b' def git_post_receive(unused_repo_path, r'
622 623 def _get_extras_from_txn_id(path, txn_id):
623 624 extras = {}
624 625 try:
625 cmd = ['svnlook', 'pget',
626 cmd = [settings.SVNLOOK_EXECUTABLE, 'pget',
626 627 '-t', txn_id,
627 628 '--revprop', path, 'rc-scm-extras']
628 629 stdout, stderr = subprocessio.run_command(
@@ -637,7 +638,7 b' def _get_extras_from_txn_id(path, txn_id'
637 638 def _get_extras_from_commit_id(commit_id, path):
638 639 extras = {}
639 640 try:
640 cmd = ['svnlook', 'pget',
641 cmd = [settings.SVNLOOK_EXECUTABLE, 'pget',
641 642 '-r', commit_id,
642 643 '--revprop', path, 'rc-scm-extras']
643 644 stdout, stderr = subprocessio.run_command(
@@ -663,7 +664,7 b' def svn_pre_commit(repo_path, commit_dat'
663 664 return 0
664 665
665 666 extras['hook_type'] = 'pre_commit'
666 extras['commit_ids'] = []
667 extras['commit_ids'] = [txn_id]
667 668 extras['txn_id'] = txn_id
668 669 extras['new_refs'] = {
669 670 'total_commits': 1,
@@ -26,6 +26,7 b' import logging'
26 26 import traceback
27 27 import tempfile
28 28
29 from pyramid import compat
29 30
30 31 log = logging.getLogger(__name__)
31 32
@@ -69,9 +70,26 b' def get_exc_store():'
69 70
70 71 def _store_exception(exc_id, exc_info, prefix):
71 72 exc_type, exc_value, exc_traceback = exc_info
73
72 74 tb = ''.join(traceback.format_exception(
73 75 exc_type, exc_value, exc_traceback, None))
74 76
77 detailed_tb = getattr(exc_value, '_org_exc_tb', None)
78
79 if detailed_tb:
80 if isinstance(detailed_tb, compat.string_types):
81 remote_tb = [detailed_tb]
82
83 tb += (
84 '\n+++ BEG SOURCE EXCEPTION +++\n\n'
85 '{}\n'
86 '+++ END SOURCE EXCEPTION +++\n'
87 ''.format('\n'.join(remote_tb))
88 )
89
90 # Avoid that remote_tb also appears in the frame
91 del remote_tb
92
75 93 exc_type_name = exc_type.__name__
76 94 exc_store_path = get_exc_store()
77 95 exc_data, org_data = exc_serialize(exc_id, tb, exc_type_name)
@@ -218,8 +218,8 b' class GitLFSHandler(object):'
218 218 self.git_path = git_path
219 219 self.update_server_info = update_server_info
220 220
221 def get_app(self, git_lfs_enabled, git_lfs_store_path):
222 app = git_lfs.create_app(git_lfs_enabled, git_lfs_store_path)
221 def get_app(self, git_lfs_enabled, git_lfs_store_path, git_lfs_http_scheme):
222 app = git_lfs.create_app(git_lfs_enabled, git_lfs_store_path, git_lfs_http_scheme)
223 223 return app
224 224
225 225
@@ -228,7 +228,8 b' def create_git_lfs_wsgi_app(repo_path, r'
228 228 update_server_info = config.pop('git_update_server_info')
229 229 git_lfs_enabled = config.pop('git_lfs_enabled')
230 230 git_lfs_store_path = config.pop('git_lfs_store_path')
231 git_lfs_http_scheme = config.pop('git_lfs_http_scheme', 'http')
231 232 app = GitLFSHandler(
232 233 repo_path, repo_name, git_path, update_server_info, config)
233 234
234 return app.get_app(git_lfs_enabled, git_lfs_store_path)
235 return app.get_app(git_lfs_enabled, git_lfs_store_path, git_lfs_http_scheme)
@@ -17,4 +17,6 b''
17 17
18 18 WIRE_ENCODING = 'UTF-8'
19 19 GIT_EXECUTABLE = 'git'
20 SVN_EXECUTABLE = 'svn'
21 SVNLOOK_EXECUTABLE = 'svnlook'
20 22 BINARY_DIR = ''
@@ -139,6 +139,16 b' class SvnRemote(object):'
139 139 svn_ver = None
140 140 return svn_ver
141 141
142 @reraise_safe_exceptions
143 def is_empty(self, wire):
144 repo = self._factory.repo(wire)
145
146 try:
147 return self.lookup(wire, -1) == 0
148 except Exception:
149 log.exception("failed to read object_store")
150 return False
151
142 152 def check_url(self, url, config_items):
143 153 # this can throw exception if not installed, but we detect this
144 154 from hgsubversion import svnrepo
@@ -448,6 +458,39 b' class SvnRemote(object):'
448 458 return False
449 459
450 460 @reraise_safe_exceptions
461 def run_svn_command(self, wire, cmd, **opts):
462 path = wire.get('path', None)
463
464 if path and os.path.isdir(path):
465 opts['cwd'] = path
466
467 safe_call = False
468 if '_safe' in opts:
469 safe_call = True
470
471 svnenv = os.environ.copy()
472 svnenv.update(opts.pop('extra_env', {}))
473
474 _opts = {'env': svnenv, 'shell': False}
475
476 try:
477 _opts.update(opts)
478 p = subprocessio.SubprocessIOChunker(cmd, **_opts)
479
480 return ''.join(p), ''.join(p.error)
481 except (EnvironmentError, OSError) as err:
482 cmd = ' '.join(cmd) # human friendly CMD
483 tb_err = ("Couldn't run svn command (%s).\n"
484 "Original error was:%s\n"
485 "Call options:%s\n"
486 % (cmd, err, _opts))
487 log.exception(tb_err)
488 if safe_call:
489 return '', err
490 else:
491 raise exceptions.VcsException()(tb_err)
492
493 @reraise_safe_exceptions
451 494 def install_hooks(self, wire, force=False):
452 495 from vcsserver.hook_utils import install_svn_hooks
453 496 repo_path = wire['path']
General Comments 0
You need to be logged in to leave comments. Login now