* [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
@ 2008-08-26 16:41 Manuel López-Ibáñez
2008-08-26 16:51 ` Manuel López-Ibáñez
` (8 more replies)
0 siblings, 9 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 16:41 UTC (permalink / raw)
To: Gcc Patch List; +Cc: Daniel Berlin
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
> Could we put a limit to the commit log entry? More than 500 hundred
> lines changelog entries should just be rejected and this will avoid
> someone accidentally committing a full log or a diff or just random
> junk.
>
The following patch to our pre-commit hook enables this. I have tested
it with a dummy repository but review from bourne-shell and/or
subversion knowledgeable people would be welcome.
Who can approve this?
Cheers,
Manuel.
[-- Attachment #2: pre-commit.diff --]
[-- Type: text/plain, Size: 1723 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,23 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+LOGLINES=`$SVNLOOK log -t "$TXN" "$REPOS" | wc -l`
+if test $LOGLINES -gt 500; then
+ echo "A single ChangeLog entry cannot be larger than 500 lines. " >&2
+ echo "Please check again the log message of this commit. " >&2
+ echo "If you are merging from/to a branch, never use log messages from" >&2
+ echo "other revisions as the commit message. " >&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 16:41 [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging) Manuel López-Ibáñez
@ 2008-08-26 16:51 ` Manuel López-Ibáñez
2008-08-26 17:13 ` Manuel López-Ibáñez
` (7 subsequent siblings)
8 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 16:51 UTC (permalink / raw)
To: Gcc Patch List; +Cc: Daniel Berlin
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
> Could we put a limit to the commit log entry? More than 500 hundred
> lines changelog entries should just be rejected and this will avoid
> someone accidentally committing a full log or a diff or just random
> junk.
>
The following patch to our pre-commit hook enables this. I have tested
it with a dummy repository but review from bourne-shell and/or
subversion knowledgeable people would be welcome.
Who can approve this?
Cheers,
Manuel.
[-- Attachment #2: pre-commit.diff --]
[-- Type: text/plain, Size: 1723 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,23 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+LOGLINES=`$SVNLOOK log -t "$TXN" "$REPOS" | wc -l`
+if test $LOGLINES -gt 500; then
+ echo "A single ChangeLog entry cannot be larger than 500 lines. " >&2
+ echo "Please check again the log message of this commit. " >&2
+ echo "If you are merging from/to a branch, never use log messages from" >&2
+ echo "other revisions as the commit message. " >&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 16:41 [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging) Manuel López-Ibáñez
2008-08-26 16:51 ` Manuel López-Ibáñez
@ 2008-08-26 17:13 ` Manuel López-Ibáñez
2008-08-26 17:35 ` H.J. Lu
` (6 subsequent siblings)
8 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 17:13 UTC (permalink / raw)
To: Gcc Patch List; +Cc: Daniel Berlin
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
> Could we put a limit to the commit log entry? More than 500 hundred
> lines changelog entries should just be rejected and this will avoid
> someone accidentally committing a full log or a diff or just random
> junk.
>
The following patch to our pre-commit hook enables this. I have tested
it with a dummy repository but review from bourne-shell and/or
subversion knowledgeable people would be welcome.
Who can approve this?
Cheers,
Manuel.
[-- Attachment #2: pre-commit.diff --]
[-- Type: text/plain, Size: 1723 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,23 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+LOGLINES=`$SVNLOOK log -t "$TXN" "$REPOS" | wc -l`
+if test $LOGLINES -gt 500; then
+ echo "A single ChangeLog entry cannot be larger than 500 lines. " >&2
+ echo "Please check again the log message of this commit. " >&2
+ echo "If you are merging from/to a branch, never use log messages from" >&2
+ echo "other revisions as the commit message. " >&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 16:41 [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging) Manuel López-Ibáñez
2008-08-26 16:51 ` Manuel López-Ibáñez
2008-08-26 17:13 ` Manuel López-Ibáñez
@ 2008-08-26 17:35 ` H.J. Lu
2008-08-26 17:44 ` H.J. Lu
` (5 more replies)
2008-08-26 17:37 ` Manuel López-Ibáñez
` (5 subsequent siblings)
8 siblings, 6 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-26 17:35 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> Could we put a limit to the commit log entry? More than 500 hundred
>> lines changelog entries should just be rejected and this will avoid
>> someone accidentally committing a full log or a diff or just random
>> junk.
>>
>
> The following patch to our pre-commit hook enables this. I have tested
> it with a dummy repository but review from bourne-shell and/or
> subversion knowledgeable people would be welcome.
>
When I add 600 testcases, should I mention each of them in commit log?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 16:41 [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging) Manuel López-Ibáñez
` (2 preceding siblings ...)
2008-08-26 17:35 ` H.J. Lu
@ 2008-08-26 17:37 ` Manuel López-Ibáñez
2008-08-26 20:22 ` Manuel López-Ibáñez
` (4 subsequent siblings)
8 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 17:37 UTC (permalink / raw)
To: Gcc Patch List; +Cc: Daniel Berlin
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
> Could we put a limit to the commit log entry? More than 500 hundred
> lines changelog entries should just be rejected and this will avoid
> someone accidentally committing a full log or a diff or just random
> junk.
>
The following patch to our pre-commit hook enables this. I have tested
it with a dummy repository but review from bourne-shell and/or
subversion knowledgeable people would be welcome.
Who can approve this?
Cheers,
Manuel.
[-- Attachment #2: pre-commit.diff --]
[-- Type: text/plain, Size: 1723 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,23 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+LOGLINES=`$SVNLOOK log -t "$TXN" "$REPOS" | wc -l`
+if test $LOGLINES -gt 500; then
+ echo "A single ChangeLog entry cannot be larger than 500 lines. " >&2
+ echo "Please check again the log message of this commit. " >&2
+ echo "If you are merging from/to a branch, never use log messages from" >&2
+ echo "other revisions as the commit message. " >&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:35 ` H.J. Lu
@ 2008-08-26 17:44 ` H.J. Lu
2008-08-26 17:47 ` Richard Guenther
` (4 subsequent siblings)
5 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-26 17:44 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> Could we put a limit to the commit log entry? More than 500 hundred
>> lines changelog entries should just be rejected and this will avoid
>> someone accidentally committing a full log or a diff or just random
>> junk.
>>
>
> The following patch to our pre-commit hook enables this. I have tested
> it with a dummy repository but review from bourne-shell and/or
> subversion knowledgeable people would be welcome.
>
When I add 600 testcases, should I mention each of them in commit log?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:35 ` H.J. Lu
2008-08-26 17:44 ` H.J. Lu
@ 2008-08-26 17:47 ` Richard Guenther
2008-08-26 19:15 ` Richard Guenther
` (8 more replies)
2008-08-26 17:56 ` H.J. Lu
` (3 subsequent siblings)
5 siblings, 9 replies; 86+ messages in thread
From: Richard Guenther @ 2008-08-26 17:47 UTC (permalink / raw)
To: H.J. Lu; +Cc: Manuel López-Ibáñez, Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 5:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>> Could we put a limit to the commit log entry? More than 500 hundred
>>> lines changelog entries should just be rejected and this will avoid
>>> someone accidentally committing a full log or a diff or just random
>>> junk.
>>>
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>
> When I add 600 testcases, should I mention each of them in commit log?
Yes.
IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
Richard.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:35 ` H.J. Lu
2008-08-26 17:44 ` H.J. Lu
2008-08-26 17:47 ` Richard Guenther
@ 2008-08-26 17:56 ` H.J. Lu
2008-08-26 20:19 ` H.J. Lu
` (2 subsequent siblings)
5 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-26 17:56 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> Could we put a limit to the commit log entry? More than 500 hundred
>> lines changelog entries should just be rejected and this will avoid
>> someone accidentally committing a full log or a diff or just random
>> junk.
>>
>
> The following patch to our pre-commit hook enables this. I have tested
> it with a dummy repository but review from bourne-shell and/or
> subversion knowledgeable people would be welcome.
>
When I add 600 testcases, should I mention each of them in commit log?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:47 ` Richard Guenther
@ 2008-08-26 19:15 ` Richard Guenther
2008-08-26 19:31 ` H.J. Lu
` (7 subsequent siblings)
8 siblings, 0 replies; 86+ messages in thread
From: Richard Guenther @ 2008-08-26 19:15 UTC (permalink / raw)
To: H.J. Lu; +Cc: Manuel López-Ibáñez, Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 5:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>> Could we put a limit to the commit log entry? More than 500 hundred
>>> lines changelog entries should just be rejected and this will avoid
>>> someone accidentally committing a full log or a diff or just random
>>> junk.
>>>
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>
> When I add 600 testcases, should I mention each of them in commit log?
Yes.
IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
Richard.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:47 ` Richard Guenther
2008-08-26 19:15 ` Richard Guenther
@ 2008-08-26 19:31 ` H.J. Lu
2008-08-26 20:01 ` H.J. Lu
` (4 more replies)
2008-08-26 20:04 ` Richard Guenther
` (6 subsequent siblings)
8 siblings, 5 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-26 19:31 UTC (permalink / raw)
To: Richard Guenther
Cc: Manuel López-Ibáñez, Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 8:36 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 5:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
>> <lopezibanez@gmail.com> wrote:
>>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>>> Could we put a limit to the commit log entry? More than 500 hundred
>>>> lines changelog entries should just be rejected and this will avoid
>>>> someone accidentally committing a full log or a diff or just random
>>>> junk.
>>>>
>>>
>>> The following patch to our pre-commit hook enables this. I have tested
>>> it with a dummy repository but review from bourne-shell and/or
>>> subversion knowledgeable people would be welcome.
>>>
>>
>> When I add 600 testcases, should I mention each of them in commit log?
>
> Yes.
>
> IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
>
Shouldn't svnmerge be fixed not to generate such log?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 19:31 ` H.J. Lu
@ 2008-08-26 20:01 ` H.J. Lu
2008-08-26 20:58 ` Manuel López-Ibáñez
` (3 subsequent siblings)
4 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-26 20:01 UTC (permalink / raw)
To: Richard Guenther
Cc: Manuel López-Ibáñez, Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 8:36 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 5:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
>> <lopezibanez@gmail.com> wrote:
>>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>>> Could we put a limit to the commit log entry? More than 500 hundred
>>>> lines changelog entries should just be rejected and this will avoid
>>>> someone accidentally committing a full log or a diff or just random
>>>> junk.
>>>>
>>>
>>> The following patch to our pre-commit hook enables this. I have tested
>>> it with a dummy repository but review from bourne-shell and/or
>>> subversion knowledgeable people would be welcome.
>>>
>>
>> When I add 600 testcases, should I mention each of them in commit log?
>
> Yes.
>
> IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
>
Shouldn't svnmerge be fixed not to generate such log?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:47 ` Richard Guenther
2008-08-26 19:15 ` Richard Guenther
2008-08-26 19:31 ` H.J. Lu
@ 2008-08-26 20:04 ` Richard Guenther
2008-08-26 22:09 ` Manuel López-Ibáñez
` (5 subsequent siblings)
8 siblings, 0 replies; 86+ messages in thread
From: Richard Guenther @ 2008-08-26 20:04 UTC (permalink / raw)
To: H.J. Lu; +Cc: Manuel López-Ibáñez, Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 5:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>> Could we put a limit to the commit log entry? More than 500 hundred
>>> lines changelog entries should just be rejected and this will avoid
>>> someone accidentally committing a full log or a diff or just random
>>> junk.
>>>
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>
> When I add 600 testcases, should I mention each of them in commit log?
Yes.
IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
Richard.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:35 ` H.J. Lu
` (2 preceding siblings ...)
2008-08-26 17:56 ` H.J. Lu
@ 2008-08-26 20:19 ` H.J. Lu
2008-08-26 20:49 ` Manuel López-Ibáñez
2008-08-27 11:26 ` H.J. Lu
5 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-26 20:19 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> Could we put a limit to the commit log entry? More than 500 hundred
>> lines changelog entries should just be rejected and this will avoid
>> someone accidentally committing a full log or a diff or just random
>> junk.
>>
>
> The following patch to our pre-commit hook enables this. I have tested
> it with a dummy repository but review from bourne-shell and/or
> subversion knowledgeable people would be welcome.
>
When I add 600 testcases, should I mention each of them in commit log?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 16:41 [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging) Manuel López-Ibáñez
` (3 preceding siblings ...)
2008-08-26 17:37 ` Manuel López-Ibáñez
@ 2008-08-26 20:22 ` Manuel López-Ibáñez
[not found] ` <1219764262.13055.58.camel@localhost>
` (3 subsequent siblings)
8 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 20:22 UTC (permalink / raw)
To: Gcc Patch List; +Cc: Daniel Berlin
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
> Could we put a limit to the commit log entry? More than 500 hundred
> lines changelog entries should just be rejected and this will avoid
> someone accidentally committing a full log or a diff or just random
> junk.
>
The following patch to our pre-commit hook enables this. I have tested
it with a dummy repository but review from bourne-shell and/or
subversion knowledgeable people would be welcome.
Who can approve this?
Cheers,
Manuel.
[-- Attachment #2: pre-commit.diff --]
[-- Type: text/plain, Size: 1723 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,23 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+LOGLINES=`$SVNLOOK log -t "$TXN" "$REPOS" | wc -l`
+if test $LOGLINES -gt 500; then
+ echo "A single ChangeLog entry cannot be larger than 500 lines. " >&2
+ echo "Please check again the log message of this commit. " >&2
+ echo "If you are merging from/to a branch, never use log messages from" >&2
+ echo "other revisions as the commit message. " >&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
[not found] ` <1219764262.13055.58.camel@localhost>
@ 2008-08-26 20:47 ` Manuel López-Ibáñez
2008-08-26 22:35 ` Manuel López-Ibáñez
` (6 more replies)
0 siblings, 7 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 20:47 UTC (permalink / raw)
To: Laurent GUERBY, Gcc Patch List
Of 139510 commits, only 12 have more than 500 lines and only 9 have
more than 700. There are two with more than 1000 lines.
r136433 | jakub | 2008-06-06 15:01:54 +0200 (Fri, 06 Jun 2008) | 889 lines
r122168 | bkoz | 2007-02-20 19:15:01 +0100 (Tue, 20 Feb 2007) | 920 lines
r122018 | sandra | 2007-02-16 00:50:49 +0100 (Fri, 16 Feb 2007) | 862 lines
r114659 | bkoz | 2006-06-15 01:09:51 +0200 (Thu, 15 Jun 2006) | 878 lines
r108152 | rsandifo | 2005-12-07 08:53:14 +0100 (Wed, 07 Dec 2005) | 500 lines
r95152 | mkoch | 2005-02-17 08:48:58 +0100 (Thu, 17 Feb 2005) | 616 lines
r95115 | graydon | 2005-02-16 21:03:29 +0100 (Wed, 16 Feb 2005) | 1998 lines
r82314 | graydon | 2004-05-27 08:17:44 +0200 (Thu, 27 May 2004) | 556 lines
r79607 | graydon | 2004-03-17 22:29:02 +0100 (Wed, 17 Mar 2004) | 578 lines
r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
Anyone can disable the hook script for special cases (it is versioned
after all just "svn co svn+ssh://gcc.gnu.org/svn/gcc/hooks").
Cheers,
Manuel
2008/8/26 Laurent GUERBY <laurent@guerby.net>:
> Out of curiosity did you do a batch scan of existing ChangeLog
> files to see how many entries are above your choosen limit of 500 lines?
>
> Laurent
>
> On Tue, 2008-08-26 at 16:18 +0200, Manuel López-Ibáñez wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> > Could we put a limit to the commit log entry? More than 500 hundred
>> > lines changelog entries should just be rejected and this will avoid
>> > someone accidentally committing a full log or a diff or just random
>> > junk.
>> >
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>> Who can approve this?
>>
>> Cheers,
>>
>> Manuel.
>
>
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:35 ` H.J. Lu
` (3 preceding siblings ...)
2008-08-26 20:19 ` H.J. Lu
@ 2008-08-26 20:49 ` Manuel López-Ibáñez
2008-08-26 21:53 ` H.J. Lu
` (6 more replies)
2008-08-27 11:26 ` H.J. Lu
5 siblings, 7 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 20:49 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> When I add 600 testcases, should I mention each of them in commit log?
500 was just a number. That said, you could very well do 2 commits of
300 testcases.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 19:31 ` H.J. Lu
2008-08-26 20:01 ` H.J. Lu
@ 2008-08-26 20:58 ` Manuel López-Ibáñez
2008-08-26 22:50 ` Manuel López-Ibáñez
` (4 more replies)
2008-08-27 8:08 ` H.J. Lu
` (2 subsequent siblings)
4 siblings, 5 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 20:58 UTC (permalink / raw)
To: H.J. Lu; +Cc: Richard Guenther, Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> Shouldn't svnmerge be fixed not to generate such log?
svnmerge generates a file, it does not commit that file as a log for
you. In some other project, that file could be the commit log. However
in GCC's repository, committing that file is a mistake that some
people do sometimes. (Everybody does mistakes sometimes).
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:49 ` Manuel López-Ibáñez
@ 2008-08-26 21:53 ` H.J. Lu
2008-08-27 0:54 ` H.J. Lu
` (4 more replies)
2008-08-26 22:21 ` Manuel López-Ibáñez
` (5 subsequent siblings)
6 siblings, 5 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-26 21:53 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>
>> When I add 600 testcases, should I mention each of them in commit log?
>
> 500 was just a number. That said, you could very well do 2 commits of
> 300 testcases.
>
It will be very odd. I believe some libjava merges updated more than 500
files. If we have to break such checkins into several smaller ones just
because svnmerge can't handle it properly, maybe we should ban
svnmerge instead.
FWIW, I don't use svnmerge and I never have any problems to
merge between branches with "svn merge".
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:47 ` Richard Guenther
` (2 preceding siblings ...)
2008-08-26 20:04 ` Richard Guenther
@ 2008-08-26 22:09 ` Manuel López-Ibáñez
2008-08-26 23:31 ` Manuel López-Ibáñez
` (3 more replies)
2008-08-27 0:42 ` Richard Guenther
` (4 subsequent siblings)
8 siblings, 4 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 22:09 UTC (permalink / raw)
To: Richard Guenther; +Cc: H.J. Lu, Gcc Patch List, Daniel Berlin
2008/8/26 Richard Guenther <richard.guenther@gmail.com>:
>
> IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
600 lines is *very* long (see the numbers I just sent). We do not want
such large patches in one go. They make regression hunting useless.
But yes, we could balk at the string "via svnmerge from" which I think
is "standard" in logs generated by svnmerge. Would that be acceptable?
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:49 ` Manuel López-Ibáñez
2008-08-26 21:53 ` H.J. Lu
@ 2008-08-26 22:21 ` Manuel López-Ibáñez
2008-08-27 6:19 ` Manuel López-Ibáñez
` (4 subsequent siblings)
6 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 22:21 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> When I add 600 testcases, should I mention each of them in commit log?
500 was just a number. That said, you could very well do 2 commits of
300 testcases.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:47 ` Manuel López-Ibáñez
@ 2008-08-26 22:35 ` Manuel López-Ibáñez
2008-08-27 4:35 ` Manuel López-Ibáñez
` (5 subsequent siblings)
6 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 22:35 UTC (permalink / raw)
To: Laurent GUERBY, Gcc Patch List
Of 139510 commits, only 12 have more than 500 lines and only 9 have
more than 700. There are two with more than 1000 lines.
r136433 | jakub | 2008-06-06 15:01:54 +0200 (Fri, 06 Jun 2008) | 889 lines
r122168 | bkoz | 2007-02-20 19:15:01 +0100 (Tue, 20 Feb 2007) | 920 lines
r122018 | sandra | 2007-02-16 00:50:49 +0100 (Fri, 16 Feb 2007) | 862 lines
r114659 | bkoz | 2006-06-15 01:09:51 +0200 (Thu, 15 Jun 2006) | 878 lines
r108152 | rsandifo | 2005-12-07 08:53:14 +0100 (Wed, 07 Dec 2005) | 500 lines
r95152 | mkoch | 2005-02-17 08:48:58 +0100 (Thu, 17 Feb 2005) | 616 lines
r95115 | graydon | 2005-02-16 21:03:29 +0100 (Wed, 16 Feb 2005) | 1998 lines
r82314 | graydon | 2004-05-27 08:17:44 +0200 (Thu, 27 May 2004) | 556 lines
r79607 | graydon | 2004-03-17 22:29:02 +0100 (Wed, 17 Mar 2004) | 578 lines
r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
Anyone can disable the hook script for special cases (it is versioned
after all just "svn co svn+ssh://gcc.gnu.org/svn/gcc/hooks").
Cheers,
Manuel
2008/8/26 Laurent GUERBY <laurent@guerby.net>:
> Out of curiosity did you do a batch scan of existing ChangeLog
> files to see how many entries are above your choosen limit of 500 lines?
>
> Laurent
>
> On Tue, 2008-08-26 at 16:18 +0200, Manuel López-Ibáñez wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> > Could we put a limit to the commit log entry? More than 500 hundred
>> > lines changelog entries should just be rejected and this will avoid
>> > someone accidentally committing a full log or a diff or just random
>> > junk.
>> >
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>> Who can approve this?
>>
>> Cheers,
>>
>> Manuel.
>
>
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:58 ` Manuel López-Ibáñez
@ 2008-08-26 22:50 ` Manuel López-Ibáñez
2008-08-27 7:41 ` Manuel López-Ibáñez
` (3 subsequent siblings)
4 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 22:50 UTC (permalink / raw)
To: H.J. Lu; +Cc: Richard Guenther, Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> Shouldn't svnmerge be fixed not to generate such log?
svnmerge generates a file, it does not commit that file as a log for
you. In some other project, that file could be the commit log. However
in GCC's repository, committing that file is a mistake that some
people do sometimes. (Everybody does mistakes sometimes).
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 22:09 ` Manuel López-Ibáñez
@ 2008-08-26 23:31 ` Manuel López-Ibáñez
2008-08-27 10:40 ` Manuel López-Ibáñez
` (2 subsequent siblings)
3 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-26 23:31 UTC (permalink / raw)
To: Richard Guenther; +Cc: H.J. Lu, Gcc Patch List, Daniel Berlin
2008/8/26 Richard Guenther <richard.guenther@gmail.com>:
>
> IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
600 lines is *very* long (see the numbers I just sent). We do not want
such large patches in one go. They make regression hunting useless.
But yes, we could balk at the string "via svnmerge from" which I think
is "standard" in logs generated by svnmerge. Would that be acceptable?
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:47 ` Richard Guenther
` (3 preceding siblings ...)
2008-08-26 22:09 ` Manuel López-Ibáñez
@ 2008-08-27 0:42 ` Richard Guenther
2008-08-27 7:54 ` Manuel López-Ibáñez
` (3 subsequent siblings)
8 siblings, 0 replies; 86+ messages in thread
From: Richard Guenther @ 2008-08-27 0:42 UTC (permalink / raw)
To: H.J. Lu; +Cc: Manuel López-Ibáñez, Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 5:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>> Could we put a limit to the commit log entry? More than 500 hundred
>>> lines changelog entries should just be rejected and this will avoid
>>> someone accidentally committing a full log or a diff or just random
>>> junk.
>>>
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>
> When I add 600 testcases, should I mention each of them in commit log?
Yes.
IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
Richard.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 21:53 ` H.J. Lu
@ 2008-08-27 0:54 ` H.J. Lu
2008-08-27 4:21 ` Manuel López-Ibáñez
` (3 subsequent siblings)
4 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 0:54 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>
>> When I add 600 testcases, should I mention each of them in commit log?
>
> 500 was just a number. That said, you could very well do 2 commits of
> 300 testcases.
>
It will be very odd. I believe some libjava merges updated more than 500
files. If we have to break such checkins into several smaller ones just
because svnmerge can't handle it properly, maybe we should ban
svnmerge instead.
FWIW, I don't use svnmerge and I never have any problems to
merge between branches with "svn merge".
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 21:53 ` H.J. Lu
2008-08-27 0:54 ` H.J. Lu
@ 2008-08-27 4:21 ` Manuel López-Ibáñez
2008-08-27 8:02 ` Manuel López-Ibáñez
` (5 more replies)
2008-08-27 12:01 ` H.J. Lu
` (2 subsequent siblings)
4 siblings, 6 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 4:21 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
> On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>
>>> When I add 600 testcases, should I mention each of them in commit log?
>>
>> 500 was just a number. That said, you could very well do 2 commits of
>> 300 testcases.
>>
>
> It will be very odd. I believe some libjava merges updated more than 500
> files. If we have to break such checkins into several smaller ones just
> because svnmerge can't handle it properly, maybe we should ban
> svnmerge instead.
>
> FWIW, I don't use svnmerge and I never have any problems to
> merge between branches with "svn merge".
>
H.J.,
I think you are misunderstanding the problem that this patch is trying to solve.
If you do: svn ci -F file
subversion will use the contents of 'file' as the commit log that you
later can check with 'svn log'.
After a merge but before committing svnmerge generates a file with the
'svn log' output of all revisions merged. If you use this file as the
commit log, then you (a) make harder to read the output of 'svn log'
(b) flood the gcc.gnu.org servers that are parsing your commit log for
PR numbers and sending emails to bugzilla and subscribers. The emails
are the commit logs, so they are typically a very long email with
multiple commits that has no relevance to the receiver.
This is documented in http://gcc.gnu.org/wiki/SvnBranch but everybody
do mistakes.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:47 ` Manuel López-Ibáñez
2008-08-26 22:35 ` Manuel López-Ibáñez
@ 2008-08-27 4:35 ` Manuel López-Ibáñez
2008-08-27 8:27 ` Manuel López-Ibáñez
` (4 subsequent siblings)
6 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 4:35 UTC (permalink / raw)
To: Laurent GUERBY, Gcc Patch List
Of 139510 commits, only 12 have more than 500 lines and only 9 have
more than 700. There are two with more than 1000 lines.
r136433 | jakub | 2008-06-06 15:01:54 +0200 (Fri, 06 Jun 2008) | 889 lines
r122168 | bkoz | 2007-02-20 19:15:01 +0100 (Tue, 20 Feb 2007) | 920 lines
r122018 | sandra | 2007-02-16 00:50:49 +0100 (Fri, 16 Feb 2007) | 862 lines
r114659 | bkoz | 2006-06-15 01:09:51 +0200 (Thu, 15 Jun 2006) | 878 lines
r108152 | rsandifo | 2005-12-07 08:53:14 +0100 (Wed, 07 Dec 2005) | 500 lines
r95152 | mkoch | 2005-02-17 08:48:58 +0100 (Thu, 17 Feb 2005) | 616 lines
r95115 | graydon | 2005-02-16 21:03:29 +0100 (Wed, 16 Feb 2005) | 1998 lines
r82314 | graydon | 2004-05-27 08:17:44 +0200 (Thu, 27 May 2004) | 556 lines
r79607 | graydon | 2004-03-17 22:29:02 +0100 (Wed, 17 Mar 2004) | 578 lines
r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
Anyone can disable the hook script for special cases (it is versioned
after all just "svn co svn+ssh://gcc.gnu.org/svn/gcc/hooks").
Cheers,
Manuel
2008/8/26 Laurent GUERBY <laurent@guerby.net>:
> Out of curiosity did you do a batch scan of existing ChangeLog
> files to see how many entries are above your choosen limit of 500 lines?
>
> Laurent
>
> On Tue, 2008-08-26 at 16:18 +0200, Manuel López-Ibáñez wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> > Could we put a limit to the commit log entry? More than 500 hundred
>> > lines changelog entries should just be rejected and this will avoid
>> > someone accidentally committing a full log or a diff or just random
>> > junk.
>> >
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>> Who can approve this?
>>
>> Cheers,
>>
>> Manuel.
>
>
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:49 ` Manuel López-Ibáñez
2008-08-26 21:53 ` H.J. Lu
2008-08-26 22:21 ` Manuel López-Ibáñez
@ 2008-08-27 6:19 ` Manuel López-Ibáñez
2008-08-27 13:36 ` Manuel López-Ibáñez
` (3 subsequent siblings)
6 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 6:19 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> When I add 600 testcases, should I mention each of them in commit log?
500 was just a number. That said, you could very well do 2 commits of
300 testcases.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:58 ` Manuel López-Ibáñez
2008-08-26 22:50 ` Manuel López-Ibáñez
@ 2008-08-27 7:41 ` Manuel López-Ibáñez
2008-08-27 11:26 ` Manuel López-Ibáñez
` (2 subsequent siblings)
4 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 7:41 UTC (permalink / raw)
To: H.J. Lu; +Cc: Richard Guenther, Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> Shouldn't svnmerge be fixed not to generate such log?
svnmerge generates a file, it does not commit that file as a log for
you. In some other project, that file could be the commit log. However
in GCC's repository, committing that file is a mistake that some
people do sometimes. (Everybody does mistakes sometimes).
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:47 ` Richard Guenther
` (4 preceding siblings ...)
2008-08-27 0:42 ` Richard Guenther
@ 2008-08-27 7:54 ` Manuel López-Ibáñez
2008-08-27 18:15 ` Manuel López-Ibáñez
2008-08-27 12:51 ` Richard Guenther
` (2 subsequent siblings)
8 siblings, 1 reply; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 7:54 UTC (permalink / raw)
To: Richard Guenther; +Cc: H.J. Lu, Gcc Patch List, Daniel Berlin
[-- Attachment #1: Type: text/plain, Size: 204 bytes --]
2008/8/26 Richard Guenther <richard.guenther@gmail.com>:
>
> Can't we simply detect svnmerge logs somehow?
I think this will do it as long as they do not change the message.
Opinions?
Cheers,
Manuel.
[-- Attachment #2: pre-commit-ban-svnmerge-logs.diff --]
[-- Type: text/plain, Size: 1571 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,21 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "via svnmerge from" > /dev/null
+if [ $? -eq 0 ]; then
+ echo "Please, do not use the log generated by svnmerge as a commit log.">&2
+ echo "Read http://gcc.gnu.org/wiki/SvnBranch for more information. ">&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 4:21 ` Manuel López-Ibáñez
@ 2008-08-27 8:02 ` Manuel López-Ibáñez
2008-08-27 9:00 ` Manuel López-Ibáñez
` (4 subsequent siblings)
5 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 8:02 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
> On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>
>>> When I add 600 testcases, should I mention each of them in commit log?
>>
>> 500 was just a number. That said, you could very well do 2 commits of
>> 300 testcases.
>>
>
> It will be very odd. I believe some libjava merges updated more than 500
> files. If we have to break such checkins into several smaller ones just
> because svnmerge can't handle it properly, maybe we should ban
> svnmerge instead.
>
> FWIW, I don't use svnmerge and I never have any problems to
> merge between branches with "svn merge".
>
H.J.,
I think you are misunderstanding the problem that this patch is trying to solve.
If you do: svn ci -F file
subversion will use the contents of 'file' as the commit log that you
later can check with 'svn log'.
After a merge but before committing svnmerge generates a file with the
'svn log' output of all revisions merged. If you use this file as the
commit log, then you (a) make harder to read the output of 'svn log'
(b) flood the gcc.gnu.org servers that are parsing your commit log for
PR numbers and sending emails to bugzilla and subscribers. The emails
are the commit logs, so they are typically a very long email with
multiple commits that has no relevance to the receiver.
This is documented in http://gcc.gnu.org/wiki/SvnBranch but everybody
do mistakes.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 19:31 ` H.J. Lu
2008-08-26 20:01 ` H.J. Lu
2008-08-26 20:58 ` Manuel López-Ibáñez
@ 2008-08-27 8:08 ` H.J. Lu
2008-08-27 16:30 ` H.J. Lu
2008-08-27 23:58 ` H.J. Lu
4 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 8:08 UTC (permalink / raw)
To: Richard Guenther
Cc: Manuel López-Ibáñez, Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 8:36 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 5:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
>> <lopezibanez@gmail.com> wrote:
>>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>>> Could we put a limit to the commit log entry? More than 500 hundred
>>>> lines changelog entries should just be rejected and this will avoid
>>>> someone accidentally committing a full log or a diff or just random
>>>> junk.
>>>>
>>>
>>> The following patch to our pre-commit hook enables this. I have tested
>>> it with a dummy repository but review from bourne-shell and/or
>>> subversion knowledgeable people would be welcome.
>>>
>>
>> When I add 600 testcases, should I mention each of them in commit log?
>
> Yes.
>
> IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
>
Shouldn't svnmerge be fixed not to generate such log?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:47 ` Manuel López-Ibáñez
2008-08-26 22:35 ` Manuel López-Ibáñez
2008-08-27 4:35 ` Manuel López-Ibáñez
@ 2008-08-27 8:27 ` Manuel López-Ibáñez
2008-08-27 15:12 ` Paolo Bonzini
` (3 subsequent siblings)
6 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 8:27 UTC (permalink / raw)
To: Laurent GUERBY, Gcc Patch List
Of 139510 commits, only 12 have more than 500 lines and only 9 have
more than 700. There are two with more than 1000 lines.
r136433 | jakub | 2008-06-06 15:01:54 +0200 (Fri, 06 Jun 2008) | 889 lines
r122168 | bkoz | 2007-02-20 19:15:01 +0100 (Tue, 20 Feb 2007) | 920 lines
r122018 | sandra | 2007-02-16 00:50:49 +0100 (Fri, 16 Feb 2007) | 862 lines
r114659 | bkoz | 2006-06-15 01:09:51 +0200 (Thu, 15 Jun 2006) | 878 lines
r108152 | rsandifo | 2005-12-07 08:53:14 +0100 (Wed, 07 Dec 2005) | 500 lines
r95152 | mkoch | 2005-02-17 08:48:58 +0100 (Thu, 17 Feb 2005) | 616 lines
r95115 | graydon | 2005-02-16 21:03:29 +0100 (Wed, 16 Feb 2005) | 1998 lines
r82314 | graydon | 2004-05-27 08:17:44 +0200 (Thu, 27 May 2004) | 556 lines
r79607 | graydon | 2004-03-17 22:29:02 +0100 (Wed, 17 Mar 2004) | 578 lines
r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
Anyone can disable the hook script for special cases (it is versioned
after all just "svn co svn+ssh://gcc.gnu.org/svn/gcc/hooks").
Cheers,
Manuel
2008/8/26 Laurent GUERBY <laurent@guerby.net>:
> Out of curiosity did you do a batch scan of existing ChangeLog
> files to see how many entries are above your choosen limit of 500 lines?
>
> Laurent
>
> On Tue, 2008-08-26 at 16:18 +0200, Manuel López-Ibáñez wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> > Could we put a limit to the commit log entry? More than 500 hundred
>> > lines changelog entries should just be rejected and this will avoid
>> > someone accidentally committing a full log or a diff or just random
>> > junk.
>> >
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>> Who can approve this?
>>
>> Cheers,
>>
>> Manuel.
>
>
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 4:21 ` Manuel López-Ibáñez
2008-08-27 8:02 ` Manuel López-Ibáñez
@ 2008-08-27 9:00 ` Manuel López-Ibáñez
2008-08-27 13:54 ` H.J. Lu
` (3 subsequent siblings)
5 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 9:00 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
> On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>
>>> When I add 600 testcases, should I mention each of them in commit log?
>>
>> 500 was just a number. That said, you could very well do 2 commits of
>> 300 testcases.
>>
>
> It will be very odd. I believe some libjava merges updated more than 500
> files. If we have to break such checkins into several smaller ones just
> because svnmerge can't handle it properly, maybe we should ban
> svnmerge instead.
>
> FWIW, I don't use svnmerge and I never have any problems to
> merge between branches with "svn merge".
>
H.J.,
I think you are misunderstanding the problem that this patch is trying to solve.
If you do: svn ci -F file
subversion will use the contents of 'file' as the commit log that you
later can check with 'svn log'.
After a merge but before committing svnmerge generates a file with the
'svn log' output of all revisions merged. If you use this file as the
commit log, then you (a) make harder to read the output of 'svn log'
(b) flood the gcc.gnu.org servers that are parsing your commit log for
PR numbers and sending emails to bugzilla and subscribers. The emails
are the commit logs, so they are typically a very long email with
multiple commits that has no relevance to the receiver.
This is documented in http://gcc.gnu.org/wiki/SvnBranch but everybody
do mistakes.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 22:09 ` Manuel López-Ibáñez
2008-08-26 23:31 ` Manuel López-Ibáñez
@ 2008-08-27 10:40 ` Manuel López-Ibáñez
2008-08-27 18:25 ` Manuel López-Ibáñez
2008-08-27 22:09 ` Manuel López-Ibáñez
3 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 10:40 UTC (permalink / raw)
To: Richard Guenther; +Cc: H.J. Lu, Gcc Patch List, Daniel Berlin
2008/8/26 Richard Guenther <richard.guenther@gmail.com>:
>
> IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
600 lines is *very* long (see the numbers I just sent). We do not want
such large patches in one go. They make regression hunting useless.
But yes, we could balk at the string "via svnmerge from" which I think
is "standard" in logs generated by svnmerge. Would that be acceptable?
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:35 ` H.J. Lu
` (4 preceding siblings ...)
2008-08-26 20:49 ` Manuel López-Ibáñez
@ 2008-08-27 11:26 ` H.J. Lu
5 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 11:26 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> Could we put a limit to the commit log entry? More than 500 hundred
>> lines changelog entries should just be rejected and this will avoid
>> someone accidentally committing a full log or a diff or just random
>> junk.
>>
>
> The following patch to our pre-commit hook enables this. I have tested
> it with a dummy repository but review from bourne-shell and/or
> subversion knowledgeable people would be welcome.
>
When I add 600 testcases, should I mention each of them in commit log?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:58 ` Manuel López-Ibáñez
2008-08-26 22:50 ` Manuel López-Ibáñez
2008-08-27 7:41 ` Manuel López-Ibáñez
@ 2008-08-27 11:26 ` Manuel López-Ibáñez
2008-08-27 16:10 ` Manuel López-Ibáñez
2008-08-27 22:20 ` Manuel López-Ibáñez
4 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 11:26 UTC (permalink / raw)
To: H.J. Lu; +Cc: Richard Guenther, Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> Shouldn't svnmerge be fixed not to generate such log?
svnmerge generates a file, it does not commit that file as a log for
you. In some other project, that file could be the commit log. However
in GCC's repository, committing that file is a mistake that some
people do sometimes. (Everybody does mistakes sometimes).
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 21:53 ` H.J. Lu
2008-08-27 0:54 ` H.J. Lu
2008-08-27 4:21 ` Manuel López-Ibáñez
@ 2008-08-27 12:01 ` H.J. Lu
2008-08-27 19:43 ` H.J. Lu
2008-08-27 22:59 ` H.J. Lu
4 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 12:01 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>
>> When I add 600 testcases, should I mention each of them in commit log?
>
> 500 was just a number. That said, you could very well do 2 commits of
> 300 testcases.
>
It will be very odd. I believe some libjava merges updated more than 500
files. If we have to break such checkins into several smaller ones just
because svnmerge can't handle it properly, maybe we should ban
svnmerge instead.
FWIW, I don't use svnmerge and I never have any problems to
merge between branches with "svn merge".
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:47 ` Richard Guenther
` (5 preceding siblings ...)
2008-08-27 7:54 ` Manuel López-Ibáñez
@ 2008-08-27 12:51 ` Richard Guenther
2008-08-27 18:36 ` Richard Guenther
2008-08-27 20:45 ` Richard Guenther
8 siblings, 0 replies; 86+ messages in thread
From: Richard Guenther @ 2008-08-27 12:51 UTC (permalink / raw)
To: H.J. Lu; +Cc: Manuel López-Ibáñez, Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 5:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>> Could we put a limit to the commit log entry? More than 500 hundred
>>> lines changelog entries should just be rejected and this will avoid
>>> someone accidentally committing a full log or a diff or just random
>>> junk.
>>>
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>
> When I add 600 testcases, should I mention each of them in commit log?
Yes.
IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
Richard.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:49 ` Manuel López-Ibáñez
` (2 preceding siblings ...)
2008-08-27 6:19 ` Manuel López-Ibáñez
@ 2008-08-27 13:36 ` Manuel López-Ibáñez
2008-08-27 17:47 ` Manuel López-Ibáñez
` (2 subsequent siblings)
6 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 13:36 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> When I add 600 testcases, should I mention each of them in commit log?
500 was just a number. That said, you could very well do 2 commits of
300 testcases.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 4:21 ` Manuel López-Ibáñez
2008-08-27 8:02 ` Manuel López-Ibáñez
2008-08-27 9:00 ` Manuel López-Ibáñez
@ 2008-08-27 13:54 ` H.J. Lu
2008-08-27 14:46 ` Manuel López-Ibáñez
` (4 more replies)
2008-08-27 16:46 ` Manuel López-Ibáñez
` (2 subsequent siblings)
5 siblings, 5 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 13:54 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 9:46 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>> On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
>> <lopezibanez@gmail.com> wrote:
>>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>>
>>>> When I add 600 testcases, should I mention each of them in commit log?
>>>
>>> 500 was just a number. That said, you could very well do 2 commits of
>>> 300 testcases.
>>>
>>
>> It will be very odd. I believe some libjava merges updated more than 500
>> files. If we have to break such checkins into several smaller ones just
>> because svnmerge can't handle it properly, maybe we should ban
>> svnmerge instead.
>>
>> FWIW, I don't use svnmerge and I never have any problems to
>> merge between branches with "svn merge".
>>
>
> H.J.,
>
> I think you are misunderstanding the problem that this patch is trying to solve.
>
> If you do: svn ci -F file
> subversion will use the contents of 'file' as the commit log that you
> later can check with 'svn log'.
> After a merge but before committing svnmerge generates a file with the
> 'svn log' output of all revisions merged. If you use this file as the
> commit log, then you (a) make harder to read the output of 'svn log'
> (b) flood the gcc.gnu.org servers that are parsing your commit log for
> PR numbers and sending emails to bugzilla and subscribers. The emails
> are the commit logs, so they are typically a very long email with
> multiple commits that has no relevance to the receiver.
Can we modify svnmerge to generate an output which will be ignored
by "svn ci"? Will "svn ci" ignore lines after
--This line, and those below, will be ignored--
if svnmerge puts it at the beginning of its output?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 16:41 [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging) Manuel López-Ibáñez
` (5 preceding siblings ...)
[not found] ` <1219764262.13055.58.camel@localhost>
@ 2008-08-27 14:03 ` Manuel López-Ibáñez
2008-08-27 16:31 ` Manuel López-Ibáñez
2008-08-27 22:48 ` Manuel López-Ibáñez
8 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 14:03 UTC (permalink / raw)
To: Gcc Patch List; +Cc: Daniel Berlin
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
> Could we put a limit to the commit log entry? More than 500 hundred
> lines changelog entries should just be rejected and this will avoid
> someone accidentally committing a full log or a diff or just random
> junk.
>
The following patch to our pre-commit hook enables this. I have tested
it with a dummy repository but review from bourne-shell and/or
subversion knowledgeable people would be welcome.
Who can approve this?
Cheers,
Manuel.
[-- Attachment #2: pre-commit.diff --]
[-- Type: text/plain, Size: 1723 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,23 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+LOGLINES=`$SVNLOOK log -t "$TXN" "$REPOS" | wc -l`
+if test $LOGLINES -gt 500; then
+ echo "A single ChangeLog entry cannot be larger than 500 lines. " >&2
+ echo "Please check again the log message of this commit. " >&2
+ echo "If you are merging from/to a branch, never use log messages from" >&2
+ echo "other revisions as the commit message. " >&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 13:54 ` H.J. Lu
@ 2008-08-27 14:46 ` Manuel López-Ibáñez
2008-08-27 15:41 ` H.J. Lu
` (4 more replies)
2008-08-27 16:13 ` H.J. Lu
` (3 subsequent siblings)
4 siblings, 5 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 14:46 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> Can we modify svnmerge to generate an output which will be ignored
> by "svn ci"?
svnmerge comes with your subversion distribution.
(e.g., package subversion-tools in Ubuntu)
We do not control it.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:47 ` Manuel López-Ibáñez
` (2 preceding siblings ...)
2008-08-27 8:27 ` Manuel López-Ibáñez
@ 2008-08-27 15:12 ` Paolo Bonzini
2008-08-27 16:22 ` Paolo Bonzini
` (3 more replies)
2008-08-27 17:35 ` Manuel López-Ibáñez
` (2 subsequent siblings)
6 siblings, 4 replies; 86+ messages in thread
From: Paolo Bonzini @ 2008-08-27 15:12 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Laurent GUERBY, Gcc Patch List
> r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
> r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
> r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
These were mistakes, and it's the only three I checked. 100% rate. :-)
Paolo
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 14:46 ` Manuel López-Ibáñez
@ 2008-08-27 15:41 ` H.J. Lu
2008-08-27 16:33 ` H.J. Lu
` (3 more replies)
2008-08-27 16:10 ` Manuel López-Ibáñez
` (3 subsequent siblings)
4 siblings, 4 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 15:41 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 10:36 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>
>> Can we modify svnmerge to generate an output which will be ignored
>> by "svn ci"?
>
> svnmerge comes with your subversion distribution.
> (e.g., package subversion-tools in Ubuntu)
> We do not control it.
>
Fedora 9 doesn't come with svnmerge. I don't think it is the
part of the regular subversion package.
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:58 ` Manuel López-Ibáñez
` (2 preceding siblings ...)
2008-08-27 11:26 ` Manuel López-Ibáñez
@ 2008-08-27 16:10 ` Manuel López-Ibáñez
2008-08-27 22:20 ` Manuel López-Ibáñez
4 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 16:10 UTC (permalink / raw)
To: H.J. Lu; +Cc: Richard Guenther, Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> Shouldn't svnmerge be fixed not to generate such log?
svnmerge generates a file, it does not commit that file as a log for
you. In some other project, that file could be the commit log. However
in GCC's repository, committing that file is a mistake that some
people do sometimes. (Everybody does mistakes sometimes).
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 14:46 ` Manuel López-Ibáñez
2008-08-27 15:41 ` H.J. Lu
@ 2008-08-27 16:10 ` Manuel López-Ibáñez
2008-08-27 17:50 ` Manuel López-Ibáñez
` (2 subsequent siblings)
4 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 16:10 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> Can we modify svnmerge to generate an output which will be ignored
> by "svn ci"?
svnmerge comes with your subversion distribution.
(e.g., package subversion-tools in Ubuntu)
We do not control it.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 13:54 ` H.J. Lu
2008-08-27 14:46 ` Manuel López-Ibáñez
@ 2008-08-27 16:13 ` H.J. Lu
2008-08-27 18:40 ` H.J. Lu
` (2 subsequent siblings)
4 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 16:13 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 9:46 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>> On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
>> <lopezibanez@gmail.com> wrote:
>>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>>
>>>> When I add 600 testcases, should I mention each of them in commit log?
>>>
>>> 500 was just a number. That said, you could very well do 2 commits of
>>> 300 testcases.
>>>
>>
>> It will be very odd. I believe some libjava merges updated more than 500
>> files. If we have to break such checkins into several smaller ones just
>> because svnmerge can't handle it properly, maybe we should ban
>> svnmerge instead.
>>
>> FWIW, I don't use svnmerge and I never have any problems to
>> merge between branches with "svn merge".
>>
>
> H.J.,
>
> I think you are misunderstanding the problem that this patch is trying to solve.
>
> If you do: svn ci -F file
> subversion will use the contents of 'file' as the commit log that you
> later can check with 'svn log'.
> After a merge but before committing svnmerge generates a file with the
> 'svn log' output of all revisions merged. If you use this file as the
> commit log, then you (a) make harder to read the output of 'svn log'
> (b) flood the gcc.gnu.org servers that are parsing your commit log for
> PR numbers and sending emails to bugzilla and subscribers. The emails
> are the commit logs, so they are typically a very long email with
> multiple commits that has no relevance to the receiver.
Can we modify svnmerge to generate an output which will be ignored
by "svn ci"? Will "svn ci" ignore lines after
--This line, and those below, will be ignored--
if svnmerge puts it at the beginning of its output?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 15:12 ` Paolo Bonzini
@ 2008-08-27 16:22 ` Paolo Bonzini
2008-08-27 19:30 ` Paolo Bonzini
` (2 subsequent siblings)
3 siblings, 0 replies; 86+ messages in thread
From: Paolo Bonzini @ 2008-08-27 16:22 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Laurent GUERBY, Gcc Patch List
> r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
> r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
> r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
These were mistakes, and it's the only three I checked. 100% rate. :-)
Paolo
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 19:31 ` H.J. Lu
` (2 preceding siblings ...)
2008-08-27 8:08 ` H.J. Lu
@ 2008-08-27 16:30 ` H.J. Lu
2008-08-27 23:58 ` H.J. Lu
4 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 16:30 UTC (permalink / raw)
To: Richard Guenther
Cc: Manuel López-Ibáñez, Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 8:36 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 5:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
>> <lopezibanez@gmail.com> wrote:
>>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>>> Could we put a limit to the commit log entry? More than 500 hundred
>>>> lines changelog entries should just be rejected and this will avoid
>>>> someone accidentally committing a full log or a diff or just random
>>>> junk.
>>>>
>>>
>>> The following patch to our pre-commit hook enables this. I have tested
>>> it with a dummy repository but review from bourne-shell and/or
>>> subversion knowledgeable people would be welcome.
>>>
>>
>> When I add 600 testcases, should I mention each of them in commit log?
>
> Yes.
>
> IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
>
Shouldn't svnmerge be fixed not to generate such log?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 16:41 [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging) Manuel López-Ibáñez
` (6 preceding siblings ...)
2008-08-27 14:03 ` Manuel López-Ibáñez
@ 2008-08-27 16:31 ` Manuel López-Ibáñez
2008-08-27 22:48 ` Manuel López-Ibáñez
8 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 16:31 UTC (permalink / raw)
To: Gcc Patch List; +Cc: Daniel Berlin
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
> Could we put a limit to the commit log entry? More than 500 hundred
> lines changelog entries should just be rejected and this will avoid
> someone accidentally committing a full log or a diff or just random
> junk.
>
The following patch to our pre-commit hook enables this. I have tested
it with a dummy repository but review from bourne-shell and/or
subversion knowledgeable people would be welcome.
Who can approve this?
Cheers,
Manuel.
[-- Attachment #2: pre-commit.diff --]
[-- Type: text/plain, Size: 1723 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,23 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+LOGLINES=`$SVNLOOK log -t "$TXN" "$REPOS" | wc -l`
+if test $LOGLINES -gt 500; then
+ echo "A single ChangeLog entry cannot be larger than 500 lines. " >&2
+ echo "Please check again the log message of this commit. " >&2
+ echo "If you are merging from/to a branch, never use log messages from" >&2
+ echo "other revisions as the commit message. " >&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 15:41 ` H.J. Lu
@ 2008-08-27 16:33 ` H.J. Lu
2008-08-27 19:55 ` H.J. Lu
` (2 subsequent siblings)
3 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 16:33 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 10:36 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>
>> Can we modify svnmerge to generate an output which will be ignored
>> by "svn ci"?
>
> svnmerge comes with your subversion distribution.
> (e.g., package subversion-tools in Ubuntu)
> We do not control it.
>
Fedora 9 doesn't come with svnmerge. I don't think it is the
part of the regular subversion package.
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 4:21 ` Manuel López-Ibáñez
` (2 preceding siblings ...)
2008-08-27 13:54 ` H.J. Lu
@ 2008-08-27 16:46 ` Manuel López-Ibáñez
2008-08-27 18:24 ` Manuel López-Ibáñez
2008-08-27 20:34 ` Manuel López-Ibáñez
5 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 16:46 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
> On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>
>>> When I add 600 testcases, should I mention each of them in commit log?
>>
>> 500 was just a number. That said, you could very well do 2 commits of
>> 300 testcases.
>>
>
> It will be very odd. I believe some libjava merges updated more than 500
> files. If we have to break such checkins into several smaller ones just
> because svnmerge can't handle it properly, maybe we should ban
> svnmerge instead.
>
> FWIW, I don't use svnmerge and I never have any problems to
> merge between branches with "svn merge".
>
H.J.,
I think you are misunderstanding the problem that this patch is trying to solve.
If you do: svn ci -F file
subversion will use the contents of 'file' as the commit log that you
later can check with 'svn log'.
After a merge but before committing svnmerge generates a file with the
'svn log' output of all revisions merged. If you use this file as the
commit log, then you (a) make harder to read the output of 'svn log'
(b) flood the gcc.gnu.org servers that are parsing your commit log for
PR numbers and sending emails to bugzilla and subscribers. The emails
are the commit logs, so they are typically a very long email with
multiple commits that has no relevance to the receiver.
This is documented in http://gcc.gnu.org/wiki/SvnBranch but everybody
do mistakes.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:47 ` Manuel López-Ibáñez
` (3 preceding siblings ...)
2008-08-27 15:12 ` Paolo Bonzini
@ 2008-08-27 17:35 ` Manuel López-Ibáñez
2008-08-27 19:57 ` Manuel López-Ibáñez
2008-08-27 22:22 ` Manuel López-Ibáñez
6 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 17:35 UTC (permalink / raw)
To: Laurent GUERBY, Gcc Patch List
Of 139510 commits, only 12 have more than 500 lines and only 9 have
more than 700. There are two with more than 1000 lines.
r136433 | jakub | 2008-06-06 15:01:54 +0200 (Fri, 06 Jun 2008) | 889 lines
r122168 | bkoz | 2007-02-20 19:15:01 +0100 (Tue, 20 Feb 2007) | 920 lines
r122018 | sandra | 2007-02-16 00:50:49 +0100 (Fri, 16 Feb 2007) | 862 lines
r114659 | bkoz | 2006-06-15 01:09:51 +0200 (Thu, 15 Jun 2006) | 878 lines
r108152 | rsandifo | 2005-12-07 08:53:14 +0100 (Wed, 07 Dec 2005) | 500 lines
r95152 | mkoch | 2005-02-17 08:48:58 +0100 (Thu, 17 Feb 2005) | 616 lines
r95115 | graydon | 2005-02-16 21:03:29 +0100 (Wed, 16 Feb 2005) | 1998 lines
r82314 | graydon | 2004-05-27 08:17:44 +0200 (Thu, 27 May 2004) | 556 lines
r79607 | graydon | 2004-03-17 22:29:02 +0100 (Wed, 17 Mar 2004) | 578 lines
r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
Anyone can disable the hook script for special cases (it is versioned
after all just "svn co svn+ssh://gcc.gnu.org/svn/gcc/hooks").
Cheers,
Manuel
2008/8/26 Laurent GUERBY <laurent@guerby.net>:
> Out of curiosity did you do a batch scan of existing ChangeLog
> files to see how many entries are above your choosen limit of 500 lines?
>
> Laurent
>
> On Tue, 2008-08-26 at 16:18 +0200, Manuel López-Ibáñez wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> > Could we put a limit to the commit log entry? More than 500 hundred
>> > lines changelog entries should just be rejected and this will avoid
>> > someone accidentally committing a full log or a diff or just random
>> > junk.
>> >
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>> Who can approve this?
>>
>> Cheers,
>>
>> Manuel.
>
>
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:49 ` Manuel López-Ibáñez
` (3 preceding siblings ...)
2008-08-27 13:36 ` Manuel López-Ibáñez
@ 2008-08-27 17:47 ` Manuel López-Ibáñez
2008-08-27 18:25 ` Manuel López-Ibáñez
2008-08-27 22:20 ` Manuel López-Ibáñez
6 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 17:47 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> When I add 600 testcases, should I mention each of them in commit log?
500 was just a number. That said, you could very well do 2 commits of
300 testcases.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 14:46 ` Manuel López-Ibáñez
2008-08-27 15:41 ` H.J. Lu
2008-08-27 16:10 ` Manuel López-Ibáñez
@ 2008-08-27 17:50 ` Manuel López-Ibáñez
2008-08-27 18:45 ` Manuel López-Ibáñez
2008-08-27 21:54 ` Manuel López-Ibáñez
4 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 17:50 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> Can we modify svnmerge to generate an output which will be ignored
> by "svn ci"?
svnmerge comes with your subversion distribution.
(e.g., package subversion-tools in Ubuntu)
We do not control it.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 7:54 ` Manuel López-Ibáñez
@ 2008-08-27 18:15 ` Manuel López-Ibáñez
0 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 18:15 UTC (permalink / raw)
To: Richard Guenther; +Cc: H.J. Lu, Gcc Patch List, Daniel Berlin
[-- Attachment #1: Type: text/plain, Size: 204 bytes --]
2008/8/26 Richard Guenther <richard.guenther@gmail.com>:
>
> Can't we simply detect svnmerge logs somehow?
I think this will do it as long as they do not change the message.
Opinions?
Cheers,
Manuel.
[-- Attachment #2: pre-commit-ban-svnmerge-logs.diff --]
[-- Type: text/plain, Size: 1571 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,21 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "via svnmerge from" > /dev/null
+if [ $? -eq 0 ]; then
+ echo "Please, do not use the log generated by svnmerge as a commit log.">&2
+ echo "Read http://gcc.gnu.org/wiki/SvnBranch for more information. ">&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 4:21 ` Manuel López-Ibáñez
` (3 preceding siblings ...)
2008-08-27 16:46 ` Manuel López-Ibáñez
@ 2008-08-27 18:24 ` Manuel López-Ibáñez
2008-08-27 20:34 ` Manuel López-Ibáñez
5 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 18:24 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
> On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>
>>> When I add 600 testcases, should I mention each of them in commit log?
>>
>> 500 was just a number. That said, you could very well do 2 commits of
>> 300 testcases.
>>
>
> It will be very odd. I believe some libjava merges updated more than 500
> files. If we have to break such checkins into several smaller ones just
> because svnmerge can't handle it properly, maybe we should ban
> svnmerge instead.
>
> FWIW, I don't use svnmerge and I never have any problems to
> merge between branches with "svn merge".
>
H.J.,
I think you are misunderstanding the problem that this patch is trying to solve.
If you do: svn ci -F file
subversion will use the contents of 'file' as the commit log that you
later can check with 'svn log'.
After a merge but before committing svnmerge generates a file with the
'svn log' output of all revisions merged. If you use this file as the
commit log, then you (a) make harder to read the output of 'svn log'
(b) flood the gcc.gnu.org servers that are parsing your commit log for
PR numbers and sending emails to bugzilla and subscribers. The emails
are the commit logs, so they are typically a very long email with
multiple commits that has no relevance to the receiver.
This is documented in http://gcc.gnu.org/wiki/SvnBranch but everybody
do mistakes.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:49 ` Manuel López-Ibáñez
` (4 preceding siblings ...)
2008-08-27 17:47 ` Manuel López-Ibáñez
@ 2008-08-27 18:25 ` Manuel López-Ibáñez
2008-08-27 22:20 ` Manuel López-Ibáñez
6 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 18:25 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> When I add 600 testcases, should I mention each of them in commit log?
500 was just a number. That said, you could very well do 2 commits of
300 testcases.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 22:09 ` Manuel López-Ibáñez
2008-08-26 23:31 ` Manuel López-Ibáñez
2008-08-27 10:40 ` Manuel López-Ibáñez
@ 2008-08-27 18:25 ` Manuel López-Ibáñez
2008-08-27 22:09 ` Manuel López-Ibáñez
3 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 18:25 UTC (permalink / raw)
To: Richard Guenther; +Cc: H.J. Lu, Gcc Patch List, Daniel Berlin
2008/8/26 Richard Guenther <richard.guenther@gmail.com>:
>
> IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
600 lines is *very* long (see the numbers I just sent). We do not want
such large patches in one go. They make regression hunting useless.
But yes, we could balk at the string "via svnmerge from" which I think
is "standard" in logs generated by svnmerge. Would that be acceptable?
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:47 ` Richard Guenther
` (6 preceding siblings ...)
2008-08-27 12:51 ` Richard Guenther
@ 2008-08-27 18:36 ` Richard Guenther
2008-08-27 20:45 ` Richard Guenther
8 siblings, 0 replies; 86+ messages in thread
From: Richard Guenther @ 2008-08-27 18:36 UTC (permalink / raw)
To: H.J. Lu; +Cc: Manuel López-Ibáñez, Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 5:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>> Could we put a limit to the commit log entry? More than 500 hundred
>>> lines changelog entries should just be rejected and this will avoid
>>> someone accidentally committing a full log or a diff or just random
>>> junk.
>>>
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>
> When I add 600 testcases, should I mention each of them in commit log?
Yes.
IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
Richard.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 13:54 ` H.J. Lu
2008-08-27 14:46 ` Manuel López-Ibáñez
2008-08-27 16:13 ` H.J. Lu
@ 2008-08-27 18:40 ` H.J. Lu
2008-08-27 20:17 ` Daniel Berlin
2008-08-27 20:48 ` H.J. Lu
4 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 18:40 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 9:46 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>> On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
>> <lopezibanez@gmail.com> wrote:
>>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>>
>>>> When I add 600 testcases, should I mention each of them in commit log?
>>>
>>> 500 was just a number. That said, you could very well do 2 commits of
>>> 300 testcases.
>>>
>>
>> It will be very odd. I believe some libjava merges updated more than 500
>> files. If we have to break such checkins into several smaller ones just
>> because svnmerge can't handle it properly, maybe we should ban
>> svnmerge instead.
>>
>> FWIW, I don't use svnmerge and I never have any problems to
>> merge between branches with "svn merge".
>>
>
> H.J.,
>
> I think you are misunderstanding the problem that this patch is trying to solve.
>
> If you do: svn ci -F file
> subversion will use the contents of 'file' as the commit log that you
> later can check with 'svn log'.
> After a merge but before committing svnmerge generates a file with the
> 'svn log' output of all revisions merged. If you use this file as the
> commit log, then you (a) make harder to read the output of 'svn log'
> (b) flood the gcc.gnu.org servers that are parsing your commit log for
> PR numbers and sending emails to bugzilla and subscribers. The emails
> are the commit logs, so they are typically a very long email with
> multiple commits that has no relevance to the receiver.
Can we modify svnmerge to generate an output which will be ignored
by "svn ci"? Will "svn ci" ignore lines after
--This line, and those below, will be ignored--
if svnmerge puts it at the beginning of its output?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 14:46 ` Manuel López-Ibáñez
` (2 preceding siblings ...)
2008-08-27 17:50 ` Manuel López-Ibáñez
@ 2008-08-27 18:45 ` Manuel López-Ibáñez
2008-08-27 21:54 ` Manuel López-Ibáñez
4 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 18:45 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> Can we modify svnmerge to generate an output which will be ignored
> by "svn ci"?
svnmerge comes with your subversion distribution.
(e.g., package subversion-tools in Ubuntu)
We do not control it.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 15:12 ` Paolo Bonzini
2008-08-27 16:22 ` Paolo Bonzini
@ 2008-08-27 19:30 ` Paolo Bonzini
2008-08-27 19:46 ` Manuel López-Ibáñez
2008-08-27 22:26 ` Paolo Bonzini
3 siblings, 0 replies; 86+ messages in thread
From: Paolo Bonzini @ 2008-08-27 19:30 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Laurent GUERBY, Gcc Patch List
> r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
> r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
> r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
These were mistakes, and it's the only three I checked. 100% rate. :-)
Paolo
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 21:53 ` H.J. Lu
` (2 preceding siblings ...)
2008-08-27 12:01 ` H.J. Lu
@ 2008-08-27 19:43 ` H.J. Lu
2008-08-27 22:59 ` H.J. Lu
4 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 19:43 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>
>> When I add 600 testcases, should I mention each of them in commit log?
>
> 500 was just a number. That said, you could very well do 2 commits of
> 300 testcases.
>
It will be very odd. I believe some libjava merges updated more than 500
files. If we have to break such checkins into several smaller ones just
because svnmerge can't handle it properly, maybe we should ban
svnmerge instead.
FWIW, I don't use svnmerge and I never have any problems to
merge between branches with "svn merge".
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 15:12 ` Paolo Bonzini
2008-08-27 16:22 ` Paolo Bonzini
2008-08-27 19:30 ` Paolo Bonzini
@ 2008-08-27 19:46 ` Manuel López-Ibáñez
2008-08-27 20:07 ` Manuel López-Ibáñez
2008-08-27 20:32 ` Manuel López-Ibáñez
2008-08-27 22:26 ` Paolo Bonzini
3 siblings, 2 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 19:46 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Laurent GUERBY, Gcc Patch List
[-- Attachment #1: Type: text/plain, Size: 4785 bytes --]
2008/8/26 Paolo Bonzini <bonzini@gnu.org>:
>> r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
>> r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
>> r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
>
> These were mistakes, and it's the only three I checked. 100% rate. :-)
I forgot to mention that I ran svn log in trunk only. In branches the
numbers are higher precisely because of the use of automatic logs.
This is the list for the complete repository.
r139372 | xguo | 2008-08-21 08:31:54 +0200 (Thu, 21 Aug 2008) | 706 lines
r139145 | jfreeman | 2008-08-16 04:48:37 +0200 (Sat, 16 Aug 2008) | 19741 lines
r139138 | rus | 2008-08-15 23:37:08 +0200 (Fri, 15 Aug 2008) | 9832 lines
r136433 | jakub | 2008-06-06 15:01:54 +0200 (Fri, 06 Jun 2008) | 889 lines
r125859 | chaoyingfu | 2007-06-19 22:31:53 +0200 (Tue, 19 Jun 2007) | 866 lines
r125840 | chaoyingfu | 2007-06-19 02:42:29 +0200 (Tue, 19 Jun 2007) | 959 lines
r125581 | chaoyingfu | 2007-06-09 00:00:05 +0200 (Sat, 09 Jun 2007) | 3685 lines
r125344 | chaoyingfu | 2007-06-05 23:05:27 +0200 (Tue, 05 Jun 2007) | 965 lines
r125076 | chaoyingfu | 2007-05-26 00:20:57 +0200 (Sat, 26 May 2007) | 517 lines
r124838 | chaoyingfu | 2007-05-19 01:03:14 +0200 (Sat, 19 May 2007) | 895 lines
r124723 | chaoyingfu | 2007-05-14 22:05:48 +0200 (Mon, 14 May 2007) | 858 lines
r124555 | chaoyingfu | 2007-05-08 23:22:26 +0200 (Tue, 08 May 2007) | 822 lines
r124405 | chaoyingfu | 2007-05-04 02:47:49 +0200 (Fri, 04 May 2007) | 1007 lines
r124256 | kargl | 2007-04-28 06:11:29 +0200 (Sat, 28 Apr 2007) | 510 lines
r124241 | chaoyingfu | 2007-04-27 23:37:29 +0200 (Fri, 27 Apr 2007) | 522 lines
r124137 | chaoyingfu | 2007-04-25 02:55:02 +0200 (Wed, 25 Apr 2007) | 1501 lines
r123894 | chaoyingfu | 2007-04-16 22:48:50 +0200 (Mon, 16 Apr 2007) | 1774 lines
r123627 | chaoyingfu | 2007-04-06 22:43:35 +0200 (Fri, 06 Apr 2007) | 3063 lines
r123365 | chaoyingfu | 2007-03-30 20:51:44 +0200 (Fri, 30 Mar 2007) | 679 lines
r123228 | chaoyingfu | 2007-03-26 22:47:45 +0200 (Mon, 26 Mar 2007) | 892 lines
r123097 | chaoyingfu | 2007-03-21 01:15:47 +0100 (Wed, 21 Mar 2007) | 1974 lines
r122862 | chaoyingfu | 2007-03-12 21:12:30 +0100 (Mon, 12 Mar 2007) | 2080 lines
r122629 | chaoyingfu | 2007-03-06 19:08:30 +0100 (Tue, 06 Mar 2007) | 1610 lines
r122357 | chaoyingfu | 2007-02-27 02:35:27 +0100 (Tue, 27 Feb 2007) | 1949 lines
r122168 | bkoz | 2007-02-20 19:15:01 +0100 (Tue, 20 Feb 2007) | 920 lines
r122018 | sandra | 2007-02-16 00:50:49 +0100 (Fri, 16 Feb 2007) | 862 lines
r121624 | chaoyingfu | 2007-02-06 00:06:52 +0100 (Tue, 06 Feb 2007) | 1519 lines
r121327 | chaoyingfu | 2007-01-30 01:43:02 +0100 (Tue, 30 Jan 2007) | 1627 lines
r121062 | chaoyingfu | 2007-01-22 20:42:48 +0100 (Mon, 22 Jan 2007) | 1628 lines
r120866 | chaoyingfu | 2007-01-17 20:16:47 +0100 (Wed, 17 Jan 2007) | 1741 lines
r120377 | chaoyingfu | 2007-01-03 03:12:19 +0100 (Wed, 03 Jan 2007) | 974 lines
r120376 | chaoyingfu | 2007-01-03 02:34:59 +0100 (Wed, 03 Jan 2007) | 805 lines
r119394 | chaoyingfu | 2006-12-01 02:57:22 +0100 (Fri, 01 Dec 2006) | 886 lines
r119392 | chaoyingfu | 2006-12-01 02:01:21 +0100 (Fri, 01 Dec 2006) | 787 lines
r119391 | chaoyingfu | 2006-12-01 01:32:38 +0100 (Fri, 01 Dec 2006) | 695 lines
r119383 | chaoyingfu | 2006-12-01 01:05:26 +0100 (Fri, 01 Dec 2006) | 528 lines
r119370 | chaoyingfu | 2006-11-30 19:30:26 +0100 (Thu, 30 Nov 2006) | 851 lines
r119352 | chaoyingfu | 2006-11-30 02:57:54 +0100 (Thu, 30 Nov 2006) | 794 lines
r119351 | chaoyingfu | 2006-11-30 02:23:04 +0100 (Thu, 30 Nov 2006) | 942 lines
r114659 | bkoz | 2006-06-15 01:09:51 +0200 (Thu, 15 Jun 2006) | 878 lines
r108152 | rsandifo | 2005-12-07 08:53:14 +0100 (Wed, 07 Dec 2005) | 500 lines
r95152 | mkoch | 2005-02-17 08:48:58 +0100 (Thu, 17 Feb 2005) | 616 lines
r95115 | graydon | 2005-02-16 21:03:29 +0100 (Wed, 16 Feb 2005) | 1998 lines
r94733 | graydon | 2005-02-08 06:22:53 +0100 (Tue, 08 Feb 2005) | 1747 lines
r82314 | graydon | 2004-05-27 08:17:44 +0200 (Thu, 27 May 2004) | 556 lines
r79607 | graydon | 2004-03-17 22:29:02 +0100 (Wed, 17 Mar 2004) | 578 lines
r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
Total 49 out of 139604. On the other hand there are 187 instances of
"via svnmerge from".
So we can conclude that many people working in branches do not read
http://gcc.gnu.org/wiki/SvnBranch, which is not that surprising. I
think now that matching "via svnmerge from" would be more productive,
so please consider approving my second patch (attached again here).
Cheers,
Manuel.
[-- Attachment #2: pre-commit-ban-svnmerge-logs.diff --]
[-- Type: text/plain, Size: 1571 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,21 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "via svnmerge from" > /dev/null
+if [ $? -eq 0 ]; then
+ echo "Please, do not use the log generated by svnmerge as a commit log.">&2
+ echo "Read http://gcc.gnu.org/wiki/SvnBranch for more information. ">&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 15:41 ` H.J. Lu
2008-08-27 16:33 ` H.J. Lu
@ 2008-08-27 19:55 ` H.J. Lu
2008-08-27 20:27 ` Daniel Berlin
2008-08-27 22:20 ` H.J. Lu
3 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 19:55 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 10:36 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>
>> Can we modify svnmerge to generate an output which will be ignored
>> by "svn ci"?
>
> svnmerge comes with your subversion distribution.
> (e.g., package subversion-tools in Ubuntu)
> We do not control it.
>
Fedora 9 doesn't come with svnmerge. I don't think it is the
part of the regular subversion package.
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:47 ` Manuel López-Ibáñez
` (4 preceding siblings ...)
2008-08-27 17:35 ` Manuel López-Ibáñez
@ 2008-08-27 19:57 ` Manuel López-Ibáñez
2008-08-27 22:22 ` Manuel López-Ibáñez
6 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 19:57 UTC (permalink / raw)
To: Laurent GUERBY, Gcc Patch List
Of 139510 commits, only 12 have more than 500 lines and only 9 have
more than 700. There are two with more than 1000 lines.
r136433 | jakub | 2008-06-06 15:01:54 +0200 (Fri, 06 Jun 2008) | 889 lines
r122168 | bkoz | 2007-02-20 19:15:01 +0100 (Tue, 20 Feb 2007) | 920 lines
r122018 | sandra | 2007-02-16 00:50:49 +0100 (Fri, 16 Feb 2007) | 862 lines
r114659 | bkoz | 2006-06-15 01:09:51 +0200 (Thu, 15 Jun 2006) | 878 lines
r108152 | rsandifo | 2005-12-07 08:53:14 +0100 (Wed, 07 Dec 2005) | 500 lines
r95152 | mkoch | 2005-02-17 08:48:58 +0100 (Thu, 17 Feb 2005) | 616 lines
r95115 | graydon | 2005-02-16 21:03:29 +0100 (Wed, 16 Feb 2005) | 1998 lines
r82314 | graydon | 2004-05-27 08:17:44 +0200 (Thu, 27 May 2004) | 556 lines
r79607 | graydon | 2004-03-17 22:29:02 +0100 (Wed, 17 Mar 2004) | 578 lines
r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
Anyone can disable the hook script for special cases (it is versioned
after all just "svn co svn+ssh://gcc.gnu.org/svn/gcc/hooks").
Cheers,
Manuel
2008/8/26 Laurent GUERBY <laurent@guerby.net>:
> Out of curiosity did you do a batch scan of existing ChangeLog
> files to see how many entries are above your choosen limit of 500 lines?
>
> Laurent
>
> On Tue, 2008-08-26 at 16:18 +0200, Manuel López-Ibáñez wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> > Could we put a limit to the commit log entry? More than 500 hundred
>> > lines changelog entries should just be rejected and this will avoid
>> > someone accidentally committing a full log or a diff or just random
>> > junk.
>> >
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>> Who can approve this?
>>
>> Cheers,
>>
>> Manuel.
>
>
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 19:46 ` Manuel López-Ibáñez
@ 2008-08-27 20:07 ` Manuel López-Ibáñez
2008-08-27 20:32 ` Manuel López-Ibáñez
1 sibling, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 20:07 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Laurent GUERBY, Gcc Patch List
[-- Attachment #1: Type: text/plain, Size: 4785 bytes --]
2008/8/26 Paolo Bonzini <bonzini@gnu.org>:
>> r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
>> r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
>> r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
>
> These were mistakes, and it's the only three I checked. 100% rate. :-)
I forgot to mention that I ran svn log in trunk only. In branches the
numbers are higher precisely because of the use of automatic logs.
This is the list for the complete repository.
r139372 | xguo | 2008-08-21 08:31:54 +0200 (Thu, 21 Aug 2008) | 706 lines
r139145 | jfreeman | 2008-08-16 04:48:37 +0200 (Sat, 16 Aug 2008) | 19741 lines
r139138 | rus | 2008-08-15 23:37:08 +0200 (Fri, 15 Aug 2008) | 9832 lines
r136433 | jakub | 2008-06-06 15:01:54 +0200 (Fri, 06 Jun 2008) | 889 lines
r125859 | chaoyingfu | 2007-06-19 22:31:53 +0200 (Tue, 19 Jun 2007) | 866 lines
r125840 | chaoyingfu | 2007-06-19 02:42:29 +0200 (Tue, 19 Jun 2007) | 959 lines
r125581 | chaoyingfu | 2007-06-09 00:00:05 +0200 (Sat, 09 Jun 2007) | 3685 lines
r125344 | chaoyingfu | 2007-06-05 23:05:27 +0200 (Tue, 05 Jun 2007) | 965 lines
r125076 | chaoyingfu | 2007-05-26 00:20:57 +0200 (Sat, 26 May 2007) | 517 lines
r124838 | chaoyingfu | 2007-05-19 01:03:14 +0200 (Sat, 19 May 2007) | 895 lines
r124723 | chaoyingfu | 2007-05-14 22:05:48 +0200 (Mon, 14 May 2007) | 858 lines
r124555 | chaoyingfu | 2007-05-08 23:22:26 +0200 (Tue, 08 May 2007) | 822 lines
r124405 | chaoyingfu | 2007-05-04 02:47:49 +0200 (Fri, 04 May 2007) | 1007 lines
r124256 | kargl | 2007-04-28 06:11:29 +0200 (Sat, 28 Apr 2007) | 510 lines
r124241 | chaoyingfu | 2007-04-27 23:37:29 +0200 (Fri, 27 Apr 2007) | 522 lines
r124137 | chaoyingfu | 2007-04-25 02:55:02 +0200 (Wed, 25 Apr 2007) | 1501 lines
r123894 | chaoyingfu | 2007-04-16 22:48:50 +0200 (Mon, 16 Apr 2007) | 1774 lines
r123627 | chaoyingfu | 2007-04-06 22:43:35 +0200 (Fri, 06 Apr 2007) | 3063 lines
r123365 | chaoyingfu | 2007-03-30 20:51:44 +0200 (Fri, 30 Mar 2007) | 679 lines
r123228 | chaoyingfu | 2007-03-26 22:47:45 +0200 (Mon, 26 Mar 2007) | 892 lines
r123097 | chaoyingfu | 2007-03-21 01:15:47 +0100 (Wed, 21 Mar 2007) | 1974 lines
r122862 | chaoyingfu | 2007-03-12 21:12:30 +0100 (Mon, 12 Mar 2007) | 2080 lines
r122629 | chaoyingfu | 2007-03-06 19:08:30 +0100 (Tue, 06 Mar 2007) | 1610 lines
r122357 | chaoyingfu | 2007-02-27 02:35:27 +0100 (Tue, 27 Feb 2007) | 1949 lines
r122168 | bkoz | 2007-02-20 19:15:01 +0100 (Tue, 20 Feb 2007) | 920 lines
r122018 | sandra | 2007-02-16 00:50:49 +0100 (Fri, 16 Feb 2007) | 862 lines
r121624 | chaoyingfu | 2007-02-06 00:06:52 +0100 (Tue, 06 Feb 2007) | 1519 lines
r121327 | chaoyingfu | 2007-01-30 01:43:02 +0100 (Tue, 30 Jan 2007) | 1627 lines
r121062 | chaoyingfu | 2007-01-22 20:42:48 +0100 (Mon, 22 Jan 2007) | 1628 lines
r120866 | chaoyingfu | 2007-01-17 20:16:47 +0100 (Wed, 17 Jan 2007) | 1741 lines
r120377 | chaoyingfu | 2007-01-03 03:12:19 +0100 (Wed, 03 Jan 2007) | 974 lines
r120376 | chaoyingfu | 2007-01-03 02:34:59 +0100 (Wed, 03 Jan 2007) | 805 lines
r119394 | chaoyingfu | 2006-12-01 02:57:22 +0100 (Fri, 01 Dec 2006) | 886 lines
r119392 | chaoyingfu | 2006-12-01 02:01:21 +0100 (Fri, 01 Dec 2006) | 787 lines
r119391 | chaoyingfu | 2006-12-01 01:32:38 +0100 (Fri, 01 Dec 2006) | 695 lines
r119383 | chaoyingfu | 2006-12-01 01:05:26 +0100 (Fri, 01 Dec 2006) | 528 lines
r119370 | chaoyingfu | 2006-11-30 19:30:26 +0100 (Thu, 30 Nov 2006) | 851 lines
r119352 | chaoyingfu | 2006-11-30 02:57:54 +0100 (Thu, 30 Nov 2006) | 794 lines
r119351 | chaoyingfu | 2006-11-30 02:23:04 +0100 (Thu, 30 Nov 2006) | 942 lines
r114659 | bkoz | 2006-06-15 01:09:51 +0200 (Thu, 15 Jun 2006) | 878 lines
r108152 | rsandifo | 2005-12-07 08:53:14 +0100 (Wed, 07 Dec 2005) | 500 lines
r95152 | mkoch | 2005-02-17 08:48:58 +0100 (Thu, 17 Feb 2005) | 616 lines
r95115 | graydon | 2005-02-16 21:03:29 +0100 (Wed, 16 Feb 2005) | 1998 lines
r94733 | graydon | 2005-02-08 06:22:53 +0100 (Tue, 08 Feb 2005) | 1747 lines
r82314 | graydon | 2004-05-27 08:17:44 +0200 (Thu, 27 May 2004) | 556 lines
r79607 | graydon | 2004-03-17 22:29:02 +0100 (Wed, 17 Mar 2004) | 578 lines
r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
Total 49 out of 139604. On the other hand there are 187 instances of
"via svnmerge from".
So we can conclude that many people working in branches do not read
http://gcc.gnu.org/wiki/SvnBranch, which is not that surprising. I
think now that matching "via svnmerge from" would be more productive,
so please consider approving my second patch (attached again here).
Cheers,
Manuel.
[-- Attachment #2: pre-commit-ban-svnmerge-logs.diff --]
[-- Type: text/plain, Size: 1571 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,21 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "via svnmerge from" > /dev/null
+if [ $? -eq 0 ]; then
+ echo "Please, do not use the log generated by svnmerge as a commit log.">&2
+ echo "Read http://gcc.gnu.org/wiki/SvnBranch for more information. ">&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 13:54 ` H.J. Lu
` (2 preceding siblings ...)
2008-08-27 18:40 ` H.J. Lu
@ 2008-08-27 20:17 ` Daniel Berlin
2008-08-27 20:44 ` Daniel Berlin
2008-08-27 20:48 ` H.J. Lu
4 siblings, 1 reply; 86+ messages in thread
From: Daniel Berlin @ 2008-08-27 20:17 UTC (permalink / raw)
To: H.J. Lu; +Cc: Manuel López-Ibáñez, Gcc Patch List
svnmerge has a command line option not to generate those messages.
We don't control the source to svnmerge.
On Tue, Aug 26, 2008 at 1:31 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 9:46 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>> On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
>>> <lopezibanez@gmail.com> wrote:
>>>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>>>
>>>>> When I add 600 testcases, should I mention each of them in commit log?
>>>>
>>>> 500 was just a number. That said, you could very well do 2 commits of
>>>> 300 testcases.
>>>>
>>>
>>> It will be very odd. I believe some libjava merges updated more than 500
>>> files. If we have to break such checkins into several smaller ones just
>>> because svnmerge can't handle it properly, maybe we should ban
>>> svnmerge instead.
>>>
>>> FWIW, I don't use svnmerge and I never have any problems to
>>> merge between branches with "svn merge".
>>>
>>
>> H.J.,
>>
>> I think you are misunderstanding the problem that this patch is trying to solve.
>>
>> If you do: svn ci -F file
>> subversion will use the contents of 'file' as the commit log that you
>> later can check with 'svn log'.
>> After a merge but before committing svnmerge generates a file with the
>> 'svn log' output of all revisions merged. If you use this file as the
>> commit log, then you (a) make harder to read the output of 'svn log'
>> (b) flood the gcc.gnu.org servers that are parsing your commit log for
>> PR numbers and sending emails to bugzilla and subscribers. The emails
>> are the commit logs, so they are typically a very long email with
>> multiple commits that has no relevance to the receiver.
>
> Can we modify svnmerge to generate an output which will be ignored
> by "svn ci"? Will "svn ci" ignore lines after
>
> --This line, and those below, will be ignored--
>
> if svnmerge puts it at the beginning of its output?
>
> --
> H.J.
>
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 15:41 ` H.J. Lu
2008-08-27 16:33 ` H.J. Lu
2008-08-27 19:55 ` H.J. Lu
@ 2008-08-27 20:27 ` Daniel Berlin
2008-08-27 22:20 ` H.J. Lu
3 siblings, 0 replies; 86+ messages in thread
From: Daniel Berlin @ 2008-08-27 20:27 UTC (permalink / raw)
To: H.J. Lu; +Cc: Manuel López-Ibáñez, Gcc Patch List
It used to be, but it is now it's own project.
http://www.orcaware.com/svn/wiki/Svnmerge.py
On Tue, Aug 26, 2008 at 1:41 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 10:36 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>
>>> Can we modify svnmerge to generate an output which will be ignored
>>> by "svn ci"?
>>
>> svnmerge comes with your subversion distribution.
>> (e.g., package subversion-tools in Ubuntu)
>> We do not control it.
>>
>
> Fedora 9 doesn't come with svnmerge. I don't think it is the
> part of the regular subversion package.
>
> --
> H.J.
>
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 19:46 ` Manuel López-Ibáñez
2008-08-27 20:07 ` Manuel López-Ibáñez
@ 2008-08-27 20:32 ` Manuel López-Ibáñez
1 sibling, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 20:32 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Laurent GUERBY, Gcc Patch List
[-- Attachment #1: Type: text/plain, Size: 4785 bytes --]
2008/8/26 Paolo Bonzini <bonzini@gnu.org>:
>> r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
>> r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
>> r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
>
> These were mistakes, and it's the only three I checked. 100% rate. :-)
I forgot to mention that I ran svn log in trunk only. In branches the
numbers are higher precisely because of the use of automatic logs.
This is the list for the complete repository.
r139372 | xguo | 2008-08-21 08:31:54 +0200 (Thu, 21 Aug 2008) | 706 lines
r139145 | jfreeman | 2008-08-16 04:48:37 +0200 (Sat, 16 Aug 2008) | 19741 lines
r139138 | rus | 2008-08-15 23:37:08 +0200 (Fri, 15 Aug 2008) | 9832 lines
r136433 | jakub | 2008-06-06 15:01:54 +0200 (Fri, 06 Jun 2008) | 889 lines
r125859 | chaoyingfu | 2007-06-19 22:31:53 +0200 (Tue, 19 Jun 2007) | 866 lines
r125840 | chaoyingfu | 2007-06-19 02:42:29 +0200 (Tue, 19 Jun 2007) | 959 lines
r125581 | chaoyingfu | 2007-06-09 00:00:05 +0200 (Sat, 09 Jun 2007) | 3685 lines
r125344 | chaoyingfu | 2007-06-05 23:05:27 +0200 (Tue, 05 Jun 2007) | 965 lines
r125076 | chaoyingfu | 2007-05-26 00:20:57 +0200 (Sat, 26 May 2007) | 517 lines
r124838 | chaoyingfu | 2007-05-19 01:03:14 +0200 (Sat, 19 May 2007) | 895 lines
r124723 | chaoyingfu | 2007-05-14 22:05:48 +0200 (Mon, 14 May 2007) | 858 lines
r124555 | chaoyingfu | 2007-05-08 23:22:26 +0200 (Tue, 08 May 2007) | 822 lines
r124405 | chaoyingfu | 2007-05-04 02:47:49 +0200 (Fri, 04 May 2007) | 1007 lines
r124256 | kargl | 2007-04-28 06:11:29 +0200 (Sat, 28 Apr 2007) | 510 lines
r124241 | chaoyingfu | 2007-04-27 23:37:29 +0200 (Fri, 27 Apr 2007) | 522 lines
r124137 | chaoyingfu | 2007-04-25 02:55:02 +0200 (Wed, 25 Apr 2007) | 1501 lines
r123894 | chaoyingfu | 2007-04-16 22:48:50 +0200 (Mon, 16 Apr 2007) | 1774 lines
r123627 | chaoyingfu | 2007-04-06 22:43:35 +0200 (Fri, 06 Apr 2007) | 3063 lines
r123365 | chaoyingfu | 2007-03-30 20:51:44 +0200 (Fri, 30 Mar 2007) | 679 lines
r123228 | chaoyingfu | 2007-03-26 22:47:45 +0200 (Mon, 26 Mar 2007) | 892 lines
r123097 | chaoyingfu | 2007-03-21 01:15:47 +0100 (Wed, 21 Mar 2007) | 1974 lines
r122862 | chaoyingfu | 2007-03-12 21:12:30 +0100 (Mon, 12 Mar 2007) | 2080 lines
r122629 | chaoyingfu | 2007-03-06 19:08:30 +0100 (Tue, 06 Mar 2007) | 1610 lines
r122357 | chaoyingfu | 2007-02-27 02:35:27 +0100 (Tue, 27 Feb 2007) | 1949 lines
r122168 | bkoz | 2007-02-20 19:15:01 +0100 (Tue, 20 Feb 2007) | 920 lines
r122018 | sandra | 2007-02-16 00:50:49 +0100 (Fri, 16 Feb 2007) | 862 lines
r121624 | chaoyingfu | 2007-02-06 00:06:52 +0100 (Tue, 06 Feb 2007) | 1519 lines
r121327 | chaoyingfu | 2007-01-30 01:43:02 +0100 (Tue, 30 Jan 2007) | 1627 lines
r121062 | chaoyingfu | 2007-01-22 20:42:48 +0100 (Mon, 22 Jan 2007) | 1628 lines
r120866 | chaoyingfu | 2007-01-17 20:16:47 +0100 (Wed, 17 Jan 2007) | 1741 lines
r120377 | chaoyingfu | 2007-01-03 03:12:19 +0100 (Wed, 03 Jan 2007) | 974 lines
r120376 | chaoyingfu | 2007-01-03 02:34:59 +0100 (Wed, 03 Jan 2007) | 805 lines
r119394 | chaoyingfu | 2006-12-01 02:57:22 +0100 (Fri, 01 Dec 2006) | 886 lines
r119392 | chaoyingfu | 2006-12-01 02:01:21 +0100 (Fri, 01 Dec 2006) | 787 lines
r119391 | chaoyingfu | 2006-12-01 01:32:38 +0100 (Fri, 01 Dec 2006) | 695 lines
r119383 | chaoyingfu | 2006-12-01 01:05:26 +0100 (Fri, 01 Dec 2006) | 528 lines
r119370 | chaoyingfu | 2006-11-30 19:30:26 +0100 (Thu, 30 Nov 2006) | 851 lines
r119352 | chaoyingfu | 2006-11-30 02:57:54 +0100 (Thu, 30 Nov 2006) | 794 lines
r119351 | chaoyingfu | 2006-11-30 02:23:04 +0100 (Thu, 30 Nov 2006) | 942 lines
r114659 | bkoz | 2006-06-15 01:09:51 +0200 (Thu, 15 Jun 2006) | 878 lines
r108152 | rsandifo | 2005-12-07 08:53:14 +0100 (Wed, 07 Dec 2005) | 500 lines
r95152 | mkoch | 2005-02-17 08:48:58 +0100 (Thu, 17 Feb 2005) | 616 lines
r95115 | graydon | 2005-02-16 21:03:29 +0100 (Wed, 16 Feb 2005) | 1998 lines
r94733 | graydon | 2005-02-08 06:22:53 +0100 (Tue, 08 Feb 2005) | 1747 lines
r82314 | graydon | 2004-05-27 08:17:44 +0200 (Thu, 27 May 2004) | 556 lines
r79607 | graydon | 2004-03-17 22:29:02 +0100 (Wed, 17 Mar 2004) | 578 lines
r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
Total 49 out of 139604. On the other hand there are 187 instances of
"via svnmerge from".
So we can conclude that many people working in branches do not read
http://gcc.gnu.org/wiki/SvnBranch, which is not that surprising. I
think now that matching "via svnmerge from" would be more productive,
so please consider approving my second patch (attached again here).
Cheers,
Manuel.
[-- Attachment #2: pre-commit-ban-svnmerge-logs.diff --]
[-- Type: text/plain, Size: 1571 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,21 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "via svnmerge from" > /dev/null
+if [ $? -eq 0 ]; then
+ echo "Please, do not use the log generated by svnmerge as a commit log.">&2
+ echo "Read http://gcc.gnu.org/wiki/SvnBranch for more information. ">&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 4:21 ` Manuel López-Ibáñez
` (4 preceding siblings ...)
2008-08-27 18:24 ` Manuel López-Ibáñez
@ 2008-08-27 20:34 ` Manuel López-Ibáñez
5 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 20:34 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
> On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>
>>> When I add 600 testcases, should I mention each of them in commit log?
>>
>> 500 was just a number. That said, you could very well do 2 commits of
>> 300 testcases.
>>
>
> It will be very odd. I believe some libjava merges updated more than 500
> files. If we have to break such checkins into several smaller ones just
> because svnmerge can't handle it properly, maybe we should ban
> svnmerge instead.
>
> FWIW, I don't use svnmerge and I never have any problems to
> merge between branches with "svn merge".
>
H.J.,
I think you are misunderstanding the problem that this patch is trying to solve.
If you do: svn ci -F file
subversion will use the contents of 'file' as the commit log that you
later can check with 'svn log'.
After a merge but before committing svnmerge generates a file with the
'svn log' output of all revisions merged. If you use this file as the
commit log, then you (a) make harder to read the output of 'svn log'
(b) flood the gcc.gnu.org servers that are parsing your commit log for
PR numbers and sending emails to bugzilla and subscribers. The emails
are the commit logs, so they are typically a very long email with
multiple commits that has no relevance to the receiver.
This is documented in http://gcc.gnu.org/wiki/SvnBranch but everybody
do mistakes.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 20:17 ` Daniel Berlin
@ 2008-08-27 20:44 ` Daniel Berlin
0 siblings, 0 replies; 86+ messages in thread
From: Daniel Berlin @ 2008-08-27 20:44 UTC (permalink / raw)
To: H.J. Lu; +Cc: Manuel López-Ibáñez, Gcc Patch List
svnmerge has a command line option not to generate those messages.
We don't control the source to svnmerge.
On Tue, Aug 26, 2008 at 1:31 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 9:46 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>> On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
>>> <lopezibanez@gmail.com> wrote:
>>>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>>>
>>>>> When I add 600 testcases, should I mention each of them in commit log?
>>>>
>>>> 500 was just a number. That said, you could very well do 2 commits of
>>>> 300 testcases.
>>>>
>>>
>>> It will be very odd. I believe some libjava merges updated more than 500
>>> files. If we have to break such checkins into several smaller ones just
>>> because svnmerge can't handle it properly, maybe we should ban
>>> svnmerge instead.
>>>
>>> FWIW, I don't use svnmerge and I never have any problems to
>>> merge between branches with "svn merge".
>>>
>>
>> H.J.,
>>
>> I think you are misunderstanding the problem that this patch is trying to solve.
>>
>> If you do: svn ci -F file
>> subversion will use the contents of 'file' as the commit log that you
>> later can check with 'svn log'.
>> After a merge but before committing svnmerge generates a file with the
>> 'svn log' output of all revisions merged. If you use this file as the
>> commit log, then you (a) make harder to read the output of 'svn log'
>> (b) flood the gcc.gnu.org servers that are parsing your commit log for
>> PR numbers and sending emails to bugzilla and subscribers. The emails
>> are the commit logs, so they are typically a very long email with
>> multiple commits that has no relevance to the receiver.
>
> Can we modify svnmerge to generate an output which will be ignored
> by "svn ci"? Will "svn ci" ignore lines after
>
> --This line, and those below, will be ignored--
>
> if svnmerge puts it at the beginning of its output?
>
> --
> H.J.
>
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 17:47 ` Richard Guenther
` (7 preceding siblings ...)
2008-08-27 18:36 ` Richard Guenther
@ 2008-08-27 20:45 ` Richard Guenther
8 siblings, 0 replies; 86+ messages in thread
From: Richard Guenther @ 2008-08-27 20:45 UTC (permalink / raw)
To: H.J. Lu; +Cc: Manuel López-Ibáñez, Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 5:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>> Could we put a limit to the commit log entry? More than 500 hundred
>>> lines changelog entries should just be rejected and this will avoid
>>> someone accidentally committing a full log or a diff or just random
>>> junk.
>>>
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>
> When I add 600 testcases, should I mention each of them in commit log?
Yes.
IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
Richard.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 13:54 ` H.J. Lu
` (3 preceding siblings ...)
2008-08-27 20:17 ` Daniel Berlin
@ 2008-08-27 20:48 ` H.J. Lu
4 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 20:48 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 9:46 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>> On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
>> <lopezibanez@gmail.com> wrote:
>>> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>>>
>>>> When I add 600 testcases, should I mention each of them in commit log?
>>>
>>> 500 was just a number. That said, you could very well do 2 commits of
>>> 300 testcases.
>>>
>>
>> It will be very odd. I believe some libjava merges updated more than 500
>> files. If we have to break such checkins into several smaller ones just
>> because svnmerge can't handle it properly, maybe we should ban
>> svnmerge instead.
>>
>> FWIW, I don't use svnmerge and I never have any problems to
>> merge between branches with "svn merge".
>>
>
> H.J.,
>
> I think you are misunderstanding the problem that this patch is trying to solve.
>
> If you do: svn ci -F file
> subversion will use the contents of 'file' as the commit log that you
> later can check with 'svn log'.
> After a merge but before committing svnmerge generates a file with the
> 'svn log' output of all revisions merged. If you use this file as the
> commit log, then you (a) make harder to read the output of 'svn log'
> (b) flood the gcc.gnu.org servers that are parsing your commit log for
> PR numbers and sending emails to bugzilla and subscribers. The emails
> are the commit logs, so they are typically a very long email with
> multiple commits that has no relevance to the receiver.
Can we modify svnmerge to generate an output which will be ignored
by "svn ci"? Will "svn ci" ignore lines after
--This line, and those below, will be ignored--
if svnmerge puts it at the beginning of its output?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 14:46 ` Manuel López-Ibáñez
` (3 preceding siblings ...)
2008-08-27 18:45 ` Manuel López-Ibáñez
@ 2008-08-27 21:54 ` Manuel López-Ibáñez
4 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 21:54 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> Can we modify svnmerge to generate an output which will be ignored
> by "svn ci"?
svnmerge comes with your subversion distribution.
(e.g., package subversion-tools in Ubuntu)
We do not control it.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 22:09 ` Manuel López-Ibáñez
` (2 preceding siblings ...)
2008-08-27 18:25 ` Manuel López-Ibáñez
@ 2008-08-27 22:09 ` Manuel López-Ibáñez
3 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 22:09 UTC (permalink / raw)
To: Richard Guenther; +Cc: H.J. Lu, Gcc Patch List, Daniel Berlin
2008/8/26 Richard Guenther <richard.guenther@gmail.com>:
>
> IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
600 lines is *very* long (see the numbers I just sent). We do not want
such large patches in one go. They make regression hunting useless.
But yes, we could balk at the string "via svnmerge from" which I think
is "standard" in logs generated by svnmerge. Would that be acceptable?
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:49 ` Manuel López-Ibáñez
` (5 preceding siblings ...)
2008-08-27 18:25 ` Manuel López-Ibáñez
@ 2008-08-27 22:20 ` Manuel López-Ibáñez
6 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 22:20 UTC (permalink / raw)
To: H.J. Lu; +Cc: Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> When I add 600 testcases, should I mention each of them in commit log?
500 was just a number. That said, you could very well do 2 commits of
300 testcases.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:58 ` Manuel López-Ibáñez
` (3 preceding siblings ...)
2008-08-27 16:10 ` Manuel López-Ibáñez
@ 2008-08-27 22:20 ` Manuel López-Ibáñez
4 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 22:20 UTC (permalink / raw)
To: H.J. Lu; +Cc: Richard Guenther, Gcc Patch List, Daniel Berlin
2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>
> Shouldn't svnmerge be fixed not to generate such log?
svnmerge generates a file, it does not commit that file as a log for
you. In some other project, that file could be the commit log. However
in GCC's repository, committing that file is a mistake that some
people do sometimes. (Everybody does mistakes sometimes).
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 15:41 ` H.J. Lu
` (2 preceding siblings ...)
2008-08-27 20:27 ` Daniel Berlin
@ 2008-08-27 22:20 ` H.J. Lu
3 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 22:20 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 10:36 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>
>> Can we modify svnmerge to generate an output which will be ignored
>> by "svn ci"?
>
> svnmerge comes with your subversion distribution.
> (e.g., package subversion-tools in Ubuntu)
> We do not control it.
>
Fedora 9 doesn't come with svnmerge. I don't think it is the
part of the regular subversion package.
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 20:47 ` Manuel López-Ibáñez
` (5 preceding siblings ...)
2008-08-27 19:57 ` Manuel López-Ibáñez
@ 2008-08-27 22:22 ` Manuel López-Ibáñez
6 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 22:22 UTC (permalink / raw)
To: Laurent GUERBY, Gcc Patch List
Of 139510 commits, only 12 have more than 500 lines and only 9 have
more than 700. There are two with more than 1000 lines.
r136433 | jakub | 2008-06-06 15:01:54 +0200 (Fri, 06 Jun 2008) | 889 lines
r122168 | bkoz | 2007-02-20 19:15:01 +0100 (Tue, 20 Feb 2007) | 920 lines
r122018 | sandra | 2007-02-16 00:50:49 +0100 (Fri, 16 Feb 2007) | 862 lines
r114659 | bkoz | 2006-06-15 01:09:51 +0200 (Thu, 15 Jun 2006) | 878 lines
r108152 | rsandifo | 2005-12-07 08:53:14 +0100 (Wed, 07 Dec 2005) | 500 lines
r95152 | mkoch | 2005-02-17 08:48:58 +0100 (Thu, 17 Feb 2005) | 616 lines
r95115 | graydon | 2005-02-16 21:03:29 +0100 (Wed, 16 Feb 2005) | 1998 lines
r82314 | graydon | 2004-05-27 08:17:44 +0200 (Thu, 27 May 2004) | 556 lines
r79607 | graydon | 2004-03-17 22:29:02 +0100 (Wed, 17 Mar 2004) | 578 lines
r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
Anyone can disable the hook script for special cases (it is versioned
after all just "svn co svn+ssh://gcc.gnu.org/svn/gcc/hooks").
Cheers,
Manuel
2008/8/26 Laurent GUERBY <laurent@guerby.net>:
> Out of curiosity did you do a batch scan of existing ChangeLog
> files to see how many entries are above your choosen limit of 500 lines?
>
> Laurent
>
> On Tue, 2008-08-26 at 16:18 +0200, Manuel López-Ibáñez wrote:
>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> > Could we put a limit to the commit log entry? More than 500 hundred
>> > lines changelog entries should just be rejected and this will avoid
>> > someone accidentally committing a full log or a diff or just random
>> > junk.
>> >
>>
>> The following patch to our pre-commit hook enables this. I have tested
>> it with a dummy repository but review from bourne-shell and/or
>> subversion knowledgeable people would be welcome.
>>
>> Who can approve this?
>>
>> Cheers,
>>
>> Manuel.
>
>
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-27 15:12 ` Paolo Bonzini
` (2 preceding siblings ...)
2008-08-27 19:46 ` Manuel López-Ibáñez
@ 2008-08-27 22:26 ` Paolo Bonzini
3 siblings, 0 replies; 86+ messages in thread
From: Paolo Bonzini @ 2008-08-27 22:26 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Laurent GUERBY, Gcc Patch List
> r76701 | amylaar | 2004-01-27 13:49:31 +0100 (Tue, 27 Jan 2004) | 2915 lines
> r55189 | amylaar | 2002-07-02 20:45:49 +0200 (Tue, 02 Jul 2002) | 684 lines
> r43861 | kenner | 2001-07-09 13:20:51 +0200 (Mon, 09 Jul 2001) | 980 lines
These were mistakes, and it's the only three I checked. 100% rate. :-)
Paolo
^ permalink raw reply [flat|nested] 86+ messages in thread
* [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 16:41 [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging) Manuel López-Ibáñez
` (7 preceding siblings ...)
2008-08-27 16:31 ` Manuel López-Ibáñez
@ 2008-08-27 22:48 ` Manuel López-Ibáñez
8 siblings, 0 replies; 86+ messages in thread
From: Manuel López-Ibáñez @ 2008-08-27 22:48 UTC (permalink / raw)
To: Gcc Patch List; +Cc: Daniel Berlin
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
> Could we put a limit to the commit log entry? More than 500 hundred
> lines changelog entries should just be rejected and this will avoid
> someone accidentally committing a full log or a diff or just random
> junk.
>
The following patch to our pre-commit hook enables this. I have tested
it with a dummy repository but review from bourne-shell and/or
subversion knowledgeable people would be welcome.
Who can approve this?
Cheers,
Manuel.
[-- Attachment #2: pre-commit.diff --]
[-- Type: text/plain, Size: 1723 bytes --]
Index: pre-commit
===================================================================
--- pre-commit (revision 139590)
+++ pre-commit (working copy)
@@ -47,7 +47,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -58,9 +59,23 @@
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
-$SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Please include a ChangeLog entry with this commit." >&2
+ exit 1
+fi
+
+# Do not allow log messages
+LOGLINES=`$SVNLOOK log -t "$TXN" "$REPOS" | wc -l`
+if test $LOGLINES -gt 500; then
+ echo "A single ChangeLog entry cannot be larger than 500 lines. " >&2
+ echo "Please check again the log message of this commit. " >&2
+ echo "If you are merging from/to a branch, never use log messages from" >&2
+ echo "other revisions as the commit message. " >&2
+ exit 1
+fi
+
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 21:53 ` H.J. Lu
` (3 preceding siblings ...)
2008-08-27 19:43 ` H.J. Lu
@ 2008-08-27 22:59 ` H.J. Lu
4 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 22:59 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 9:19 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2008/8/26 H.J. Lu <hjl.tools@gmail.com>:
>>
>> When I add 600 testcases, should I mention each of them in commit log?
>
> 500 was just a number. That said, you could very well do 2 commits of
> 300 testcases.
>
It will be very odd. I believe some libjava merges updated more than 500
files. If we have to break such checkins into several smaller ones just
because svnmerge can't handle it properly, maybe we should ban
svnmerge instead.
FWIW, I don't use svnmerge and I never have any problems to
merge between branches with "svn merge".
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
* Re: [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging)
2008-08-26 19:31 ` H.J. Lu
` (3 preceding siblings ...)
2008-08-27 16:30 ` H.J. Lu
@ 2008-08-27 23:58 ` H.J. Lu
4 siblings, 0 replies; 86+ messages in thread
From: H.J. Lu @ 2008-08-27 23:58 UTC (permalink / raw)
To: Richard Guenther
Cc: Manuel López-Ibáñez, Gcc Patch List, Daniel Berlin
On Tue, Aug 26, 2008 at 8:36 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 5:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, Aug 26, 2008 at 7:18 AM, Manuel López-Ibáñez
>> <lopezibanez@gmail.com> wrote:
>>> 2008/8/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>>> Could we put a limit to the commit log entry? More than 500 hundred
>>>> lines changelog entries should just be rejected and this will avoid
>>>> someone accidentally committing a full log or a diff or just random
>>>> junk.
>>>>
>>>
>>> The following patch to our pre-commit hook enables this. I have tested
>>> it with a dummy repository but review from bourne-shell and/or
>>> subversion knowledgeable people would be welcome.
>>>
>>
>> When I add 600 testcases, should I mention each of them in commit log?
>
> Yes.
>
> IMHO 600 lines is too short. Can't we simply detect svnmerge logs somehow?
>
Shouldn't svnmerge be fixed not to generate such log?
--
H.J.
^ permalink raw reply [flat|nested] 86+ messages in thread
end of thread, other threads:[~2008-08-26 21:08 UTC | newest]
Thread overview: 86+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-26 16:41 [PATCH] limit commit message to 500 lines (was: Please, do not use the merged revisions log as the commit message when merging) Manuel López-Ibáñez
2008-08-26 16:51 ` Manuel López-Ibáñez
2008-08-26 17:13 ` Manuel López-Ibáñez
2008-08-26 17:35 ` H.J. Lu
2008-08-26 17:44 ` H.J. Lu
2008-08-26 17:47 ` Richard Guenther
2008-08-26 19:15 ` Richard Guenther
2008-08-26 19:31 ` H.J. Lu
2008-08-26 20:01 ` H.J. Lu
2008-08-26 20:58 ` Manuel López-Ibáñez
2008-08-26 22:50 ` Manuel López-Ibáñez
2008-08-27 7:41 ` Manuel López-Ibáñez
2008-08-27 11:26 ` Manuel López-Ibáñez
2008-08-27 16:10 ` Manuel López-Ibáñez
2008-08-27 22:20 ` Manuel López-Ibáñez
2008-08-27 8:08 ` H.J. Lu
2008-08-27 16:30 ` H.J. Lu
2008-08-27 23:58 ` H.J. Lu
2008-08-26 20:04 ` Richard Guenther
2008-08-26 22:09 ` Manuel López-Ibáñez
2008-08-26 23:31 ` Manuel López-Ibáñez
2008-08-27 10:40 ` Manuel López-Ibáñez
2008-08-27 18:25 ` Manuel López-Ibáñez
2008-08-27 22:09 ` Manuel López-Ibáñez
2008-08-27 0:42 ` Richard Guenther
2008-08-27 7:54 ` Manuel López-Ibáñez
2008-08-27 18:15 ` Manuel López-Ibáñez
2008-08-27 12:51 ` Richard Guenther
2008-08-27 18:36 ` Richard Guenther
2008-08-27 20:45 ` Richard Guenther
2008-08-26 17:56 ` H.J. Lu
2008-08-26 20:19 ` H.J. Lu
2008-08-26 20:49 ` Manuel López-Ibáñez
2008-08-26 21:53 ` H.J. Lu
2008-08-27 0:54 ` H.J. Lu
2008-08-27 4:21 ` Manuel López-Ibáñez
2008-08-27 8:02 ` Manuel López-Ibáñez
2008-08-27 9:00 ` Manuel López-Ibáñez
2008-08-27 13:54 ` H.J. Lu
2008-08-27 14:46 ` Manuel López-Ibáñez
2008-08-27 15:41 ` H.J. Lu
2008-08-27 16:33 ` H.J. Lu
2008-08-27 19:55 ` H.J. Lu
2008-08-27 20:27 ` Daniel Berlin
2008-08-27 22:20 ` H.J. Lu
2008-08-27 16:10 ` Manuel López-Ibáñez
2008-08-27 17:50 ` Manuel López-Ibáñez
2008-08-27 18:45 ` Manuel López-Ibáñez
2008-08-27 21:54 ` Manuel López-Ibáñez
2008-08-27 16:13 ` H.J. Lu
2008-08-27 18:40 ` H.J. Lu
2008-08-27 20:17 ` Daniel Berlin
2008-08-27 20:44 ` Daniel Berlin
2008-08-27 20:48 ` H.J. Lu
2008-08-27 16:46 ` Manuel López-Ibáñez
2008-08-27 18:24 ` Manuel López-Ibáñez
2008-08-27 20:34 ` Manuel López-Ibáñez
2008-08-27 12:01 ` H.J. Lu
2008-08-27 19:43 ` H.J. Lu
2008-08-27 22:59 ` H.J. Lu
2008-08-26 22:21 ` Manuel López-Ibáñez
2008-08-27 6:19 ` Manuel López-Ibáñez
2008-08-27 13:36 ` Manuel López-Ibáñez
2008-08-27 17:47 ` Manuel López-Ibáñez
2008-08-27 18:25 ` Manuel López-Ibáñez
2008-08-27 22:20 ` Manuel López-Ibáñez
2008-08-27 11:26 ` H.J. Lu
2008-08-26 17:37 ` Manuel López-Ibáñez
2008-08-26 20:22 ` Manuel López-Ibáñez
[not found] ` <1219764262.13055.58.camel@localhost>
2008-08-26 20:47 ` Manuel López-Ibáñez
2008-08-26 22:35 ` Manuel López-Ibáñez
2008-08-27 4:35 ` Manuel López-Ibáñez
2008-08-27 8:27 ` Manuel López-Ibáñez
2008-08-27 15:12 ` Paolo Bonzini
2008-08-27 16:22 ` Paolo Bonzini
2008-08-27 19:30 ` Paolo Bonzini
2008-08-27 19:46 ` Manuel López-Ibáñez
2008-08-27 20:07 ` Manuel López-Ibáñez
2008-08-27 20:32 ` Manuel López-Ibáñez
2008-08-27 22:26 ` Paolo Bonzini
2008-08-27 17:35 ` Manuel López-Ibáñez
2008-08-27 19:57 ` Manuel López-Ibáñez
2008-08-27 22:22 ` Manuel López-Ibáñez
2008-08-27 14:03 ` Manuel López-Ibáñez
2008-08-27 16:31 ` Manuel López-Ibáñez
2008-08-27 22:48 ` Manuel López-Ibáñez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).