You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Madan U S <ma...@collab.net> on 2006/04/05 09:50:06 UTC
[PATCH] Allow multiple 'svnmerge init's in a single revision
[[[
Allow multiple 'svnmerge init' commands (with differing copyfrom
parameters, of course) in a single revision.
* contrib/client-side/svnmerge.py
(check_dir_clean): Modified to error out, only if the change is NOT
just another modification of the svnmerge-integrated property.
IOW, dont error out, if the only other change in the working copy
is an svnmerge-integrated property change.
]]]
Re: [PATCH] Allow multiple 'svnmerge init's in a single revision
Posted by Daniel Rall <dl...@collab.net>.
It looks like this patch was vetted by Giovanni, but I'd like to see a
test case for it, too.
I'd also like to see one for 'init --force'.
- Dan
On Wed, 05 Apr 2006, Madan S. wrote:
>
>
> [[[
> Allow multiple 'svnmerge init' commands (with differing copyfrom
> parameters, of course) in a single revision.
>
> * contrib/client-side/svnmerge.py
> (check_dir_clean): Modified to error out, only if the change is NOT
> just another modification of the svnmerge-integrated property.
> IOW, dont error out, if the only other change in the working copy
> is an svnmerge-integrated property change.
> ]]]
>
Content-Description: sm-multiple-init-patch.txt
> Index: contrib/client-side/svnmerge.py
> ===================================================================
> --- contrib/client-side/svnmerge.py (revision 19182)
> +++ contrib/client-side/svnmerge.py (working copy)
> @@ -256,7 +256,13 @@
> # matters: if it's non-empty there is a modification.
> out = launchsvn("status -q %s" % dir)
> if out and out[0].strip():
> - error('"%s" has local modifications; it must be clean' % dir)
> + # Permit multiple 'svnmerge init's (with differing copyfrom
> + # parameter) within a single revision.
> + out = launchsvn("diff %s" % dir)
> + if not (len(out) <= 7 and \
> + out[1].find("Property changes on:") != -1 and \
> + out[3].find("Name: svnmerge-integrated") != -1):
> + error('"%s" has local modifications; it must be clean' % dir)
> for L in launchsvn("status -u %s" % dir):
> if len(L) > 7 and L[7] == '*':
> error('"%s" is not up to date; please "svn update" first' % dir)
Content-Description: sm-multiple-init-log.txt
> Allow multiple 'svnmerge init' commands (with differing copyfrom
> parameters, of course) in a single revision.
>
> * contrib/client-side/svnmerge.py
> (check_dir_clean): Modified to error out, only if the change is NOT
> just another modification of the svnmerge-integrated property.
> IOW, dont error out, if the only other change in the working copy
> is an svnmerge-integrated property change.
RE: [Svnmerge] [PATCH] Allow multiple 'svnmerge init's in a singlerevision
Posted by Madan U S <ma...@collab.net>.
On Thursday 06 Apr 2006 4:16 pm, Giovanni Bajo wrote:
> Madan U S <ma...@collab.net> wrote:
> >> Then, you should verify that it doesn't crash if the
> >> svn diff output is empty.
> >
> > Done that. (in that case the 'svn st' output would be empty too, and a
>
> 'svn
>
> > diff' will not be invoked)
>
> But that's not true anymore with diff -N, this is why I mentioned it.
Mr. Bajo. You think ahead of everybody! :)
Am even thinking if it is possible to ignore svnmerge property changes in any or a combination of the subdirectories of the pwd.... Then the comparison should be way more generic....hmmm....
Regards,
Madan.
Re: [Svnmerge] [PATCH] Allow multiple 'svnmerge init's in a singlerevision
Posted by Giovanni Bajo <ra...@develer.com>.
Madan U S <ma...@collab.net> wrote:
>> Then, you should verify that it doesn't crash if the
>> svn diff output is empty.
>
> Done that. (in that case the 'svn st' output would be empty too, and a
'svn
> diff' will not be invoked)
But that's not true anymore with diff -N, this is why I mentioned it.
>> And you should also add a testcase (and/or fix
>> the existing testcases if they now don't work as expected).
>
> yes. over some time, I will add test cases to this.
Thanks!
--
Giovanni Bajo
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: [Svnmerge] [PATCH] Allow multiple 'svnmerge init's in a singlerevision
Posted by Madan U S <ma...@collab.net>.
On Thursday 06 Apr 2006 3:20 am, you wrote:
> Madan U S <ma...@collab.net> wrote:
> >>> [[[
> >>> Allow multiple 'svnmerge init' commands (with differing copyfrom
> >>> parameters, of course) in a single revision.
> >>>
> >>> * contrib/client-side/svnmerge.py
> >>> (check_dir_clean): Modified to error out, only if the change is
> >>> NOT just another modification of the svnmerge-integrated property.
> >>> IOW, dont error out, if the only other change in the working copy
> >>> is an svnmerge-integrated property change.
> >>> ]]]
> >>
> >> What's the rationale of this patch? You can use --force to achieve
> >> the
> >> same.
> >
> > When using a svnmerge command, a --force would be to override a
> > non-svnmerge action. The user should not have to worry about the
> > changes that are made by svnmerge. He has to use --force only when
> > some unrelated change has happened and he has to override that
> > change.
> > Also, by doing this, the user can issue a series of 'svnmerge init'
> > (on various branches) before doing a commit. This helps keep down the
> > number of empty revisions. This also makes it simpler to use the
> > 'svnmerge init' command (Otherwise, the user has to do a 'svnmerge
> > init', followed by a series of 'svnmerge init --force') during the
> > course a simple admin task - setting up a repository for merge
> > tracking for the first time.
>
> Thanks for the explanation, +1 on the concept. As for the patch itself, I'd
> rather it use "svn diff -N" to avoid stats on potentially thousands of
> files for no reason.
You are sooo right.
> Then, you should verify that it doesn't crash if the
> svn diff output is empty.
Done that. (in that case the 'svn st' output would be empty too, and a 'svn
diff' will not be invoked)
> And you should also add a testcase (and/or fix
> the existing testcases if they now don't work as expected).
yes. over some time, I will add test cases to this.
Regards,
Madan.
Re: [Svnmerge] [PATCH] Allow multiple 'svnmerge init's in a singlerevision
Posted by Giovanni Bajo <ra...@develer.com>.
Madan U S <ma...@collab.net> wrote:
>>> [[[
>>> Allow multiple 'svnmerge init' commands (with differing copyfrom
>>> parameters, of course) in a single revision.
>>>
>>> * contrib/client-side/svnmerge.py
>>> (check_dir_clean): Modified to error out, only if the change is
>>> NOT just another modification of the svnmerge-integrated property.
>>> IOW, dont error out, if the only other change in the working copy
>>> is an svnmerge-integrated property change.
>>> ]]]
>>
>> What's the rationale of this patch? You can use --force to achieve
>> the
>> same.
>
> When using a svnmerge command, a --force would be to override a
> non-svnmerge action. The user should not have to worry about the
> changes that are made by svnmerge. He has to use --force only when
> some unrelated change has happened and he has to override that
> change.
> Also, by doing this, the user can issue a series of 'svnmerge init'
> (on various branches) before doing a commit. This helps keep down the
> number of empty revisions. This also makes it simpler to use the
> 'svnmerge init' command (Otherwise, the user has to do a 'svnmerge
> init', followed by a series of 'svnmerge init --force') during the
> course a simple admin task - setting up a repository for merge
> tracking for the first time.
Thanks for the explanation, +1 on the concept. As for the patch itself, I'd
rather it use "svn diff -N" to avoid stats on potentially thousands of files
for no reason. Then, you should verify that it doesn't crash if the svn diff
output is empty. And you should also add a testcase (and/or fix the existing
testcases if they now don't work as expected).
Giovanni Bajo
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: [Svnmerge] [PATCH] Allow multiple 'svnmerge init's in a singlerevision
Posted by Madan U S <ma...@collab.net>.
On Wednesday 05 Apr 2006 4:30 pm, Giovanni Bajo wrote:
> Madan U S <ma...@collab.net> wrote:
> > [[[
> > Allow multiple 'svnmerge init' commands (with differing copyfrom
> > parameters, of course) in a single revision.
> >
> > * contrib/client-side/svnmerge.py
> > (check_dir_clean): Modified to error out, only if the change is NOT
> > just another modification of the svnmerge-integrated property.
> > IOW, dont error out, if the only other change in the working copy
> > is an svnmerge-integrated property change.
> > ]]]
>
> What's the rationale of this patch? You can use --force to achieve the
> same.
When using a svnmerge command, a --force would be to override a non-svnmerge action. The user should not have to worry about the changes that are made by svnmerge. He has to use --force only when some unrelated change has happened and he has to override that change.
Also, by doing this, the user can issue a series of 'svnmerge init' (on various branches) before doing a commit. This helps keep down the number of empty revisions. This also makes it simpler to use the 'svnmerge init' command (Otherwise, the user has to do a 'svnmerge init', followed by a series of 'svnmerge init --force') during the course a simple admin task - setting up a repository for merge tracking for the first time.
Regards,
Madan.
Re: [Svnmerge] [PATCH] Allow multiple 'svnmerge init's in a singlerevision
Posted by Giovanni Bajo <ra...@develer.com>.
Madan U S <ma...@collab.net> wrote:
> [[[
> Allow multiple 'svnmerge init' commands (with differing copyfrom
> parameters, of course) in a single revision.
>
> * contrib/client-side/svnmerge.py
> (check_dir_clean): Modified to error out, only if the change is NOT
> just another modification of the svnmerge-integrated property.
> IOW, dont error out, if the only other change in the working copy
> is an svnmerge-integrated property change.
> ]]]
What's the rationale of this patch? You can use --force to achieve the same.
--
Giovanni Bajo
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org