[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn merge revert commit adds files to the repo that aremissing in the wc - issue #1962

From: Jojakim Stahl <joja.lists_at_jojakim.de>
Date: Mon, 29 Sep 2008 17:12:02 +0200

Hello Julian,
after one week out of office, I'm back. Seems you want me to get a python
guru ;)
Tried to create a test like you want it. Results attached.

Note: I added it as XFail (however, I do not know what that means... did it
because you told to do so).
Another hint: If you modify the call to merge_dir_add2 in merge_dir_add so
that True is passed as the second param, I do the things, that the merge
should do, via a copy, and voila, the test passes.

Ciao,
Jojakim

"Julian Foad" <julianfoad_at_btopenworld.com> schrieb im Newsbeitrag
news:1222113109.17050.132.camel_at_edith.foad.me.uk...
> On Fri, 2008-09-19 at 11:52 +0200, Jojakim Stahl wrote:
>> I'm no expert in writing Subversion tests and didn't it ever, but
>> sometime
>> is first time, so attached you will find a patch for merge_tests.py.
>> Hope this helps,
>
> Thank you, Jojakim. This does help. I wrote the following log message
> for it:
> [[[
> Add a test for a bug in which a schedule-add directory tree created by a
> merge is different from that created by a copy, and is broken with
> respect
> to reverting. See
> <http://subversion.tigris.org/issues/show_bug.cgi?id=1962>
> and <http://svn.haxx.se/dev/archive-2008-09/0709.shtml>.
>
> Patch by: Jojakim Stahl <joja.lists_at_jojakim.de>
>
> * subversion/tests/cmdline/merge_tests.py
> (dont_add_reverted_file): New test function.
> (test_list): Add the new test, as XFail.
> ]]]
>
> However, I have not yet committed this.
>
> I examined your test and issue #1962 "merge of non-empty subdir
> committed incorrectly"
> <http://subversion.tigris.org/issues/show_bug.cgi?id=1962>.
>
> A directory scheduled for add by "svn copy" has the top dir marked as "A
> +" and all the rest marked just as " +". Reverting a file within such a
> directory reverts the file to how it was in the source of the copy, and
> committing works as expected.
>
> A directory scheduled for add by "svn merge" has the top dir marked as
> "A+" and all the rest marked as "A+" as well. Reverting a file within
> such a directory reverts the file to "unversioned" as shown by "svn
> status", but the file is committed by "svn commit". This is very wrong.
>
> Issue #1962 says that "svn merge" is wrong in scheduling all the files
> for addition in the first place. It should behave like "svn copy". So,
> in your situation, it is the behaviour of "revert" and "status" that is
> wrong, not "commit".
>
> When you have time, would you mind modifing your test to check that the
> merge and revert and status and commit all behave the same as if the
> original merge had been a copy? That is:
>
> * "svn merge" should output just one line: "A parent_dir".
>
> * "svn status" should show just one line: "A+ parent_dir".
>
> * "svn revert" should returns the file to its copy-source state, or do
> nothing if it was not modified since the merge.
>
> * "svn commit" should commit it.
>
> Any or all of these checks would be useful.
>
> Thank you.
>
> - Julian

