You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2010/07/24 16:42:20 UTC
[PATCH] svn patch --add-to-cl
I've drilled a changelist into 'svn patch'.
[[[
0:% $svn st subversion
0:% $svn patch ../diffs/svn-patch-add_to_cl.diff --add-to-cl cl
A [cl] subversion/tests/libsvn_client/client-test.c
U subversion/tests/libsvn_client/client-test.c
A [cl] subversion/svn/patch-cmd.c
U subversion/svn/patch-cmd.c
A [cl] subversion/svn/cl.h
U subversion/svn/cl.h
A [cl] subversion/svn/main.c
U subversion/svn/main.c
A [cl] subversion/include/svn_client.h
U subversion/include/svn_client.h
A [cl] subversion/libsvn_client/patch.c
U subversion/libsvn_client/patch.c
0:% $svn st --cl cl
--- Changelist 'cl':
M subversion/include/svn_client.h
M subversion/tests/libsvn_client/client-test.c
M subversion/svn/patch-cmd.c
M subversion/svn/cl.h
M subversion/svn/main.c
M subversion/libsvn_client/patch.c
]]]
Comments? Thoughts?
I haven't tested how it integrates with tree changes (files being
added/removed/moved/copied by 'svn patch') yet. In fact, I'm not sure what's
the current status of that: does 'svn patch' currently support tree operations
other than adding/removing files?
RE: [PATCH] svn patch --add-to-cl
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Julian Foad [mailto:julian.foad@wandisco.com]
> Sent: woensdag 28 juli 2010 16:38
> To: Daniel Shahaf
> Cc: dev@subversion.apache.org
> Subject: Re: [PATCH] svn patch --add-to-cl
>
> On Sat, 2010-07-24, Daniel Shahaf wrote:
> > I've drilled a changelist into 'svn patch'.
> >
> > [[[
> > 0:% $svn st subversion
> > 0:% $svn patch ../diffs/svn-patch-add_to_cl.diff --add-to-cl cl
> > A [cl] subversion/tests/libsvn_client/client-test.c
> > U subversion/tests/libsvn_client/client-test.c
> [...]
> > 0:% $svn st --cl cl
> > --- Changelist 'cl':
> > M subversion/include/svn_client.h
> > M subversion/tests/libsvn_client/client-test.c
> [...]
> > ]]]
> >
> > Comments? Thoughts?
>
> You're talking about a totally new option, one that says "I'd like to
> add all the files affected to a (specified) changelist."
>
> That sounds like it could be a useful feature, but it doesn't sound
> like
> it should be specific to "svn patch" - if we have such a feature, I
> would expect to be able to use it with (more or less) all svn commands.
> Makes sense?
Yes, that makes sense... (I had the same thought yesterday)
But then I start thinking... where does it make sense...
'svn cp', no... doesn't work because changelists can't handle directories.
'svn add -R', no.. doesn't work... same reason
'svn rm' ...
'svn merge' ...
And so on.
I think we should really look at whether we can make changelists on directories in a sensible way. Then this would be a really useful feature!
The reason we disabled changelists on directories shortly before releasing 1.5 (if I remember correctly), was that we couldn't define how they were supposed to work on directories. And denying its use on directories would allow refining it later without breaking backwards compatibility./
Maybe we can enable it now if we can get it to work consistently. (Things start making more sense when you look at things using operation roots, like we do for the 4th tree).
Bert
Re: [PATCH] svn patch --add-to-cl
Posted by Julian Foad <ju...@wandisco.com>.
On Wed, 2010-07-28 at 22:40 +0300, Daniel Shahaf wrote:
> Julian Foad wrote on Wed, Jul 28, 2010 at 15:38:01 +0100:
> > You're talking about a totally new option, one that says "I'd like to
> > add all the files affected to a (specified) changelist."
> >
> > That sounds like it could be a useful feature, but it doesn't sound like
> > it should be specific to "svn patch" - if we have such a feature, I
> > would expect to be able to use it with (more or less) all svn commands.
> > Makes sense?
>
> On one occasion I wanted to use it with 'svn add' (but for 'svn add' I think
> it's closer to being syntactic sugar than with other commands). I see how
> it would make sense for 'svn merge', too, since that too can add files.
>
> BTW: dannas commented on IRC that the behaviour of 'svn patch --add-to-cl'
> should be defined with respect to patches that don't apply successfully.
> (so I don't plan to apply the patch without at least thinking a bit more
> about that)
Also in this vein:
svn revert --remove-from-cl ...
- Julian
Re: [PATCH] svn patch --add-to-cl
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Julian Foad wrote on Wed, Jul 28, 2010 at 15:38:01 +0100:
> On Sat, 2010-07-24, Daniel Shahaf wrote:
> > I've drilled a changelist into 'svn patch'.
> >
> > [[[
> > 0:% $svn st subversion
> > 0:% $svn patch ../diffs/svn-patch-add_to_cl.diff --add-to-cl cl
> > A [cl] subversion/tests/libsvn_client/client-test.c
> > U subversion/tests/libsvn_client/client-test.c
> [...]
> > 0:% $svn st --cl cl
> > --- Changelist 'cl':
> > M subversion/include/svn_client.h
> > M subversion/tests/libsvn_client/client-test.c
> [...]
> > ]]]
> >
> > Comments? Thoughts?
>
> You're talking about a totally new option, one that says "I'd like to
> add all the files affected to a (specified) changelist."
>
> That sounds like it could be a useful feature, but it doesn't sound like
> it should be specific to "svn patch" - if we have such a feature, I
> would expect to be able to use it with (more or less) all svn commands.
> Makes sense?
>
On one occasion I wanted to use it with 'svn add' (but for 'svn add' I think
it's closer to being syntactic sugar than with other commands). I see how
it would make sense for 'svn merge', too, since that too can add files.
BTW: dannas commented on IRC that the behaviour of 'svn patch --add-to-cl'
should be defined with respect to patches that don't apply successfully.
(so I don't plan to apply the patch without at least thinking a bit more
about that)
> - Julian
>
>
> > I haven't tested how it integrates with tree changes (files being
> > added/removed/moved/copied by 'svn patch') yet. In fact, I'm not sure what's
> > the current status of that: does 'svn patch' currently support tree operations
> > other than adding/removing files?
>
>
Re: [PATCH] svn patch --add-to-cl
Posted by Julian Foad <ju...@wandisco.com>.
On Sat, 2010-07-24, Daniel Shahaf wrote:
> I've drilled a changelist into 'svn patch'.
>
> [[[
> 0:% $svn st subversion
> 0:% $svn patch ../diffs/svn-patch-add_to_cl.diff --add-to-cl cl
> A [cl] subversion/tests/libsvn_client/client-test.c
> U subversion/tests/libsvn_client/client-test.c
[...]
> 0:% $svn st --cl cl
> --- Changelist 'cl':
> M subversion/include/svn_client.h
> M subversion/tests/libsvn_client/client-test.c
[...]
> ]]]
>
> Comments? Thoughts?
You're talking about a totally new option, one that says "I'd like to
add all the files affected to a (specified) changelist."
That sounds like it could be a useful feature, but it doesn't sound like
it should be specific to "svn patch" - if we have such a feature, I
would expect to be able to use it with (more or less) all svn commands.
Makes sense?
- Julian
> I haven't tested how it integrates with tree changes (files being
> added/removed/moved/copied by 'svn patch') yet. In fact, I'm not sure what's
> the current status of that: does 'svn patch' currently support tree operations
> other than adding/removing files?