> -----Original Message-----
> From: Arwin Arni [mailto:arwin_at_collab.net]
> Sent: donderdag 17 maart 2011 7:43
> To: Julian Foad
> Cc: dev_at_subversion.apache.org
> Subject: Re: [PATCH] Add --dry-run flag to "svn update" client command
>
> > Arwin Arni wrote:
> >> On Tuesday 15 March 2011 08:34 PM, Julian Foad wrote:
> >>> On Wed, 2011-03-02, Arwin Arni wrote:
> >>>> In my effort to understand the delta editor API, I took it upon myself
> >>>> to try and implement the --dry-run flag for "svn update".
> >>>> http://subversion.tigris.org/issues/show_bug.cgi?id=2491
> >>> Hi Arwin. Kamesh asked for technical feedback about this patch so
> >>> here's a review.
> >>>
> >>> In my view, a "dry run" mode for update is useful but not very
> >>> important. The complexity of this implementation looks about what I'd
> >>> expect, not too bad, but I think right now is maybe not a good time to
> >>> add this because it does add significant complexity to code that we are
> >>> trying to work on.
> >>>
> >>>> Currently, externals are handled inside
> >>>> subversion/libsvn_client/externals.c by running checkout/switch. For a
> >>>> dry-run update to mimic a real update, the notifications have to be the
> >>>> same. Since some of these notifications are generated by the above
> >>>> mentioned checkout/switch runs, I have to implement dry-run for
> them
> >>>> also. I'll take this up as a follow-up exercise. Now, the dry-run will
> >>>> simply ignore any externals in the working copy.
> >>> It's fine to handle externals in a follow-up patch.
> >>>
> >>> I see that '--parents' and '--set-depth' are not allowed in dry-run
> >>> mode. What is the reason behind that? Is it because they seem to be
> >>> difficult to implement, or you think they are not needed, or you intend
> >>> to implement them in a follow-up patch, or something else?
> >> Well, the reason is that both --parents and --set-depth make permanent
> >> changes to the WC which will not be reported in the output at all.
> > The changes made by --parents are reported:
> >
> > $ svn st -v
> > 2 2 julianfoad .
> > 2 2 julianfoad A
> > 2 2 julianfoad A/B
> > $ svn up --parents A/B/C/D
> > A A/B/C
> > Updating 'A/B/C/D' ...
> > A A/B/C/D
> > Updated to revision 4.
> > ]]]
> >
>
> I seem to have grossly overlooked this.. I'll look into a way we can
> implement this effectively..
>
> (maybe we can intelligently fake this notification of the parents being
> added.. I don't know)
>
>
> > The changes made by set-depth are reported:
> > [[[
> > $ svn st -v
> > 2 2 julianfoad .
> > 2 2 julianfoad A
> > 2 2 julianfoad A/B
> > 4 4 julianfoad A/B/C
> > 4 4 julianfoad A/B/C/D
> > 5 5 julianfoad A/B/C2
> > 5 5 julianfoad A/B2
> > 5 5 julianfoad A/B2/C
> > $ svn up --set-depth=empty A/B2
> > D A/B2/C
> > Updating 'A/B2' ...
> > Updated to revision 5.
> > ]]]
> >
>
> I can see a way to implement this easily, because --set-depth and
> --depth differ only in the fact that the depth becomes sticky in
> --set-depth.. So passing --set-depth can be treated as --depth for
> dry-runs..
This flag is also handled in the adm crawler, where it tells the server to bring in new nodes.
It would really need the set-depth information there.
Bert
Received on 2011-03-17 10:16:46 CET