Opened 13 years ago

Closed 12 years ago

#36 closed enhancement (fixed)

automatic copyright update in files

Reported by: Peter Johansson Owned by: Peter Johansson
Priority: major Milestone: 0.6
Component: output Version: trunk
Keywords: Cc:

Description (last modified by Peter Johansson)

As a feature it would be nice if svnstat could change the copyright header in each file automatically. To do this the old copyright header must be found, in other word, the header must follow some kind of standard.

Hence we need to implement #24 before...

Change History (12)

comment:1 Changed 13 years ago by Peter Johansson

a config file is needed to map e.g. peter -> Peter Johansson

What should a copyright look like? One year per line or...?

comment:2 Changed 13 years ago by Peter Johansson

It is not clear what a developer need to do to be added to the copyright list. Perhaps various alternative should be available.

One obvious alternative is that if you ever have added a line to the file than you have copyright to that file (that year). Meaning you don't lose your copyright just because some savage removed your code. For this definition of deserving copyright statistics class described in #82 would be most useful.

Is an add enough or has it to be either code or comment?

comment:4 Changed 13 years ago by Peter Johansson

(In [198]) refs #36 optionally a copyright information, based on Stats, can be displayed using --copyright flag. This will flag will be added to usage output when this feature is mature.

comment:5 Changed 12 years ago by Peter Johansson

To be able to modify copyright statement, the copyright statement must be detectable in files. I suggest the copyright statement starts with

/\n\s*Copyright\s* (C)/

and ends with an empty line.

comment:6 in reply to:  5 Changed 12 years ago by Peter Johansson

Replying to peter:

To be able to modify copyright statement, the copyright statement must be detectable in files. I suggest the copyright statement starts with

/\n\s*Copyright\s* (C)/

and ends with an empty line.

This would lead to trouble since many copyright statements are preceeded by for example '#' or ''.

comment:7 Changed 12 years ago by Peter Johansson

Description: modified (diff)

Default copyright should be basen on alternative statistics (see #24), which means to have a copyright of a file you should at at least one revision be owner of at least one line being code or comment.

comment:8 Changed 12 years ago by Peter Johansson

(In [225]) copyright based on log is printed to cout refs #36

comment:9 Changed 12 years ago by Peter Johansson

(In [226]) added reading of config file in Parameter closes ##106 and #98. Move function check_target from svndigest.cc to utility.cc and changed name to node_exist. added support for aliases in Copyright update refs #36

comment:10 Changed 12 years ago by Peter Johansson

Milestone: 0.70.6

comment:11 Changed 12 years ago by Jari Häkkinen

This should probably go elsewhere but the ticket is closed. I prefer to keep the Parameter class for parsing command line options, but we should probably introduce a Configuration rather than use Paramter. A Configuration class could support in resolving this ticket, but also ticket:75 about author colours.

comment:12 Changed 12 years ago by Peter Johansson

Resolution: fixed
Status: newclosed

(In [227]) Automatic copyright statement fixes #36

Note: See TracTickets for help on using tickets.