begin 666 merge_tests.py.diff
M26YD97_at_Z(&UE<F=E7W1E<W1S+G!Y#0H]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M#0HM+2T@;65R9V5?=&5S=',N<'D)*%)E=FES:6]N(#,S,3<W*0T**RLK(&UE
M<F=E7W1E<W1S+G!Y"2A!<F)E:71S:V]P:64I#0I 0" M,3,Y,S0L,3 @*S$S
M.3,T+#$Q.2! 0 T*(" @(" @(" @(" @(" @(&5X<&5C=&5D7W-T871U<RP-
M"B @(" @(" @(" @(" @("!E>'!E8W1E9%]S:VEP+ T*(" @(" @(" @(" @
M(" I(%TL($9A;'-E*0T**R,M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM#0H@
M#0HK(R!-97)G:6YG(&$@9&ER96-T;W)Y(&%D9"!S:&]U;&0@;VYL>2!M87)K
M('1H92!D:7)E8W1O<GD_at_87,@02L-"BLC(&)U="!N;W0_at_86QL(&ET<R!C:&EL
M9')E;B!T;V\N(%-E92!I<W-U92 C,3DV,BX-"B -"BMD968@;65R9V5?9&ER
M7V%D9"AS8F]X*3H-"BL@(")M97)G92!A(&1I<F-T;W)Y(&%D9"!S:&]U;&1N
M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%]L:6YE<RAF:6QE,5]1,5]P871H+" Q
M*0T**R @9FEL;%]F:6QE7W=I=&A?;&EN97,H9FEL93)?43%?<&%T:"P@,2D-
M"BL@('-V;G1E<W0N;6%I;BYR=6Y?<W9N*$YO;F4L("=A9&0G+"!27U$Q7W!A
M=&@I#0HK("!S7W)E=E]A9&0@/2!S=FY?8V]M;6ET*'=C7V1I<BD-"BL@('-V
M;G1E<W0N;6%I;BYR=6Y?<W9N*$YO;F4L("=U<&1A=&4G+"!W8U]D:7(I#0HK
M#0HK("!E>'!E8W1E9%]O=71P=70@/2!W8RY3=&%T92A1,E]P871H+"![#0HK
M(" @("=2)R @(" @(" Z($ET96TH<W1A='5S/2=!("<I+ T**R @("!]*0T*
M*R @97AP96-T961?<W1A='5S(#T@=V,N4W1A=&4H43)?<&%T:"P@>PT**R @
M(" G)R @(" @(" @.B!)=&5M*'-T871U<STG($TG+"!W8U]R978]<U]R979?
M861D*2P-"BL@(" @)U(G(" @(" @(#H_at_271E;2AS=&%T=7,])T$@)RP_at_8V]P
M:65D/2<K)RP@=V-?<F5V/2<M)RDL#0HK(" @("=2+V9I;&4Q)R Z($ET96TH
M<W1A='5S/2<@("<L(&-O<&EE9#TG*R<L('=C7W)E=CTG+2<I+ T**R @(" G
M4B]F:6QE,B<@.B!)=&5M*'-T871U<STG(" G+"!C;W!I960])RLG+"!W8U]R
M978])RTG*2P-"BL@(" @?2D-"BL@(&5X<&5C=&5D7V1I<VL@/2!W8RY3=&%T
M92_at_G)RP@>PT**R @(" G4B<@(" @(" @.B!)=&5M*"DL#0HK(" @("=2+V9I
M;&4Q)R Z($ET96TH(E1H:7,@:7,@;&EN92 Q(&EN("=F:6QE,2<N7&XB#0HK
M(" @(" @(" @(" @(" @(" @("L@(E1H:7,@:7,@;&EN92 R(&EN("=F:6QE
M,2<N7&XB#0HK(" @(" @(" @(" @(" @(" @("L@(E1H:7,@:7,@;&EN92 S
M(&EN("=F:6QE,2<N7&XB*2P-"BL@(" @)U(O9FEL93(G(#H_at_271E;2_at_B5&AI
M<R!I<R!L:6YE(#$@:6X@)V9I;&4R)RY<;B(-"BL@(" @(" @(" @(" @(" @
M(" @*R B5&AI<R!I<R!L:6YE(#(@:6X@)V9I;&4R)RY<;B(-"BL@(" @(" @
M(" @(" @(" @(" @*R B5&AI<R!I<R!L:6YE(#,@:6X@)V9I;&4R)RY<;B(I
M+ T**R @("!]*0T**R @97AP96-T961?<VMI<" ]('=C+E-T871E*"<G+"![
M('TI#0HK#0HK("!I9B!U<V5#;W!Y._at_T**R @(" C(%1H92!F;VQL;W=I;F<@
M;&EN97,L('1H870_at_9&\@;6]R92!O<B!L97-S('1H92!S86UE(&%S('1H92!M
M97)G92P-"BL@(" @(R!B=70@=VET:"!A(&-O<'D_at_86YD('=I;&P@<&%S<RXN
M+@T**PT**R @("!S=FYT97-T+F%C=&EO;G,N<G5N7V%N9%]V97)I9GE?<W9N
M*$YO;F4L(%LB02 @(" @(" @("(@*R!27U$R7W!A=&@@*R B7&XB72P_at_6UTL
M("=C<"<L(%)?43%?<&%T:"P_at_43)?<&%T:"D-"BL@(" @<W9N7W!R;W!S970H
M4U9.7U!23U!?34521T5)3D9/+" G+U$Q+U(Z)R K('-T<BAS7W)E=E]A9&0I
M+"!1,E]P871H*0T**R @("!S=FYT97-T+F%C=&EO;G,N<G5N7V%N9%]V97)I
M9GE?<W1A='5S*%$R7W!A=&@L(&5X<&5C=&5D7W-T871U<RD-"BL@(" @<W9N
M=&5S="YA8W1I;VYS+G9E<FEF>5]D:7-K*%$R7W!A=&@L(&5X<&5C=&5D7V1I
M<VLI#0HK("!E;'-E._at_T**R @(" C($1O('1H92!M97)G92XN+@T**R @("!S
M=FYT97-T+F%C=&EO;G,N<G5N7V%N9%]V97)I9GE?;65R9V4H43)?<&%T:"P@
M<U]R979?861D+3$L('-?<F5V7V%D9"P-"BL@(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @('-B;W_at_N<F5P;U]U<FP@*R G+U$Q)RP-
M"BL@(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(&5X
M<&5C=&5D7V]U='!U="P-"BL@(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(&5X<&5C=&5D7V1I<VLL#0HK(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @("!E>'!E8W1E9%]S=&%T=7,L#0HK
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @("!E>'!E
M8W1E9%]S:VEP+ T**R @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @3F]N92P_at_3F]N92P_at_3F]N92P_at_3F]N92P-"BL@(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @($YO;F4L($9A;'-E*0T*
M*PT**R @(R!4;R!R96UO=F4_at_43(O4B]F:6QE,3H@<F5V97)T('-H;W5L9"!D
M;R!N;W1H:6YG+"!B=70_at_9&5L971E('-H;W5L9 T**R @(R!D96QE=&4@=&AE
M(&9I;&4@<V\@=&AA="!I<R!I<R!N;W0@:6YC;'5D960@:6X@=&AE(')E=B!W
M:&5N(&-O;6UI='1I;F<-"BL@('-V;G1E<W0N86-T:6]N<RYR=6Y?86YD7W9E
M<FEF>5]S=FXH3F]N92P_at_6UTL(%M=+" G<F5V97)T)RP_at_9FEL93%?43)?<&%T
M:"D-"BL@('-V;G1E<W0N86-T:6]N<RYR=6Y?86YD7W9E<FEF>5]S=FXH3F]N
M92P_at_6R)$(" @(" @(" @(B K(&9I;&4Q7U$R7W!A=&@@*R B7&XB72P_at_6UTL
M("=D96QE=&4G+"!F:6QE,5]1,E]P871H*0T**PT**R @(R!697)I9GD@=&AE
M('=C(&%F=&5R(')E=F5R="!A;F0_at_9&5L971E#0HK("!E>'!E8W1E9%]S=&%T
M=7,N='=E86LH)U(O9FEL93$G+"!S=&%T=7,])T0@)RP@('=C7W)E=CTG,R<L
M(&-O<&EE9#U.;VYE*0T**R @97AP96-T961?9&ES:RYR96UO=F4H)U(O9FEL
M93$G*0T**R @<W9N=&5S="YA8W1I;VYS+G)U;E]A;F1?=F5R:69Y7W-T871U
M<RA1,E]P871H+"!E>'!E8W1E9%]S=&%T=7,I#0HK("!S=FYT97-T+F%C=&EO
M;G,N=F5R:69Y7V1I<VLH43)?<&%T:"P_at_97AP96-T961?9&ES:RD-"BL-"BL@
M(",@0V]M;6ET(" -"BL@(&5X<&5C=&5D7V]U='!U=" ]('=C+E-T871E*%$R
M7W!A=&@L('L-"BL@(" @)R<@(" @(" @(" @(" @(" @(" Z($ET96TH=F5R
M8CTG4V5N9&EN9R<I+ T**R @(" G4B<@(" @(" @(" @(" @(" @(#H_at_271E
M;2AV97)B/2=!9&1I;F<G*2P-"BL@(" @)U(O9FEL93$G(" @(" @(" @(" Z
M($ET96TH=F5R8CTG1&5L971I;F<G*2P-"BL@(" @?2D-"BL@(&5X<&5C=&5D
M7W-T871U<RYR96UO=F4H)U(O9FEL93$G*0T**R @97AP96-T961?<W1A='5S
M+G1W96%K*'-T871U<STG(" G+"!C;W!I960]3F]N92P@=V-?<F5V/7-V;E]C
M;VUM:70N<F5P;U]R978K,2D-"BL@('-V;G1E<W0N86-T:6]N<RYR=6Y?86YD
M7W9E<FEF>5]C;VUM:70H43)?<&%T:"P-"BL@(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @97AP96-T961?;W5T<'5T+ T**R @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @("!E>'!E8W1E9%]S
M=&%T=7,L#0HK(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @($YO;F4L#0HK(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(%$R7W!A=&@I#0HK("!S=FY?8V]M;6ET+G)E<&]?<F5V("L](#$-
M"BL-"BL@(",@0VAE8VL_at_8V]N=&5N=',@;V8@<F5P;W-I=&]R>0T**R @97AP
M96-T961?;W5T<'5T(#T_at_6PT**R @(" B4B]<;B(L( T**R @(" B4B]F:6QE
M,EQN(BP-"BL@(" @70T**R @<W9N=&5S="YA8W1I;VYS+G)U;E]A;F1?=F5R
M:69Y7W-V;BA.;VYE+"!E>'!E8W1E9%]O=71P=70L(%M=+" G;',G+" G+5(G
M+ T**R @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @("!1,E]P
M871H*0T**PT**PT**PT**PT**PT*(",C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(PT*(",@4G5N('1H92!T97-T<PT*( T*0$ @+3$T,3,W+#8@*S$T,C0V
M+#<@0$ -"B @(" @(" @(" @(" @('1R965?8V]N9FQI8W1S7V]N7VUE<F=E
M7VYO7VQO8V%L7V-I7S5?,2P-"B @(" @(" @(" @(" @('1R965?8V]N9FQI
M8W1S7V]N7VUE<F=E7VYO7VQO8V%L7V-I7S5?,BP-"B @(" @(" @(" @(" @
M('1R965?8V]N9FQI8W1S7V]N7VUE<F=E7VYO7VQO8V%L7V-I7S8L#0HK(" @
M(" @(" @(" @("!81F%I;"AM97)G95]D:7)?861D*2P-"B @(" @(" @(" @
F(" @70T*( T*(&EF(%]?;F%M95]?(#T]("=?7VUA:6Y?7R<Z#0H`
`
end

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-29 17:11:15 CEST

This is an archived mail posted to the Subversion Dev mailing list.