Modified: subversion/branches/1.7.x-issue4340-repos/subversion/svn/main.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4340-repos/subversion/svn/main.c?rev=1645439&r1=1645438&r2=1645439&view=diff ============================================================================== --- subversion/branches/1.7.x-issue4340-repos/subversion/svn/main.c (original) +++ subversion/branches/1.7.x-issue4340-repos/subversion/svn/main.c Sun Dec 14 11:44:03 2014 @@ -1995,7 +1995,8 @@ main(int argc, const char *argv[]) opt_state.remove = TRUE; break; case opt_changelist: - opt_state.changelist = apr_pstrdup(pool, opt_arg); + SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool)); + opt_state.changelist = utf8_opt_arg; if (opt_state.changelist[0] == '\0') { err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
Propchange: subversion/branches/1.7.x-issue4340-repos/subversion/svn/main.c ------------------------------------------------------------------------------ --- svn:mergeinfo (added) +++ svn:mergeinfo Sun Dec 14 11:44:03 2014 @@ -0,0 +1,156 @@ +/subversion/1.7.x-issue4059/subversion/svn/main.c:1239661-1239744 +/subversion/branches/1.5.x-r30215/subversion/svn/main.c:870312 +/subversion/branches/1.7.x/subversion/svn/main.c:1480943-1645438 +/subversion/branches/1.7.x-JavaHL-pools/subversion/svn/main.c:1158684-1158722 +/subversion/branches/1.7.x-diff-translate/subversion/svn/main.c:1568403-1569065 +/subversion/branches/1.7.x-disable_zlib_asm/subversion/svn/main.c:1593915-1615219 +/subversion/branches/1.7.x-fsfs-commit/subversion/svn/main.c:1536760-1541380 +/subversion/branches/1.7.x-gssapi-solaris10/subversion/svn/main.c:1453164-1515067 +/subversion/branches/1.7.x-issue3888/subversion/svn/main.c:1148937-1149162 +/subversion/branches/1.7.x-issue3975/subversion/svn/main.c:1160761-1161546 +/subversion/branches/1.7.x-issue3976/subversion/svn/main.c:1161731-1165397 +/subversion/branches/1.7.x-issue4032/subversion/svn/main.c:1186668-1186784 +/subversion/branches/1.7.x-issue4035/subversion/svn/main.c:1186202-1186315 +/subversion/branches/1.7.x-issue4035-r1185738/subversion/svn/main.c:1186316-1186778 +/subversion/branches/1.7.x-issue4059/subversion/svn/main.c:1239745-1242661 +/subversion/branches/1.7.x-issue4087/subversion/svn/main.c:1243707-1336073 +/subversion/branches/1.7.x-issue4093/subversion/svn/main.c:1229839-1230236 +/subversion/branches/1.7.x-issue4102/subversion/svn/main.c:1292401-1295402 +/subversion/branches/1.7.x-issue4123/subversion/svn/main.c:1293358-1293812 +/subversion/branches/1.7.x-issue4144/subversion/svn/main.c:1305854-1306143 +/subversion/branches/1.7.x-issue4153/subversion/svn/main.c:1309894-1539233 +/subversion/branches/1.7.x-issue4161/subversion/svn/main.c:1330697-1331209 +/subversion/branches/1.7.x-issue4166/subversion/svn/main.c:1330474-1336071 +/subversion/branches/1.7.x-issue4169/subversion/svn/main.c:1330537-1336116 +/subversion/branches/1.7.x-issue4257/subversion/svn/main.c:1454456-1461404 +/subversion/branches/1.7.x-issue4263/subversion/svn/main.c:1423588-1434547 +/subversion/branches/1.7.x-issue4270/subversion/svn/main.c:1433737-1485341 +/subversion/branches/1.7.x-issue4306/subversion/svn/main.c:1438872-1514941 +/subversion/branches/1.7.x-issue4332/subversion/svn/main.c:1453478-1460963 +/subversion/branches/1.7.x-issue4340/subversion/svn/main.c:1461589-1485180 +/subversion/branches/1.7.x-issue4408/subversion/svn/main.c:1512143-1514943 +/subversion/branches/1.7.x-issue4428/subversion/svn/main.c:1525912-1538136 +/subversion/branches/1.7.x-issue4460/subversion/svn/main.c:1563069-1564892 +/subversion/branches/1.7.x-issue4480/subversion/svn/main.c:1588781-1590205 +/subversion/branches/1.7.x-issue4k/subversion/svn/main.c:1166502-1167193 +/subversion/branches/1.7.x-javahl-exception-crash/subversion/svn/main.c:1586451-1589333 +/subversion/branches/1.7.x-log-diff/subversion/svn/main.c:1295670-1295699 +/subversion/branches/1.7.x-md5-collision/subversion/svn/main.c:1600982-1615192 +/subversion/branches/1.7.x-neon-0.30/subversion/svn/main.c:1566319-1568587 +/subversion/branches/1.7.x-neon-default/subversion/svn/main.c:1148803-1158680 +/subversion/branches/1.7.x-neon-properr/subversion/svn/main.c:1440619-1461944 +/subversion/branches/1.7.x-r1152189/subversion/svn/main.c:1152759-1154249 +/subversion/branches/1.7.x-r1155160/subversion/svn/main.c:1158704-1159223 +/subversion/branches/1.7.x-r1159093/subversion/svn/main.c:1159097-1159230 +/subversion/branches/1.7.x-r1163557/subversion/svn/main.c:1163574-1170648 +/subversion/branches/1.7.x-r1173425/subversion/svn/main.c:1173429-1176454 +/subversion/branches/1.7.x-r1180154/subversion/svn/main.c:1186224-1186351 +/subversion/branches/1.7.x-r1201824/subversion/svn/main.c:1202121-1207333 +/subversion/branches/1.7.x-r1210147/subversion/svn/main.c:1213310-1293110 +/subversion/branches/1.7.x-r1213331/subversion/svn/main.c:1213684-1213756 +/subversion/branches/1.7.x-r1227815-conflict/subversion/svn/main.c:1642662-1643026 +/subversion/branches/1.7.x-r1232221/subversion/svn/main.c:1232358-1238008 +/subversion/branches/1.7.x-r1236343/subversion/svn/main.c:1236628-1239394 +/subversion/branches/1.7.x-r1242759/subversion/svn/main.c:1372522-1393041 +/subversion/branches/1.7.x-r1306111/subversion/svn/main.c:1306301-1331207 +/subversion/branches/1.7.x-r1341012/subversion/svn/main.c:1341013-1355629 +/subversion/branches/1.7.x-r1348822/subversion/svn/main.c:1348878-1355700 +/subversion/branches/1.7.x-r1352031/subversion/svn/main.c:1431725-1435017 +/subversion/branches/1.7.x-r1352068/subversion/svn/main.c:1352087-1364232 +/subversion/branches/1.7.x-r1361007/subversion/svn/main.c:1361110-1367853 +/subversion/branches/1.7.x-r1361341/subversion/svn/main.c:1361342-1367855 +/subversion/branches/1.7.x-r1365554/subversion/svn/main.c:1365558-1367850 +/subversion/branches/1.7.x-r1375052/subversion/svn/main.c:1376643-1380970 +/subversion/branches/1.7.x-r1383483/subversion/svn/main.c:1383601-1383951 +/subversion/branches/1.7.x-r1388975/subversion/svn/main.c:1392898-1393044 +/subversion/branches/1.7.x-r1389851/subversion/svn/main.c:1389853-1392834 +/subversion/branches/1.7.x-r1389878/subversion/svn/main.c:1389879-1393126 +/subversion/branches/1.7.x-r1389928/subversion/svn/main.c:1390384-1391747 +/subversion/branches/1.7.x-r1398325/subversion/svn/main.c:1398353-1398633 +/subversion/branches/1.7.x-r1399174/subversion/svn/main.c:1399176-1403964 +/subversion/branches/1.7.x-r1401915/subversion/svn/main.c:1401934-1407349 +/subversion/branches/1.7.x-r1407131/subversion/svn/main.c:1407164-1419607 +/subversion/branches/1.7.x-r1423646/subversion/svn/main.c:1423647-1424282 +/subversion/branches/1.7.x-r1426752/subversion/svn/main.c:1426753-1485335 +/subversion/branches/1.7.x-r1426762/subversion/svn/main.c:1538732-1538859 +/subversion/branches/1.7.x-r1427278/subversion/svn/main.c:1433724-1485338 +/subversion/branches/1.7.x-r1461743/subversion/svn/main.c:1461745-1482189 +/subversion/branches/1.7.x-r1462041/subversion/svn/main.c:1617243-1641028 +/subversion/branches/1.7.x-r1475724/subversion/svn/main.c:1475743-1482192 +/subversion/branches/1.7.x-r1481010/subversion/svn/main.c:1481034-1482194 +/subversion/branches/1.7.x-r1482759/subversion/svn/main.c:1483584-1485046 +/subversion/branches/1.7.x-r1507044/subversion/svn/main.c:1507300-1511568 +/subversion/branches/1.7.x-r1527103/subversion/svn/main.c:1527110-1541378 +/subversion/branches/1.7.x-r1541790/subversion/svn/main.c:1541792-1542083 +/subversion/branches/1.7.x-r1551579/subversion/svn/main.c:1551587-1589566 +/subversion/branches/1.7.x-r1564215/subversion/svn/main.c:1564280-1564618 +/subversion/branches/1.7.x-r1568872-neon+serf/subversion/svn/main.c:1568942-1569623 +/subversion/branches/1.7.x-r1574868/subversion/svn/main.c:1575332-1642628 +/subversion/branches/1.7.x-r1580626/subversion/svn/main.c:1580636-1590207 +/subversion/branches/1.7.x-r1594157/subversion/svn/main.c:1594673-1643028 +/subversion/branches/1.7.x-r1641564/subversion/svn/main.c:1641574-1642630 +/subversion/branches/1.7.x-san-cert/subversion/svn/main.c:1614969-1615212 +/subversion/branches/1.7.x-serf-1.3.x-Windows/subversion/svn/main.c:1543441-1589564 +/subversion/branches/1.7.x-serf-server-root-segfaults/subversion/svn/main.c:1383952-1392726 +/subversion/branches/1.7.x-svn-patch-eol-fixes/subversion/svn/main.c:1207511-1235924 +/subversion/branches/1.8.x/subversion/svn/main.c:1577779 +/subversion/branches/1.8.x-issue4480/subversion/svn/main.c:1588775 +/subversion/branches/1.8.x-javahl-exception-crash/subversion/svn/main.c:1586439 +/subversion/branches/1.8.x-openssl-dirs/subversion/svn/main.c:1535139 +/subversion/branches/1.8.x-serf-1.3+-windows/subversion/svn/main.c:1517123 +/subversion/branches/atomic-revprop/subversion/svn/main.c:965046-1000689 +/subversion/branches/bdb-reverse-deltas/subversion/svn/main.c:872050-872529 +/subversion/branches/diff-callbacks3/subversion/svn/main.c:870059-870761 +/subversion/branches/diff-optimizations/subversion/svn/main.c:1031270-1037352 +/subversion/branches/diff-optimizations-bytes/subversion/svn/main.c:1037353-1067789 +/subversion/branches/dont-save-plaintext-passwords-by-default/subversion/svn/main.c:870728-871118 +/subversion/branches/double-delete/subversion/svn/main.c:870511-872970 +/subversion/branches/explore-wc/subversion/svn/main.c:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997 +/subversion/branches/file-externals/subversion/svn/main.c:871779-873302 +/subversion/branches/fs-rep-sharing/subversion/svn/main.c:869036-873803 +/subversion/branches/fsfs-pack/subversion/svn/main.c:873717-874575 +/subversion/branches/gnome-keyring/subversion/svn/main.c:870558-871410 +/subversion/branches/http-protocol-v2/subversion/svn/main.c:874395-876041 +/subversion/branches/in-memory-cache/subversion/svn/main.c:869829-871452 +/subversion/branches/integrate-cache-item-serialization/subversion/svn/main.c:1068724-1068739 +/subversion/branches/integrate-cache-membuffer/subversion/svn/main.c:998649-998852 +/subversion/branches/integrate-compression-level/subversion/svn/main.c:1068651-1072287 +/subversion/branches/integrate-io-improvements/subversion/svn/main.c:1068684-1072297 +/subversion/branches/integrate-is-cachable/subversion/svn/main.c:1072568-1074082 +/subversion/branches/integrate-partial-getter/subversion/svn/main.c:1072558-1076552 +/subversion/branches/integrate-readline-speedup/subversion/svn/main.c:1072553-1072555 +/subversion/branches/integrate-stream-api-extensions/subversion/svn/main.c:1068695-1072516 +/subversion/branches/integrate-txdelta-caching/subversion/svn/main.c:1072541-1078213 +/subversion/branches/issue-2779-dev/subversion/svn/main.c:965496-984198 +/subversion/branches/issue-2843-dev/subversion/svn/main.c:871432-874179 +/subversion/branches/issue-3000/subversion/svn/main.c:871713,871716-871719,871721-871726,871728,871734 +/subversion/branches/issue-3067-deleted-subtrees/subversion/svn/main.c:873375-874084 +/subversion/branches/issue-3148-dev/subversion/svn/main.c:875193-875204 +/subversion/branches/issue-3220-dev/subversion/svn/main.c:872210-872226 +/subversion/branches/issue-3242-dev/subversion/svn/main.c:879653-896436 +/subversion/branches/issue-3334-dirs/subversion/svn/main.c:875156-875867 +/subversion/branches/issue-3975/subversion/svn/main.c:1152931-1160746 +/subversion/branches/kwallet/subversion/svn/main.c:870785-871314 +/subversion/branches/log-g-performance/subversion/svn/main.c:870941-871032 +/subversion/branches/merge-skips-obstructions/subversion/svn/main.c:874525-874615 +/subversion/branches/nfc-nfd-aware-client/subversion/svn/main.c:870276,870376 +/subversion/branches/performance/subversion/svn/main.c:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985695,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029090,1029092-1029093,1029111,1029151,1029158,1029229-1029230,1029232,1029335-1029336,1029339-1029340,10 29342,1029344,1030763,1030827,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365 +/subversion/branches/py-tests-as-modules/subversion/svn/main.c:956579-1033052 +/subversion/branches/ra_serf-digest-authn/subversion/svn/main.c:875693-876404 +/subversion/branches/reintegrate-improvements/subversion/svn/main.c:873853-874164 +/subversion/branches/revprop-packing/subversion/svn/main.c:1143907,1143971,1143997,1144017,1144499,1144568 +/subversion/branches/subtree-mergeinfo/subversion/svn/main.c:876734-878766 +/subversion/branches/svn-mergeinfo-enhancements/subversion/svn/main.c:870119-870195,870197-870288 +/subversion/branches/svn-patch-improvements/subversion/svn/main.c:918519-934609 +/subversion/branches/svnpatch-diff/subversion/svn/main.c:865738-876477 +/subversion/branches/svnraisetc/subversion/svn/main.c:874709-875149 +/subversion/branches/svnserve-logging/subversion/svn/main.c:869828-870893 +/subversion/branches/tc-issue-3334/subversion/svn/main.c:874697-874773 +/subversion/branches/tc-merge-notify/subversion/svn/main.c:874017-874062 +/subversion/branches/tc-resolve/subversion/svn/main.c:874191-874239 +/subversion/branches/tc_url_rev/subversion/svn/main.c:874351-874483 +/subversion/branches/tree-conflicts/subversion/svn/main.c:868291-873154 +/subversion/branches/tree-conflicts-notify/subversion/svn/main.c:873926-874008 +/subversion/branches/uris-as-urls/subversion/svn/main.c:1060426-1064427 +/subversion/trunk/subversion/svn/main.c:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146762,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147299,1147309,1147882,1148071,1148083,1148094,1148131,1148374,1148424,1148566,1148588,1148652,1148662,1148699,1148853,1148877,1148882,1148936,1149103,1149105,1149135,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149401,1149539,1149572,1149627,1149675,1149701,1149713,1150242,1150254,1150260-1150261,1150266,1150302,1150327,1150344,1150368,1150372,1150441,1150506,1150812,1150853,1151036,1151177,1151610,1151854,1151906,1151911,1152129,1152140,1152189-1152190,1152267,1152282,1152286,1152726,1152809,1153138,1153141,1153416,1153540,1153566,1153799,1153807,1153968,1154009,1154023,1154115,1154119,1154121,1154144,1154155,1154159,1154165,1154215,1154225,1154273,1154278,1154379,1154382,1154461,1154717-1154718,1154733,1154908,1154982,1155015,1155044,1155124,1155131,1155160,1155313,11553 34,1155391,1155404,1156085,1156098,1156216,1156218,1156312,1156527,1156717,1156721,1156750,1156827,1156838,1157416,1158187,1158193-1158194,1158196,1158201,1158207,1158209-1158210,1158217,1158285,1158288,1158303,1158309,1158407,1158419,1158421,1158436,1158455,1158616-1158617,1158634,1158854,1158875,1158886,1158893,1158896,1158919,1158923-1158924,1158929,1158963,1159093,1159098,1159101,1159132,1159136,1159148,1159230,1159275,1159400,1159686,1159760,1159772,1160605,1160671,1160682,1160704-1160705,1160756,1161063,1161080,1161185,1161210,1161683,1161721,1162024,1162033,1162201,1162516,1162880,1162974,1162995,1163243,1163372,1163383,1163557,1163792,1163953,1164027,1164116,1164386,1164426,1164517,1164535,1164554,1164580,1164614,1164645,1164760,1164765,1164929,1166267,1166500,1166555,1166678,1167062,1167173,1167209,1167269,1167503,1167659,1167681,1169524,1169531,1169650,1171708,1173111,1173425,1173639,1174051,1174060,1174342,1174652,1174761,1174797-1174798,1174806,1175888,1176915,1176949,11 77001,1177492,1177732,1178280,1178282,1178942,1179680,1179767,1179776,1180154,1181090,1181110,1181155,1181215,1181609,1181666,1182115,1182527,1182771,1182904,1182909,1183054,1183263,1183347,1185222,1185242,1185280,1185282,1185730,1185738,1185746,1185763,1185768,1185886,1185911,1185918,1186059,1186092,1186101,1186107,1186109,1186121,1186231,1186240,1186422,1186434,1186732,1186755,1186784,1186815,1186928,1186944,1186981,1186983,1187311,1187676,1187695,1188609,1188652,1188677,1188762,1188774,1189190,1189261,1189395,1189580,1189665,1190463,1195480,1197135,1197998,1199876,1199950,1200277,1200837,1200896,1201002,1201072,1201419,1201824,1202132,1202135,1202187,1202333,1202630,1202807,1203546,1203651,1203653,1203977,1204167,1204478,1204610,1204673,1205188,1205193,1205209,1205726,1205839,1205848,1205968,1206523,1206533,1206576,1206718-1206719,1206724,1206741,1206748,1207555,1207656,1207663,1207808,1207823,1207858,1207949,1208840,1209631,1209654,1210147,1210195,1210913,1211048,1211483,1211859 ,1211885,1212476,1212482,1212484,1213331,1213673,1213681,1213690,1213711,1213716,1214139,1215260,1215288,1215374-1215375,1215379,1220740,1220742,1220750,1220861,1221178,1221303,1221767,1221780,1221793,1222521,1222628,1222644,1222693,1222699,1225491,1226597,1227146,1227237,1227250,1227352,1227372,1227384-1227385,1227900,1228340,1229252,1229303,1229677,1229833,1229980,1230212,1230714,1230798,1231029,1231944-1231945,1232202,1232207,1232221-1232222,1232267,1232413,1233292,1235264,1235296,1235302,1235736,1236163,1236173,1236283,1236343,1237720,1237779,1238121,1239382,1239596,1239631,1239655,1239747,1240314,1240485,1240619,1240752,1241530,1241553,1241599,1241626,1241713,1241726,1242116,1242537,1242607,1242759,1242770,1242794,1243694,1243840,1243920,1243976,1244303,1244317,1244466,1244551,1245284-1245285,1245711,1245738,1245746,1245764,1245809,1245817,1245929,1245935,1291429,1291446,1291520,1291594,1291680,1291685,1291700,1291704,1291726,1291729,1291797,1291810,1291941,1292090,1292248,1292 255,1292260,1292296,1292322,1292507,1292516,1292768,1292827,1292926,1293229,1293577,1293945,1293972,1293976,1293998,1294134,1294136,1294147,1294236,1294470,1294586,1295007,1295303,1295372,1295418,1296251,1296303,1296369,1296691,1297522,1298343,1300265,1302399,1302417,1302539,1302588,1302591,1302613,1305853,1306111,1306275,1306334,1307177,1309865,1309992,1310378,1310428,1310535,1310594,1311702,1311747,1311935,1325361,1327474,1327490,1327495,1327979,1328002,1328038,1328144,1328267-1328268,1328353,1328846-1328847,1328852,1328878,1329388,1329417,1329876,1330258,1330382,1330444,1330520,1335104,1335555,1337441,1338291,1338297,1338314,1338688,1338708,1338713,1338739,1338748,1338810,1339159,1339164,1340556,1341012,1341031,1341034,1341076,1341544,1341560,1342984,1344864-1344865,1344869,1345482,1345740,1346765,1348822,1349215,1349367,1349371,1349380,1349778,1351117,1351772,1352031,1352068,1353572,1354626,1354652,1354876,1354907,1355340,1361007,1361019,1361341,1362508,1365519,1365549,1365554,1 365556,1365592,1367498,1368065,1368128,1368197-1368198,1371282,1374198,1374800,1374802,1375052,1375089,1376414,1378847,1380175,1380295,1380697,1382843,1383029,1383466,1383483,1383946,1386594,1386601,1387226,1387943,1388975,1389364,1389499,1389658,1389851,1389878,1389928,1390653,1390965,1391020,1391022,1391641,1391935,1392502,1392599,1393061,1393156,1393165,1393542,1393551,1393598,1394519,1396285,1398100,1399174,1401915,1402417,1402421,1403258,1403583,1403588,1403691,1403964,1403982,1404912,1405922,1407131,1407812,1408650,1409146,1409939,1410106,1410203,1413402,1419670-1419681,1421011,1421103,1421380,1421541,1422053,1422100,1423585,1423646,1423837,1423840,1423848,1424977,1425368,1426138,1426264,1426752,1426830,1427197,1427210,1427278,1429201,1434128,1434405,1434414,1434418,1434435,1434476,1434750,1435361,1438602,1438683,1441810,1443763,1443929,1445753,1451678,1452617,1452780,1452967,1453780,1454088,1454217,1455352,1458341,1459599,1461278,1461562,1461580,1461701,1461743,1461760,146204 1,1462293,1462300,1462302,1462321,1462334,1465975,1476359,1477730,1481010,1481627,1482282,1483781,1485350,1490684,1496127,1503528,1507044,1512432,1512471-1512472,1513463,1513472,1514763,1515119,1515237,1515992,1515997,1516023-1516024,1516051-1516052,1516565,1516806,1518184,1520529,1520532,1520539,1522892,1524869,1527103,1527105,1535551,1535591,1537360,1537415,1537555,1537700,1539309,1541705,1541790,1542042,1542069,1542071,1542119,1542129,1542610,1544295,1544316,1545835,1545845,1550691,1550772,1551579,1557320,1560690,1561237,1563066-1563068,1564215,1564576,1564966,1564969,1565531,1566503,1567492,1567494,1568180,1568349,1568872,1569069,1574868,1577200,1577739,1577755,1580626,1580650,1587968,1588772,1590212,1591123,1594156,1595431,1600909,1615219,1615255-1615256,1636874,1637826,1640730,1640862,1640873,1641564,1643033,1643409,1643437,1643457,1643793,1643810,1643972 +/subversion/trunk/subversion/svn/svn.c:1475724 Modified: subversion/branches/1.7.x-issue4340-repos/subversion/svnserve/cyrus_auth.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4340-repos/subversion/svnserve/cyrus_auth.c?rev=1645439&r1=1645438&r2=1645439&view=diff ============================================================================== --- subversion/branches/1.7.x-issue4340-repos/subversion/svnserve/cyrus_auth.c (original) +++ subversion/branches/1.7.x-issue4340-repos/subversion/svnserve/cyrus_auth.c Sun Dec 14 11:44:03 2014 @@ -98,7 +98,7 @@ static int canonicalize_username(sasl_co static sasl_callback_t callbacks[] = { - { SASL_CB_CANON_USER, canonicalize_username, NULL }, + { SASL_CB_CANON_USER, (int (*)(void))canonicalize_username, NULL }, { SASL_CB_LIST_END, NULL, NULL } }; Modified: subversion/branches/1.7.x-issue4340-repos/subversion/svnserve/main.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4340-repos/subversion/svnserve/main.c?rev=1645439&r1=1645438&r2=1645439&view=diff ============================================================================== --- subversion/branches/1.7.x-issue4340-repos/subversion/svnserve/main.c (original) +++ subversion/branches/1.7.x-issue4340-repos/subversion/svnserve/main.c Sun Dec 14 11:44:03 2014 @@ -51,6 +51,7 @@ #include "svn_private_config.h" #include "private/svn_dep_compat.h" +#include "private/svn_atomic.h" #include "winservice.h" #ifdef HAVE_UNISTD_H @@ -342,11 +343,44 @@ static apr_status_t redirect_stdout(void return apr_file_dup2(out_file, err_file, pool); } +#if APR_HAS_THREADS +/* The pool passed to apr_thread_create can only be released when both + + A: the call to apr_thread_create has returned to the calling thread + B: the new thread has started running and reached apr_thread_start_t + + So we set the atomic counter to 2 then both the calling thread and + the new thread decrease it and when it reaches 0 the pool can be + released. */ +struct shared_pool_t { + svn_atomic_t count; + apr_pool_t *pool; +}; + +static struct shared_pool_t * +attach_shared_pool(apr_pool_t *pool) +{ + struct shared_pool_t *shared = apr_palloc(pool, sizeof(struct shared_pool_t)); + + shared->pool = pool; + svn_atomic_set(&shared->count, 2); + + return shared; +} + +static void +release_shared_pool(struct shared_pool_t *shared) +{ + if (svn_atomic_dec(&shared->count) == 0) + svn_pool_destroy(shared->pool); +} +#endif + /* "Arguments" passed from the main thread to the connection thread */ struct serve_thread_t { svn_ra_svn_conn_t *conn; serve_params_t *params; - apr_pool_t *pool; + struct shared_pool_t *shared_pool; }; #if APR_HAS_THREADS @@ -354,8 +388,8 @@ static void * APR_THREAD_FUNC serve_thre { struct serve_thread_t *d = data; - svn_error_clear(serve(d->conn, d->params, d->pool)); - svn_pool_destroy(d->pool); + svn_error_clear(serve(d->conn, d->params, d->shared_pool->pool)); + release_shared_pool(d->shared_pool); return NULL; } @@ -369,8 +403,9 @@ static svn_error_t *write_pid_file(const const char *contents = apr_psprintf(pool, "%" APR_PID_T_FMT "\n", getpid()); + SVN_ERR(svn_io_remove_file2(filename, TRUE, pool)); SVN_ERR(svn_io_file_open(&file, filename, - APR_WRITE | APR_CREATE | APR_TRUNCATE, + APR_WRITE | APR_CREATE | APR_EXCL, APR_OS_DEFAULT, pool)); SVN_ERR(svn_io_file_write_full(file, contents, strlen(contents), NULL, pool)); @@ -420,6 +455,7 @@ int main(int argc, const char *argv[]) #if APR_HAS_THREADS apr_threadattr_t *tattr; apr_thread_t *tid; + struct shared_pool_t *shared_pool; struct serve_thread_t *thread_data; #endif @@ -928,7 +964,9 @@ int main(int argc, const char *argv[]) connection_pool) == APR_CHILD_DONE) ; } - if (APR_STATUS_IS_EINTR(status)) + if (APR_STATUS_IS_EINTR(status) + || APR_STATUS_IS_ECONNABORTED(status) + || APR_STATUS_IS_ECONNRESET(status)) { svn_pool_destroy(connection_pool); continue; @@ -1011,6 +1049,7 @@ int main(int argc, const char *argv[]) particularly sophisticated strategy for a threaded server, it's little different from forking one process per connection. */ #if APR_HAS_THREADS + shared_pool = attach_shared_pool(connection_pool); status = apr_threadattr_create(&tattr, connection_pool); if (status) { @@ -1030,9 +1069,9 @@ int main(int argc, const char *argv[]) thread_data = apr_palloc(connection_pool, sizeof(*thread_data)); thread_data->conn = conn; thread_data->params = ¶ms; - thread_data->pool = connection_pool; + thread_data->shared_pool = shared_pool; status = apr_thread_create(&tid, tattr, serve_thread, thread_data, - connection_pool); + shared_pool->pool); if (status) { err = svn_error_wrap_apr(status, _("Can't create thread")); @@ -1040,6 +1079,7 @@ int main(int argc, const char *argv[]) svn_error_clear(err); exit(1); } + release_shared_pool(shared_pool); #endif break; Propchange: subversion/branches/1.7.x-issue4340-repos/subversion/svnserve/main.c ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Dec 14 11:44:03 2014 @@ -1,6 +1,8 @@ /subversion/1.7.x-issue4059/subversion/svnserve/main.c:1239661-1239744 /subversion/branches/1.5.x-r30215/subversion/svnserve/main.c:870312 +/subversion/branches/1.7.x/subversion/svnserve/main.c:1480943-1645438 /subversion/branches/1.7.x-JavaHL-pools/subversion/svnserve/main.c:1158684-1158722 +/subversion/branches/1.7.x-gssapi-solaris10/subversion/svnserve/main.c:1453164-1515067 /subversion/branches/1.7.x-issue3888/subversion/svnserve/main.c:1148937-1149162 /subversion/branches/1.7.x-issue3975/subversion/svnserve/main.c:1160761-1161546 /subversion/branches/1.7.x-issue3976/subversion/svnserve/main.c:1161731-1165397 @@ -13,12 +15,21 @@ /subversion/branches/1.7.x-issue4102/subversion/svnserve/main.c:1292401-1295402 /subversion/branches/1.7.x-issue4123/subversion/svnserve/main.c:1293358-1293812 /subversion/branches/1.7.x-issue4144/subversion/svnserve/main.c:1305854-1306143 +/subversion/branches/1.7.x-issue4153/subversion/svnserve/main.c:1309894-1539233 /subversion/branches/1.7.x-issue4161/subversion/svnserve/main.c:1330697-1331209 /subversion/branches/1.7.x-issue4166/subversion/svnserve/main.c:1330474-1336071 /subversion/branches/1.7.x-issue4169/subversion/svnserve/main.c:1330537-1336116 +/subversion/branches/1.7.x-issue4257/subversion/svnserve/main.c:1454456-1461404 +/subversion/branches/1.7.x-issue4263/subversion/svnserve/main.c:1423588-1434547 +/subversion/branches/1.7.x-issue4270/subversion/svnserve/main.c:1433737-1485341 +/subversion/branches/1.7.x-issue4306/subversion/svnserve/main.c:1438872-1514941 +/subversion/branches/1.7.x-issue4332/subversion/svnserve/main.c:1453478-1460963 +/subversion/branches/1.7.x-issue4340/subversion/svnserve/main.c:1461589-1485180 +/subversion/branches/1.7.x-issue4408/subversion/svnserve/main.c:1512143-1514943 /subversion/branches/1.7.x-issue4k/subversion/svnserve/main.c:1166502-1167193 /subversion/branches/1.7.x-log-diff/subversion/svnserve/main.c:1295670-1295699 /subversion/branches/1.7.x-neon-default/subversion/svnserve/main.c:1148803-1158680 +/subversion/branches/1.7.x-neon-properr/subversion/svnserve/main.c:1440619-1461944 /subversion/branches/1.7.x-r1152189/subversion/svnserve/main.c:1152759-1154249 /subversion/branches/1.7.x-r1155160/subversion/svnserve/main.c:1158704-1159223 /subversion/branches/1.7.x-r1159093/subversion/svnserve/main.c:1159097-1159230 @@ -34,6 +45,7 @@ /subversion/branches/1.7.x-r1306111/subversion/svnserve/main.c:1306301-1331207 /subversion/branches/1.7.x-r1341012/subversion/svnserve/main.c:1341013-1355629 /subversion/branches/1.7.x-r1348822/subversion/svnserve/main.c:1348878-1355700 +/subversion/branches/1.7.x-r1352031/subversion/svnserve/main.c:1431725-1435017 /subversion/branches/1.7.x-r1352068/subversion/svnserve/main.c:1352087-1364232 /subversion/branches/1.7.x-r1361007/subversion/svnserve/main.c:1361110-1367853 /subversion/branches/1.7.x-r1361341/subversion/svnserve/main.c:1361342-1367855 @@ -45,7 +57,17 @@ /subversion/branches/1.7.x-r1389878/subversion/svnserve/main.c:1389879-1393126 /subversion/branches/1.7.x-r1389928/subversion/svnserve/main.c:1390384-1391747 /subversion/branches/1.7.x-r1398325/subversion/svnserve/main.c:1398353-1398633 +/subversion/branches/1.7.x-r1399174/subversion/svnserve/main.c:1399176-1403964 +/subversion/branches/1.7.x-r1401915/subversion/svnserve/main.c:1401934-1407349 +/subversion/branches/1.7.x-r1407131/subversion/svnserve/main.c:1407164-1419607 /subversion/branches/1.7.x-r1423646/subversion/svnserve/main.c:1423647-1424282 +/subversion/branches/1.7.x-r1426752/subversion/svnserve/main.c:1426753-1485335 +/subversion/branches/1.7.x-r1427278/subversion/svnserve/main.c:1433724-1485338 +/subversion/branches/1.7.x-r1461743/subversion/svnserve/main.c:1461745-1482189 +/subversion/branches/1.7.x-r1475724/subversion/svnserve/main.c:1475743-1482192 +/subversion/branches/1.7.x-r1481010/subversion/svnserve/main.c:1481034-1482194 +/subversion/branches/1.7.x-r1482759/subversion/svnserve/main.c:1483584-1485046 +/subversion/branches/1.7.x-r1507044/subversion/svnserve/main.c:1507300-1511568 /subversion/branches/1.7.x-serf-server-root-segfaults/subversion/svnserve/main.c:1383952-1392726 /subversion/branches/1.7.x-svn-patch-eol-fixes/subversion/svnserve/main.c:1207511-1235924 /subversion/branches/atomic-revprop/subversion/svnserve/main.c:965046-1000689 @@ -102,4 +124,5 @@ /subversion/branches/tree-conflicts/subversion/svnserve/main.c:868291-873154 /subversion/branches/tree-conflicts-notify/subversion/svnserve/main.c:873926-874008 /subversion/branches/uris-as-urls/subversion/svnserve/main.c:1060426-1064427 -/subversion/trunk/subversion/svnserve/main.c:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146762,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147299,1147309,1147882,1148071,1148083,1148094,1148131,1148374,1148424,1148566,1148588,1148652,1148662,1148699,1148853,1148877,1148882,1148936,1149103,1149105,1149135,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149401,1149539,1149572,1149627,1149675,1149701,1149713,1150242,1150254,1150260-1150261,1150266,1150302,1150327,1150344,1150368,1150372,1150441,1150506,1150812,1150853,1151036,1151177,1151610,1151854,1151906,1151911,1152129,1152140,1152189-1152190,1152267,1152282,1152286,1152726,1152809,1153138,1153141,1153416,1153540,1153566,1153799,1153807,1153968,1154009,1154023,1154115,1154119,1154121,1154144,1154155,1154159,1154165,1154215,1154225,1154273,1154278,1154379,1154382,1154461,1154717-1154718,1154733,1154908,1154982,1155015,1155044,1155124,1155131,1155160,1155313, 1155334,1155391,1155404,1156085,1156098,1156216,1156218,1156312,1156527,1156717,1156721,1156750,1156827,1156838,1157416,1158187,1158193-1158194,1158196,1158201,1158207,1158209-1158210,1158217,1158285,1158288,1158303,1158309,1158407,1158419,1158421,1158436,1158455,1158616-1158617,1158634,1158854,1158875,1158886,1158893,1158896,1158919,1158923-1158924,1158929,1158963,1159093,1159098,1159101,1159132,1159136,1159148,1159230,1159275,1159400,1159686,1159760,1159772,1160605,1160671,1160682,1160704-1160705,1160756,1161063,1161080,1161185,1161210,1161683,1161721,1162024,1162033,1162201,1162516,1162880,1162974,1162995,1163243,1163372,1163383,1163557,1163792,1163953,1164027,1164386,1164426,1164517,1164535,1164554,1164580,1164614,1164645,1164760,1164765,1164929,1166267,1166500,1166555,1166678,1167062,1167173,1167209,1167269,1167503,1167659,1167681,1169524,1169531,1169650,1171708,1173111,1173425,1173639,1174051,1174060,1174342,1174652,1174761,1174797-1174798,1174806,1175888,1176915,1176949,11770 01,1177492,1177732,1178280,1178282,1178942,1179680,1179767,1179776,1180154,1181090,1181110,1181155,1181215,1181609,1181666,1182115,1182527,1182771,1182904,1182909,1183054,1183263,1183347,1185222,1185242,1185280,1185282,1185730,1185738,1185746,1185763,1185768,1185886,1185911,1185918,1186059,1186092,1186101,1186107,1186109,1186121,1186231,1186240,1186422,1186434,1186732,1186755,1186784,1186815,1186928,1186944,1186981,1186983,1187311,1187676,1187695,1188609,1188652,1188677,1188762,1188774,1189190,1189261,1189395,1189580,1189665,1190463,1195480,1197135,1197998,1199876,1199950,1200277,1200837,1200896,1201002,1201072,1201419,1201824,1202132,1202135,1202187,1202333,1202630,1202807,1203546,1203651,1203653,1203977,1204167,1204478,1204610,1204673,1205188,1205193,1205209,1205726,1205839,1205848,1205968,1206523,1206533,1206576,1206718-1206719,1206724,1206741,1206748,1207555,1207656,1207663,1207808,1207823,1207858,1207949,1208840,1209631,1209654,1210147,1210195,1210913,1211048,1211483,1211859,12 11885,1212476,1212482,1212484,1213331,1213673,1213681,1213690,1213711,1213716,1214139,1215260,1215288,1215374-1215375,1215379,1220740,1220742,1220750,1220861,1221178,1221303,1221767,1221780,1221793,1222521,1222628,1222644,1222693,1222699,1225491,1226597,1227146,1227237,1227250,1227352,1227372,1227384-1227385,1227900,1228340,1229252,1229303,1229677,1229833,1229980,1230212,1230714,1231029,1231944-1231945,1232202,1232207,1232221-1232222,1232267,1232413,1233292,1235264,1235296,1235302,1235736,1236163,1236173,1236283,1236343,1237720,1238121,1239382,1239596,1239631,1239655,1239747,1240314,1240485,1240619,1240752,1241530,1241553,1241599,1241626,1241713,1241726,1242116,1242537,1242607,1242759,1242770,1242794,1243694,1243840,1243920,1243976,1244303,1244317,1244466,1244551,1245284-1245285,1245711,1245738,1245746,1245764,1245809,1245817,1245929,1245935,1291429,1291446,1291520,1291594,1291680,1291685,1291700,1291704,1291726,1291729,1291797,1291810,1291941,1292090,1292248,1292255,1292260,1292296 ,1292322,1292507,1292516,1292768,1292827,1292926,1293229,1293577,1293945,1293972,1293976,1293998,1294134,1294136,1294147,1294236,1294470,1294586,1295007,1295303,1295372,1296251,1296303,1296369,1296691,1297522,1298343,1300265,1302399,1302417,1302539,1302588,1302591,1302613,1305853,1306111,1306334,1307177,1309992,1310378,1310428,1310535,1310594,1311702,1311935,1325361,1327474,1327490,1327495,1327979,1328002,1328038,1328144,1328267-1328268,1328353,1328846-1328847,1328852,1328878,1329388,1329417,1329876,1330258,1330382,1330444,1330520,1335104,1335555,1337441,1338810,1339164,1340556,1341012,1341031,1341034,1341076,1342984,1344864-1344865,1344869,1345482,1346765,1348822,1349215,1349367,1349371,1349380,1349778,1351117,1351772,1352068,1353572,1354626,1354652,1354876,1354907,1355340,1361007,1361019,1361341,1362508,1365519,1365549,1365554,1365556,1365592,1367498,1368065,1368128,1368197-1368198,1371282,1374198,1374800,1374802,1375052,1375089,1376414,1378847,1380175,1380295,1380697,1382843,1383 029,1383466,1383483,1383946,1387226,1387943,1388975,1389364,1389499,1389658,1389851,1389878,1389928,1390965,1391020,1391022,1391641,1391935,1392502,1392599,1393061,1393156,1393165,1393542,1393551,1393598,1396285,1398325,1423646 +/subversion/trunk/subversion/svnserve/main.c:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146762,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147299,1147309,1147882,1148071,1148083,1148094,1148131,1148374,1148424,1148566,1148588,1148652,1148662,1148699,1148853,1148877,1148882,1148936,1149103,1149105,1149135,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149401,1149539,1149572,1149627,1149675,1149701,1149713,1150242,1150254,1150260-1150261,1150266,1150302,1150327,1150344,1150368,1150372,1150441,1150506,1150812,1150853,1151036,1151177,1151610,1151854,1151906,1151911,1152129,1152140,1152189-1152190,1152267,1152282,1152286,1152726,1152809,1153138,1153141,1153416,1153540,1153566,1153799,1153807,1153968,1154009,1154023,1154115,1154119,1154121,1154144,1154155,1154159,1154165,1154215,1154225,1154273,1154278,1154379,1154382,1154461,1154717-1154718,1154733,1154908,1154982,1155015,1155044,1155124,1155131,1155160,1155313, 1155334,1155391,1155404,1156085,1156098,1156216,1156218,1156312,1156527,1156717,1156721,1156750,1156827,1156838,1157416,1158187,1158193-1158194,1158196,1158201,1158207,1158209-1158210,1158217,1158285,1158288,1158303,1158309,1158407,1158419,1158421,1158436,1158455,1158616-1158617,1158634,1158854,1158875,1158886,1158893,1158896,1158919,1158923-1158924,1158929,1158963,1159093,1159098,1159101,1159132,1159136,1159148,1159230,1159275,1159400,1159686,1159760,1159772,1160605,1160671,1160682,1160704-1160705,1160756,1161063,1161080,1161185,1161210,1161683,1161721,1162024,1162033,1162201,1162516,1162880,1162974,1162995,1163243,1163372,1163383,1163557,1163792,1163953,1164027,1164116,1164386,1164426,1164517,1164535,1164554,1164580,1164614,1164645,1164760,1164765,1164929,1166267,1166500,1166555,1166678,1167062,1167173,1167209,1167269,1167503,1167659,1167681,1169524,1169531,1169650,1171708,1173111,1173425,1173639,1174051,1174060,1174342,1174652,1174761,1174797-1174798,1174806,1175888,1176915,11769 49,1177001,1177492,1177732,1178280,1178282,1178942,1179680,1179767,1179776,1180154,1181090,1181110,1181155,1181215,1181609,1181666,1182115,1182527,1182771,1182904,1182909,1183054,1183263,1183347,1185222,1185242,1185280,1185282,1185730,1185738,1185746,1185763,1185768,1185886,1185911,1185918,1186059,1186092,1186101,1186107,1186109,1186121,1186231,1186240,1186422,1186434,1186732,1186755,1186784,1186815,1186928,1186944,1186981,1186983,1187311,1187676,1187695,1188609,1188652,1188677,1188762,1188774,1189190,1189261,1189395,1189580,1189665,1190463,1195480,1197135,1197998,1199876,1199950,1200277,1200837,1200896,1201002,1201072,1201419,1201824,1202132,1202135,1202187,1202333,1202630,1202807,1203546,1203651,1203653,1203977,1204167,1204478,1204610,1204673,1205188,1205193,1205209,1205726,1205839,1205848,1205968,1206523,1206533,1206576,1206718-1206719,1206724,1206741,1206748,1207555,1207656,1207663,1207808,1207823,1207858,1207949,1208840,1209631,1209654,1210147,1210195,1210913,1211048,1211483,12 11859,1211885,1212476,1212482,1212484,1213331,1213673,1213681,1213690,1213711,1213716,1214139,1215260,1215288,1215374-1215375,1215379,1220740,1220742,1220750,1220861,1221178,1221303,1221767,1221780,1221793,1222521,1222628,1222644,1222693,1222699,1225491,1226597,1227146,1227237,1227250,1227352,1227372,1227384-1227385,1227900,1228340,1229252,1229303,1229677,1229833,1229980,1230212,1230714,1230798,1231029,1231944-1231945,1232202,1232207,1232221-1232222,1232267,1232413,1233292,1235264,1235296,1235302,1235736,1236163,1236173,1236283,1236343,1237720,1237779,1238121,1239382,1239596,1239631,1239655,1239747,1240314,1240485,1240619,1240752,1241530,1241553,1241599,1241626,1241713,1241726,1242116,1242537,1242607,1242759,1242770,1242794,1243694,1243840,1243920,1243976,1244303,1244317,1244466,1244551,1245284-1245285,1245711,1245738,1245746,1245764,1245809,1245817,1245929,1245935,1291429,1291446,1291520,1291594,1291680,1291685,1291700,1291704,1291726,1291729,1291797,1291810,1291941,1292090,1292248 ,1292255,1292260,1292296,1292322,1292507,1292516,1292768,1292827,1292926,1293229,1293577,1293945,1293972,1293976,1293998,1294134,1294136,1294147,1294236,1294470,1294586,1295007,1295303,1295372,1295418,1296251,1296303,1296369,1296691,1297522,1298343,1300265,1302399,1302417,1302539,1302588,1302591,1302613,1305853,1306111,1306275,1306334,1307177,1309865,1309992,1310378,1310428,1310535,1310594,1311702,1311935,1325361,1327474,1327490,1327495,1327979,1328002,1328038,1328144,1328267-1328268,1328353,1328846-1328847,1328852,1328878,1329388,1329417,1329876,1330258,1330382,1330444,1330520,1335104,1335555,1337441,1338291,1338297,1338314,1338688,1338708,1338713,1338739,1338748,1338810,1339159,1339164,1340556,1341012,1341031,1341034,1341076,1341544,1341560,1342984,1344864-1344865,1344869,1345482,1345740,1346765,1348822,1349215,1349367,1349371,1349380,1349778,1351117,1351772,1352031,1352068,1353572,1354626,1354652,1354876,1354907,1355340,1361007,1361019,1361341,1362508,1365519,1365549,1365554,1365 556,1365592,1367498,1368065,1368128,1368197-1368198,1371282,1374198,1374800,1374802,1375052,1375089,1376414,1378847,1380175,1380295,1380697,1382843,1383029,1383466,1383483,1383946,1387226,1387943,1388975,1389364,1389499,1389658,1389851,1389878,1389928,1390653,1390965,1391020,1391022,1391641,1391935,1392502,1392599,1393061,1393156,1393165,1393542,1393551,1393598,1394519,1396285,1398100,1398325,1399174,1401915,1402417,1402421,1403258,1403583,1403588,1403691,1403964,1403982,1405922,1407131,1407812,1408650,1409146,1409939,1410106,1410203,1419670-1419681,1421011,1421103,1421380,1421541,1422053,1422100,1423585,1423646,1423837,1423840,1423848,1424977,1425368,1426138,1426264,1426752,1426830,1427197,1427210,1427278,1429201,1434128,1434405,1434414,1434418,1434435,1434476,1434750,1435361,1438602,1438683,1441810,1443763,1443929,1445753,1451678,1452617,1452780,1452967,1453780,1454088,1454217,1455352,1458341,1459599,1461278,1461562,1461580,1461701,1461743,1462293,1462300,1462302,1462321,1462334,1 465975,1476359,1477730,1481010,1481627,1482282,1483781,1485350,1490684,1503528,1507044,1512432,1512471-1512472,1513463,1513472,1514763,1515119,1515237,1515992,1515997,1516023-1516024,1516051-1516052,1516565 +/subversion/trunk/subversion/svnserve/svnserve.c:1481010,1482759,1482779,1516556 Propchange: subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/basic_tests.py ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Dec 14 11:44:03 2014 @@ -1,9 +1,11 @@ /subversion/branches/1.5.x-r30215/subversion/tests/cmdline/basic_tests.py:870312 +/subversion/branches/1.7.x/subversion/tests/cmdline/basic_tests.py:1480943-1645438 /subversion/branches/1.7.x-JavaHL-pools/subversion/tests/cmdline/basic_tests.py:1158684-1158722 /subversion/branches/1.7.x-issue3888/subversion/tests/cmdline/basic_tests.py:1148937-1149162 /subversion/branches/1.7.x-issue3975/subversion/tests/cmdline/basic_tests.py:1160761-1161546 /subversion/branches/1.7.x-issue3976/subversion/tests/cmdline/basic_tests.py:1161731-1165397 /subversion/branches/1.7.x-issue4087/subversion/tests/cmdline/basic_tests.py:1243707-1336073 +/subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/basic_tests.py:1309894-1539233 /subversion/branches/1.7.x-issue4169/subversion/tests/cmdline/basic_tests.py:1330537-1336116 /subversion/branches/1.7.x-issue4k/subversion/tests/cmdline/basic_tests.py:1166502-1167193 /subversion/branches/1.7.x-neon-default/subversion/tests/cmdline/basic_tests.py:1148803-1158680 Modified: subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/blame_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/blame_tests.py?rev=1645439&r1=1645438&r2=1645439&view=diff ============================================================================== --- subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/blame_tests.py (original) +++ subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/blame_tests.py Sun Dec 14 11:44:03 2014 @@ -858,6 +858,98 @@ def blame_multiple_targets(sbox): multiple_wc_targets() multiple_url_targets() +@Issue(4034) +def blame_eol_handling(sbox): + "blame it on the eol handling" + + sbox.build() + + if os.name == 'nt': + native_eol = '\r\n' + else: + native_eol = '\n' + + for eol, prop, rev in [ ('\r', 'CR', 2), + ('\n', 'LF', 4), + ('\r\n', 'CRLF', 6), + (native_eol, 'native', 8) ]: + + f1 = sbox.ospath('blame-%s' % prop) + f2 = sbox.ospath('blame-%s-prop' % prop) + + file_data = 'line 1 ' + eol + \ + 'line 2 ' + eol + \ + 'line 3 ' + eol + \ + 'line 4 ' + eol + \ + 'line 5 ' + eol + + svntest.main.file_write(f1, file_data, mode='wb') + svntest.main.file_write(f2, file_data, mode='wb') + + sbox.simple_add('blame-%s' % prop, + 'blame-%s-prop' % prop) + sbox.simple_propset('svn:eol-style', prop, 'blame-%s-prop' % prop) + sbox.simple_commit() + + file_data = 'line 1 ' + eol + \ + 'line 2 ' + eol + \ + 'line 2a' + eol + \ + 'line 3 ' + eol + \ + 'line 4 ' + eol + \ + 'line 4a' + eol + \ + 'line 5 ' + eol + + svntest.main.file_write(f1, file_data, mode='wb') + svntest.main.file_write(f2, file_data, mode='wb') + + sbox.simple_commit() + + expected_output = [ + ' %d jrandom line 1 \n' % rev, + ' %d jrandom line 2 \n' % rev, + ' %d jrandom line 2a\n' % (rev + 1), + ' %d jrandom line 3 \n' % rev, + ' %d jrandom line 4 \n' % rev, + ' %d jrandom line 4a\n' % (rev + 1), + ' %d jrandom line 5 \n' % rev, + ] + + svntest.actions.run_and_verify_svn(f1 + '-base', expected_output, [], + 'blame', f1) + + svntest.actions.run_and_verify_svn(f2 + '-base', expected_output, [], + 'blame', f2) + + file_data = 'line 1 ' + eol + \ + 'line 2 ' + eol + \ + 'line 2a' + eol + \ + 'line 3 ' + eol + \ + 'line 3b' + eol + \ + 'line 4 ' + eol + \ + 'line 4a' + eol + \ + 'line 5 ' + eol + + svntest.main.file_write(f1, file_data, mode='wb') + svntest.main.file_write(f2, file_data, mode='wb') + + expected_output = [ + ' %d jrandom line 1 \n' % rev, + ' %d jrandom line 2 \n' % rev, + ' %d jrandom line 2a\n' % (rev + 1), + ' %d jrandom line 3 \n' % rev, + ' - - line 3b\n', + ' %d jrandom line 4 \n' % rev, + ' %d jrandom line 4a\n' % (rev + 1), + ' %d jrandom line 5 \n' % rev, + ] + + svntest.actions.run_and_verify_svn(f1 + '-modified', expected_output, [], + 'blame', f1) + + svntest.actions.run_and_verify_svn(f2 + '-modified', expected_output, [], + 'blame', f2) + + ######################################################################## # Run the tests @@ -880,6 +972,7 @@ test_list = [ None, blame_output_after_merge, merge_sensitive_blame_and_empty_mergeinfo, blame_multiple_targets, + blame_eol_handling, ] if __name__ == '__main__': Modified: subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/checkout_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/checkout_tests.py?rev=1645439&r1=1645438&r2=1645439&view=diff ============================================================================== --- subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/checkout_tests.py (original) +++ subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/checkout_tests.py Sun Dec 14 11:44:03 2014 @@ -27,6 +27,7 @@ # General modules import sys, re, os, time, subprocess +import datetime # Our testing module import svntest @@ -658,11 +659,28 @@ def checkout_peg_rev_date(sbox): sbox.build() wc_dir = sbox.wc_dir - # note the current time to use it as peg revision date. - current_time = time.strftime("%Y-%m-%dT%H:%M:%S") - - # sleep till the next second. - time.sleep(1.1) + ## Get svn:date. + exit_code, output, errput = svntest.main.run_svn(None, 'propget', 'svn:date', + '--revprop', '-r1', + '--strict', + sbox.repo_url) + if exit_code or errput != [] or len(output) != 1: + raise svntest.Failure("svn:date propget failed") + r1_string = output[0] + + ## Increment the svn:date date by one microsecond. + # TODO: pass tzinfo=UTC to datetime.datetime() + date_pattern = re.compile(r'(\d+)-(\d+)-(\d+)T(\d\d):(\d\d):(\d\d)\.(\d+)Z$') + r1_time = datetime.datetime(*map(int, date_pattern.match(r1_string).groups())) + peg_time = r1_time + datetime.timedelta(microseconds=1) + assert r1_time != peg_time + # peg_string is, by all likelihood, younger than r1's svn:date and older than + # r2's svn:date. It is also not equal to either of them, so we test the + # binary search of svn:date values. + peg_string = '%04d-%02d-%02dT%02d:%02d:%02d.%06dZ' % \ + tuple(getattr(peg_time, x) + for x in ["year", "month", "day", "hour", "minute", + "second", "microsecond"]) # create a new revision mu_path = os.path.join(wc_dir, 'A', 'mu') @@ -671,7 +689,7 @@ def checkout_peg_rev_date(sbox): svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', 'changed file mu', wc_dir) - # now checkout the repo@current_time in another folder, this should create our + # now checkout the repo@peg_string in another folder, this should create our # initial wc without the change in mu. checkout_target = sbox.add_wc_path('checkout') os.mkdir(checkout_target) @@ -684,7 +702,24 @@ def checkout_peg_rev_date(sbox): # use an old date to checkout, that way we're sure we get the first revision svntest.actions.run_and_verify_checkout(sbox.repo_url + - '@{' + current_time + '}', + '@{' + peg_string + '}', + checkout_target, + expected_output, + expected_wc) + + # now try another checkout with repo@r1_string + checkout_target = sbox.add_wc_path('checkout2') + os.mkdir(checkout_target) + + expected_output = svntest.main.greek_state.copy() + expected_output.wc_dir = checkout_target + expected_output.tweak(status='A ', contents=None) + + expected_wc = svntest.main.greek_state.copy() + + # use an old date to checkout, that way we're sure we get the first revision + svntest.actions.run_and_verify_checkout(sbox.repo_url + + '@{' + r1_string + '}', checkout_target, expected_output, expected_wc) @@ -1050,7 +1085,7 @@ def checkout_wc_from_drive(sbox): svntest.main.safe_rmtree(sbox.wc_dir) os.mkdir(sbox.wc_dir) - # create a virtual drive to the working copy folder + # create a virtual drive to the repository folder drive = find_the_next_available_drive_letter() if drive is None: raise svntest.Skip @@ -1086,8 +1121,76 @@ def checkout_wc_from_drive(sbox): }) svntest.actions.run_and_verify_checkout(repo_url, wc_dir, expected_output, expected_wc, - None, None, None, None, - '--force') + None, None, None, None) + + wc2_dir = sbox.add_wc_path('2') + expected_output = wc.State(wc2_dir, { + 'D' : Item(status='A '), + 'D/H' : Item(status='A '), + 'D/H/psi' : Item(status='A '), + 'D/H/chi' : Item(status='A '), + 'D/H/omega' : Item(status='A '), + 'D/G' : Item(status='A '), + 'D/G/tau' : Item(status='A '), + 'D/G/pi' : Item(status='A '), + 'D/G/rho' : Item(status='A '), + 'D/gamma' : Item(status='A '), + 'C' : Item(status='A '), + 'mu' : Item(status='A '), + 'B' : Item(status='A '), + 'B/E' : Item(status='A '), + 'B/E/alpha' : Item(status='A '), + 'B/E/beta' : Item(status='A '), + 'B/F' : Item(status='A '), + 'B/lambda' : Item(status='A '), + }) + + expected_wc = wc.State('', { + 'C' : Item(), + 'B/E/beta' : Item(contents="This is the file 'beta'.\n"), + 'B/E/alpha' : Item(contents="This is the file 'alpha'.\n"), + 'B/lambda' : Item(contents="This is the file 'lambda'.\n"), + 'B/F' : Item(), + 'D/H/omega' : Item(contents="This is the file 'omega'.\n"), + 'D/H/psi' : Item(contents="This is the file 'psi'.\n"), + 'D/H/chi' : Item(contents="This is the file 'chi'.\n"), + 'D/G/rho' : Item(contents="This is the file 'rho'.\n"), + 'D/G/tau' : Item(contents="This is the file 'tau'.\n"), + 'D/G/pi' : Item(contents="This is the file 'pi'.\n"), + 'D/gamma' : Item(contents="This is the file 'gamma'.\n"), + 'mu' : Item(contents="This is the file 'mu'.\n"), + }) + + svntest.actions.run_and_verify_checkout(repo_url + '/A', wc2_dir, + expected_output, expected_wc, + None, None, None, None) + + wc3_dir = sbox.add_wc_path('3') + expected_output = wc.State(wc3_dir, { + 'H' : Item(status='A '), + 'H/psi' : Item(status='A '), + 'H/chi' : Item(status='A '), + 'H/omega' : Item(status='A '), + 'G' : Item(status='A '), + 'G/tau' : Item(status='A '), + 'G/pi' : Item(status='A '), + 'G/rho' : Item(status='A '), + 'gamma' : Item(status='A '), + }) + + expected_wc = wc.State('', { + 'H/chi' : Item(contents="This is the file 'chi'.\n"), + 'H/psi' : Item(contents="This is the file 'psi'.\n"), + 'H/omega' : Item(contents="This is the file 'omega'.\n"), + 'G/pi' : Item(contents="This is the file 'pi'.\n"), + 'G/tau' : Item(contents="This is the file 'tau'.\n"), + 'G/rho' : Item(contents="This is the file 'rho'.\n"), + 'gamma' : Item(contents="This is the file 'gamma'.\n"), + }) + + svntest.actions.run_and_verify_checkout(repo_url + '/A/D', wc3_dir, + expected_output, expected_wc, + None, None, None, None) finally: os.chdir(was_cwd) Modified: subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/commit_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/commit_tests.py?rev=1645439&r1=1645438&r2=1645439&view=diff ============================================================================== --- subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/commit_tests.py (original) +++ subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/commit_tests.py Sun Dec 14 11:44:03 2014 @@ -2877,6 +2877,58 @@ def commit_add_subadd(sbox): svntest.main.run_svn(None, 'commit', '--targets', targets_file, '-mm') +@Issue(4480) +def commit_mergeinfo_ood(sbox): + "commit of mergeinfo that should cause out of date" + + sbox.build() + sbox.simple_rm('A', 'iota') + sbox.simple_commit() # r2 + + sbox.simple_mkdir('trunk', 'branch') + sbox.simple_commit() # r3 + + sbox.simple_append('trunk/a', 'This is a\n') + sbox.simple_add('trunk/a') + sbox.simple_commit() # r4 + + sbox.simple_append('trunk/b', 'This is b\n') + sbox.simple_add('trunk/b') + sbox.simple_commit() # r5 + + sbox.simple_update() # To r5 + + expected_output = [ + '--- Merging r4 into \'%s\':\n' % sbox.ospath('branch'), + 'A %s\n' % sbox.ospath('branch/a'), + '--- Recording mergeinfo for merge of r4' \ + ' into \'%s\':\n' % sbox.ospath('branch'), + ' U %s\n' % sbox.ospath('branch'), + ] + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'merge', '-c4', '^/trunk', + sbox.ospath('branch')) + + sbox.simple_commit() + + svntest.actions.run_and_verify_svn(None, None, [], + 'update', '-r5', sbox.wc_dir) + + expected_output = [ + '--- Merging r5 into \'%s\':\n' % sbox.ospath('branch'), + 'A %s\n' % sbox.ospath('branch/b'), + '--- Recording mergeinfo for merge of r5 into \'%s\':\n' % sbox.ospath('branch'), + ' U %s\n' % sbox.ospath('branch'), + ] + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'merge', '-c5', '^/trunk', + sbox.ospath('branch')) + + # Currently this commit succeeds with dav over HTTPv2, while it should really fail + expected_err = '.*out of date.*' + svntest.actions.run_and_verify_svn(None, None, expected_err, + 'commit', sbox.ospath(''), '-m', 'M') + ######################################################################## # Run the tests @@ -2946,6 +2998,7 @@ test_list = [ None, commit_multiple_nested_deletes, commit_incomplete, commit_add_subadd, + commit_mergeinfo_ood, ] if __name__ == '__main__': Modified: subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/diff_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/diff_tests.py?rev=1645439&r1=1645438&r2=1645439&view=diff ============================================================================== --- subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/diff_tests.py (original) +++ subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/diff_tests.py Sun Dec 14 11:44:03 2014 @@ -45,16 +45,39 @@ Item = svntest.wc.StateItem ###################################################################### # Generate expected output -def make_diff_header(path, old_tag, new_tag): +def is_absolute_url(target): + return (target.startswith('file://') + or target.startswith('http://') + or target.startswith('https://') + or target.startswith('svn://') + or target.startswith('svn+ssh://')) + +def make_diff_header(path, old_tag, new_tag, src_label=None, dst_label=None): """Generate the expected diff header for file PATH, with its old and new - versions described in parentheses by OLD_TAG and NEW_TAG. Return the header - as an array of newline-terminated strings.""" + versions described in parentheses by OLD_TAG and NEW_TAG. SRC_LABEL and + DST_LABEL are paths or urls that are added to the diff labels if we're + diffing against the repository or diffing two arbitrary paths. + Return the header as an array of newline-terminated strings.""" + if src_label: + src_label = src_label.replace('\\', '/') + if not is_absolute_url(src_label): + src_label = '.../' + src_label + src_label = '\t(' + src_label + ')' + else: + src_label = '' + if dst_label: + dst_label = dst_label.replace('\\', '/') + if not is_absolute_url(dst_label): + dst_label = '.../' + dst_label + dst_label = '\t(' + dst_label + ')' + else: + dst_label = '' path_as_shown = path.replace('\\', '/') return [ "Index: " + path_as_shown + "\n", "===================================================================\n", - "--- " + path_as_shown + "\t(" + old_tag + ")\n", - "+++ " + path_as_shown + "\t(" + new_tag + ")\n", + "--- " + path_as_shown + src_label + "\t(" + old_tag + ")\n", + "+++ " + path_as_shown + dst_label + "\t(" + new_tag + ")\n", ] def make_no_diff_deleted_header(path, old_tag, new_tag): @@ -1580,7 +1603,6 @@ def check_for_omitted_prefix_in_path_com raise svntest.Failure #---------------------------------------------------------------------- -@XFail() def diff_renamed_file(sbox): "diff a file that has been renamed" @@ -2574,6 +2596,52 @@ def basic_diff_summarize(sbox): wc_dir = sbox.wc_dir p = sbox.ospath + # Diff summarize of a newly added file + expected_diff = svntest.wc.State(wc_dir, { + 'iota': Item(status='A '), + }) + svntest.actions.run_and_verify_diff_summarize(expected_diff, + p('iota'), '-c1') + + # Reverse summarize diff of a newly added file + expected_diff = svntest.wc.State(wc_dir, { + 'iota': Item(status='D '), + }) + svntest.actions.run_and_verify_diff_summarize(expected_diff, + p('iota'), '-c-1') + + # Diff summarize of a newly added directory + expected_diff = svntest.wc.State(wc_dir, { + 'A/D': Item(status='A '), + 'A/D/gamma': Item(status='A '), + 'A/D/H': Item(status='A '), + 'A/D/H/chi': Item(status='A '), + 'A/D/H/psi': Item(status='A '), + 'A/D/H/omega': Item(status='A '), + 'A/D/G': Item(status='A '), + 'A/D/G/pi': Item(status='A '), + 'A/D/G/rho': Item(status='A '), + 'A/D/G/tau': Item(status='A '), + }) + svntest.actions.run_and_verify_diff_summarize(expected_diff, + p('A/D'), '-c1') + + # Reverse summarize diff of a newly added directory + expected_diff = svntest.wc.State(wc_dir, { + 'A/D': Item(status='D '), + 'A/D/gamma': Item(status='D '), + 'A/D/H': Item(status='D '), + 'A/D/H/chi': Item(status='D '), + 'A/D/H/psi': Item(status='D '), + 'A/D/H/omega': Item(status='D '), + 'A/D/G': Item(status='D '), + 'A/D/G/pi': Item(status='D '), + 'A/D/G/rho': Item(status='D '), + 'A/D/G/tau': Item(status='D '), + }) + svntest.actions.run_and_verify_diff_summarize(expected_diff, + p('A/D'), '-c-1') + # Add props to some items that will be deleted, and commit. sbox.simple_propset('prop', 'val', 'A/C', @@ -2677,6 +2745,20 @@ def basic_diff_summarize(sbox): svntest.actions.run_and_verify_diff_summarize(expected_reverse_diff, wc_dir, '-c-3') + # Get the differences between a deep newly added dir Issue(4421) + expected_diff = svntest.wc.State(wc_dir, { + 'Q/R' : Item(status='A '), + 'Q/R/newfile' : Item(status='A '), + }) + expected_reverse_diff = svntest.wc.State(wc_dir, { + 'Q/R' : Item(status='D '), + 'Q/R/newfile' : Item(status='D '), + }) + svntest.actions.run_and_verify_diff_summarize(expected_diff, + p('Q/R'), '-c3') + svntest.actions.run_and_verify_diff_summarize(expected_reverse_diff, + p('Q/R'), '-c-3') + #---------------------------------------------------------------------- def diff_weird_author(sbox): "diff with svn:author that has < in it" @@ -3281,7 +3363,6 @@ def diff_url_against_local_mods(sbox): #---------------------------------------------------------------------- # Diff against old revision of the parent directory of a removed and # locally re-added file. -@XFail() @Issue(3797) def diff_preexisting_rev_against_local_add(sbox): "diff -r1 of dir with removed-then-readded file" @@ -3361,6 +3442,52 @@ def diff_git_format_wc_wc(sbox): svntest.actions.run_and_verify_svn(None, expected, [], 'diff', '--git', wc_dir) +@Issue(4294) +def diff_git_format_wc_wc_dir_mv(sbox): + "create a diff in git unidff format for wc dir mv" + sbox.build() + wc_dir = sbox.wc_dir + g_path = sbox.ospath('A/D/G') + g2_path = sbox.ospath('A/D/G2') + pi_path = sbox.ospath('A/D/G/pi') + rho_path = sbox.ospath('A/D/G/rho') + tau_path = sbox.ospath('A/D/G/tau') + new_pi_path = sbox.ospath('A/D/G2/pi') + new_rho_path = sbox.ospath('A/D/G2/rho') + new_tau_path = sbox.ospath('A/D/G2/tau') + + svntest.main.run_svn(None, 'mv', g_path, g2_path) + + expected_output = make_git_diff_header(pi_path, "A/D/G/pi", + "revision 1", "working copy", + delete=True) \ + + [ + "@@ -1 +0,0 @@\n", + "-This is the file 'pi'.\n" + ] + make_git_diff_header(rho_path, "A/D/G/rho", + "revision 1", "working copy", + delete=True) \ + + [ + "@@ -1 +0,0 @@\n", + "-This is the file 'rho'.\n" + ] + make_git_diff_header(tau_path, "A/D/G/tau", + "revision 1", "working copy", + delete=True) \ + + [ + "@@ -1 +0,0 @@\n", + "-This is the file 'tau'.\n" + ] + make_git_diff_header(new_pi_path, "A/D/G2/pi", None, None, cp=True, + copyfrom_path="A/D/G/pi", text_changes=False) \ + + make_git_diff_header(new_rho_path, "A/D/G2/rho", None, None, cp=True, + copyfrom_path="A/D/G/rho", text_changes=False) \ + + make_git_diff_header(new_tau_path, "A/D/G2/tau", None, None, cp=True, + copyfrom_path="A/D/G/tau", text_changes=False) + + expected = svntest.verify.UnorderedOutput(expected_output) + + svntest.actions.run_and_verify_svn(None, expected, [], 'diff', + '--git', wc_dir) + def diff_git_format_url_wc(sbox): "create a diff in git unidiff format for url-wc" sbox.build() @@ -3734,6 +3861,151 @@ def no_spurious_conflict(sbox): svntest.actions.run_and_verify_status(wc_dir, expected_status) +def diff_deleted_url(sbox): + "diff -cN of URL deleted in rN" + sbox.build() + wc_dir = sbox.wc_dir + + # remove A/D/H in r2 + sbox.simple_rm("A/D/H") + sbox.simple_commit() + + # A diff of r2 with target A/D/H should show the removed children + expected_output = make_diff_header("chi", "revision 1", "revision 2") + [ + "@@ -1 +0,0 @@\n", + "-This is the file 'chi'.\n", + ] + make_diff_header("omega", "revision 1", + "revision 2") + [ + "@@ -1 +0,0 @@\n", + "-This is the file 'omega'.\n", + ] + make_diff_header("psi", "revision 1", + "revision 2") + [ + "@@ -1 +0,0 @@\n", + "-This is the file 'psi'.\n", + ] + + # Files in diff may be in any order. + expected_output = svntest.verify.UnorderedOutput(expected_output) + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'diff', '-c2', + sbox.repo_url + '/A/D/H') + +@Issue(4460) +def diff_repo_wc_file_props(sbox): + "diff repo to wc file target with props" + sbox.build() + iota = sbox.ospath('iota') + + # add a mime-type and a line to iota to test the binary check + sbox.simple_propset('svn:mime-type', 'text/plain', 'iota') + sbox.simple_append('iota','second line\n') + + # test that we get the line and the property add + expected_output = make_diff_header(iota, 'revision 1', 'working copy') + \ + [ '@@ -1 +1,2 @@\n', + " This is the file 'iota'.\n", + "+second line\n", ] + \ + make_diff_prop_header(iota) + \ + make_diff_prop_added('svn:mime-type', 'text/plain') + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'diff', '-r1', iota) + + # reverse the diff, should get a property delete and line delete + # skip actually testing the output since apparently 1.7 is busted + # this isn't related to issue #4460, older versions of 1.7 had the issue + # as well + #expected_output = make_diff_header(iota, 'working copy', 'revision 1') + \ + # [ '@@ -1,2 +1 @@\n', + # " This is the file 'iota'.\n", + # "-second line\n", ] + \ + # make_diff_prop_header(iota) + \ + # make_diff_prop_deleted('svn:mime-type', 'text/plain') + expected_output = None + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'diff', '--old', iota, + '--new', iota + '@1') + + # copy iota to test with --show-copies as adds + sbox.simple_copy('iota', 'iota_copy') + iota_copy = sbox.ospath('iota_copy') + + # test that we get all lines as added and the property added + # TODO: We only test that this test doesn't error out because of Issue #4464 + # if and when that issue is fixed this test should check output + svntest.actions.run_and_verify_svn(None, None, [], 'diff', + '--show-copies-as-adds', '-r1', iota_copy) + + # reverse the diff, should get all lines as a delete and no property + # TODO: We only test that this test doesn't error out because of Issue #4464 + # if and when that issue is fixed this test should check output + svntest.actions.run_and_verify_svn(None, None, [], 'diff', + '--show-copies-as-adds', + '--old', iota_copy, + '--new', iota + '@1') + + # revert and commit with the eol-style of LF and then update so + # that we can see a change on either windows or *nix. + sbox.simple_revert('iota', 'iota_copy') + sbox.simple_propset('svn:eol-style', 'LF', 'iota') + sbox.simple_commit() #r2 + sbox.simple_update() + + # now that we have a LF file on disk switch to CRLF + sbox.simple_propset('svn:eol-style', 'CRLF', 'iota') + + # test that not only the property but also the file changes + # i.e. that the line endings substitution works + if svntest.main.is_os_windows(): + # test suite normalizes crlf output into just lf on Windows. + # so we have to assume it worked because there is an add and + # remove line with the same content. Fortunately, it does't + # do this on *nix so we can be pretty sure that it works right. + # TODO: Provide a way to handle this better + crlf = '\n' + else: + crlf = '\r\n' + expected_output = make_diff_header(iota, 'revision 1', 'working copy') + \ + [ '@@ -1 +1 @@\n', + "-This is the file 'iota'.\n", + "+This is the file 'iota'." + crlf ] + \ + make_diff_prop_header(iota) + \ + make_diff_prop_added('svn:eol-style', 'CRLF') + + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'diff', '-r1', iota) + + +@Issue(4460) +def diff_repo_repo_added_file_mime_type(sbox): + "diff repo to repo added file with mime-type" + sbox.build() + wc_dir = sbox.wc_dir + newfile = sbox.ospath('newfile') + + # add a file with a mime-type + sbox.simple_append('newfile', "This is the file 'newfile'.\n") + sbox.simple_add('newfile') + sbox.simple_propset('svn:mime-type', 'text/plain', 'newfile') + sbox.simple_commit() # r2 + + # try to diff across the addition + expected_output = make_diff_header(newfile, 'revision 1', 'revision 2') + \ + [ '@@ -0,0 +1 @@\n', + "+This is the file 'newfile'.\n" ] + \ + make_diff_prop_header(newfile) + \ + make_diff_prop_added('svn:mime-type', 'text/plain') + + svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', + '-r1:2', newfile) + + # reverse the diff to diff across a deletion + # Note no property delete is printed when whole file is deleted + expected_output = make_diff_header(newfile, 'revision 2', 'revision 1') + \ + [ '@@ -1, +0,0 @@\n', + "-This is the file 'newfile'.\n" ] + svntest.actions.run_and_verify_svn(None, None, [], 'diff', + '-r2:1', newfile) + ######################################################################## #Run the tests @@ -3800,6 +4072,10 @@ test_list = [ None, diff_git_with_props_on_dir, diff_abs_localpath_from_wc_folder, no_spurious_conflict, + diff_deleted_url, + diff_git_format_wc_wc_dir_mv, + diff_repo_wc_file_props, + diff_repo_repo_added_file_mime_type, ] if __name__ == '__main__': Modified: subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/externals_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/externals_tests.py?rev=1645439&r1=1645438&r2=1645439&view=diff ============================================================================== --- subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/externals_tests.py (original) +++ subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/externals_tests.py Sun Dec 14 11:44:03 2014 @@ -2309,6 +2309,45 @@ def url_to_wc_copy_of_externals(sbox): "OUTPUT", expected_stdout, [], 0, 'copy', repo_url + '/A/C', os.path.join(wc_dir, 'External-WC-to-URL-Copy')) +# Test for issue #3741 'externals not removed when working copy is made shallow' +@Issue(3741) +def update_dir_external_shallow(sbox): + "shallow update should remove externals" + + sbox.build() + + # Create an external in r2 + sbox.simple_propset('svn:externals', '^/A/D/H X', 'A/B/E') + sbox.simple_commit() + sbox.simple_update() + + # Now make A/B/E shallow by updating with "--set-depth empty" + expected_output = svntest.wc.State(sbox.wc_dir, { + 'A/B/E/alpha' : Item(status='D '), + 'A/B/E/X' : Item(verb='Removed external'), + 'A/B/E/beta' : Item(status='D '), + }) + svntest.actions.run_and_verify_update(sbox.wc_dir, + expected_output, None, None, + None, None, None, None, None, False, + '--set-depth=empty', + sbox.ospath('A/B/E')) + + # And bring the external back by updating with "--set-depth infinity" + expected_output = svntest.wc.State(sbox.wc_dir, { + 'A/B/E/X/psi' : Item(status='A '), + 'A/B/E/X/chi' : Item(status='A '), + 'A/B/E/X/omega' : Item(status='A '), + 'A/B/E/alpha' : Item(status='A '), + 'A/B/E/beta' : Item(status='A '), + }) + svntest.actions.run_and_verify_update(sbox.wc_dir, + expected_output, None, None, + None, None, None, None, None, False, + '--set-depth=infinity', + sbox.ospath('A/B/E')) + + ######################################################################## # Run the tests @@ -2353,6 +2392,7 @@ test_list = [ None, remap_file_external_with_prop_del, dir_external_with_dash_r_only, url_to_wc_copy_of_externals, + update_dir_external_shallow, ] if __name__ == '__main__': Modified: subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/log_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/log_tests.py?rev=1645439&r1=1645438&r2=1645439&view=diff ============================================================================== --- subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/log_tests.py (original) +++ subversion/branches/1.7.x-issue4340-repos/subversion/tests/cmdline/log_tests.py Sun Dec 14 11:44:03 2014 @@ -697,6 +697,42 @@ def check_log_chain(chain, revlist, path missing_revs, chain) +def parse_diff(output): + """Return a set containing the various diff bits, broken up by file.""" + + diff_set = [] + current_diff = [] + for line in output: + if line.startswith('Index: ') and current_diff: + diff_set.append(current_diff) + current_diff = [] + current_diff.append(line) + diff_set.append(current_diff) + + return diff_set + + +def setify(diff_list): + """Take a list of lists and make it a set of tuples.""" + s = set() + for diff in diff_list: + s.add(tuple(diff)) + return s + + +def compare_diff_output(expected_diffs, output): + """Compare the diffs in EXPECTED_DIFFS (which is a Python set) with the + text in OUTPUT, remembering that there is no canonical ordering for diffs.""" + + diffs = parse_diff(output) + diffs = setify(diffs) + expected_diffs = setify(expected_diffs) + + if diffs.issubset(expected_diffs) and diffs.issuperset(expected_diffs): + return + + raise svntest.Failure("Diffs not equal") + ###################################################################### # Tests @@ -2081,26 +2117,97 @@ def log_diff(sbox): '-r10:8', 'A2') os.chdir(was_cwd) - r9diff = make_no_diff_deleted_header('A2/B/E/alpha', 8, 9) \ - + make_diff_header('A2/B/E/beta', 'revision 8', 'revision 9') \ - + [ "@@ -1 +1,2 @@\n", - " This is the file 'beta'.\n", - "+9\n", - "\ No newline at end of file\n", - ] - r8diff = make_diff_header('A2/D/G/rho', 'revision 0', 'revision 8') \ - + [ "@@ -0,0 +1 @@\n", - "+88\n", - "\ No newline at end of file\n", - ] + r9diff = [ make_no_diff_deleted_header('A2/B/E/alpha', 8, 9), + make_diff_header('A2/B/E/beta', 'revision 8', 'revision 9') + + [ "@@ -1 +1,2 @@\n", + " This is the file 'beta'.\n", + "+9\n", + "\ No newline at end of file\n", + ] + ] + r8diff = [ make_diff_header('A2/D/G/rho', 'revision 0', 'revision 8') + + [ "@@ -0,0 +1 @@\n", + "+88\n", + "\ No newline at end of file\n", + ] + ] log_chain = parse_log_output(output, with_diffs=True) if len(log_chain) != 3: raise SVNLogParseError("%d logs found, 3 expected" % len(log_chain)) - svntest.verify.compare_and_display_lines(None, "diff for r9", - r9diff, log_chain[1]['diff_lines']) - svntest.verify.compare_and_display_lines(None, "diff for r8", - r8diff, log_chain[2]['diff_lines']) + compare_diff_output(r9diff, log_chain[1]['diff_lines']) + compare_diff_output(r8diff, log_chain[2]['diff_lines']) + + +@Issue(4153) +def log_diff_moved(sbox): + "log --diff on moved file" + sbox.build() + + sbox.simple_move('A/mu', 'A/mu2') + svntest.main.file_append(sbox.ospath('A/mu2'), "now mu2\n") + sbox.simple_commit() + sbox.simple_move('A/mu2', 'A/mu3') + svntest.main.file_append(sbox.ospath('A/mu3'), "now mu3\n") + sbox.simple_commit() + + mu_at_1 = sbox.repo_url + '/A/mu@1' + mu3_at_3 = sbox.repo_url + '/A/mu3@3' + + r1diff = [make_diff_header('mu', 'revision 0', 'revision 1') + + ["@@ -0,0 +1 @@\n", + "+This is the file 'mu'.\n"]] + + # The mu2@2 and mu3@3 diffs show diffs relative to the copy source + r2diff = [make_diff_header('mu', + '.../mu)\t(revision 1', + '.../mu2)\t(revision 2') + + ["@@ -1 +1,2 @@\n", + " This is the file 'mu'.\n", + "+now mu2\n"]] + + r3diff = [make_diff_header('mu2', + '.../mu2)\t(revision 2', + '.../mu3)\t(revision 3') + + ["@@ -1,2 +1,3 @@\n", + " This is the file 'mu'.\n", + " now mu2\n", + "+now mu3\n"]] + + exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [], + 'log', '--diff', + mu_at_1) + log_chain = parse_log_output(output, with_diffs=True) + if len(log_chain) != 1: + raise SVNLogParseError("%d logs found, 1 expected" % len(log_chain)) + compare_diff_output(r1diff, log_chain[0]['diff_lines']) + + exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [], + 'log', '--diff', + '-r3', mu3_at_3) + log_chain = parse_log_output(output, with_diffs=True) + if len(log_chain) != 1: + raise SVNLogParseError("%d logs found, 1 expected" % len(log_chain)) + compare_diff_output(r3diff, log_chain[0]['diff_lines']) + + exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [], + 'log', '--diff', + '-r3:2', mu3_at_3) + log_chain = parse_log_output(output, with_diffs=True) + if len(log_chain) != 2: + raise SVNLogParseError("%d logs found, 2 expected" % len(log_chain)) + compare_diff_output(r3diff, log_chain[0]['diff_lines']) + compare_diff_output(r2diff, log_chain[1]['diff_lines']) + + exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [], + 'log', '--diff', + mu3_at_3) + log_chain = parse_log_output(output, with_diffs=True) + if len(log_chain) != 3: + raise SVNLogParseError("%d logs found, 3 expected" % len(log_chain)) + compare_diff_output(r3diff, log_chain[0]['diff_lines']) + compare_diff_output(r2diff, log_chain[1]['diff_lines']) + compare_diff_output(r1diff, log_chain[2]['diff_lines']) ######################################################################## # Run the tests @@ -2142,6 +2249,7 @@ test_list = [ None, log_with_unrelated_peg_and_operative_revs, log_on_nonexistent_path_and_valid_rev, log_diff, + log_diff_moved, ] if __name__ == '__main__':
