Mailinglist Archive: opensuse-buildservice (239 mails)

< Previous Next >
Re: [opensuse-buildservice] RFC: small patch for "osc commit" with big effect
  • From: Dirk Stöcker <opensuse@xxxxxxxxxxxx>
  • Date: Thu, 22 May 2008 08:10:21 +0200 (CEST)
  • Message-id: <alpine.LNX.1.10.0805220801230.3590@xxxxxxxxxxxxxxxxx>
On Wed, 21 May 2008, Christian Boltz wrote:

An idea for the new "interactive" commit where osc calls $EDITOR: [1]
Open $EDITOR with some type of template, for example:

OSC: enter lines that should appear in the package changelog:

OSC: enter lines that should only appear in the commit log:

OSC: Modified files:
OSC: mypackage.spec
OSC: Added files:
OSC: fix-foobar.patch
OSC: (every line starting with OSC: is ignored)

which mark the beginning of the two sections, and "^OSC:" as comment
The comments include a short summary about the changed/added/removed
files, which is usually a good reminder for the user.

The two OSC-START-... keywords could also be used with -m.

The only remaining question is how changelog entries without a
OSC-START-... keyword should be handled. I vote for "add to package
changelog also" in this case - better too much than incomplete ;-)

No. This is a new workflow, which no other software implements. Don't do that. There are enough established ways to do that.

Better solution: Support keywords like many other tools:

osc commit -m "LOG: add this as changelog message".

Now your above template suggestion is fine as well. Start the tool with $EDITOR and a template like that:

# OSC commit message supports some additional keywords. Each line stating
# with one of these keywords is handled specially:
# LOG: everything behind this goes into the package changelog or the
# RPM specfile
# BUG: this change is related to given bug number
# CLOSES: closes given bug number


Differences to your proposal:
a) Established work flow in many larger code repositories
b) much more expandable
- BUG, CLOSES probably will not be implemented right now, but I expect
them to come one day
c) commandline only usage works fine (A way to support multiple lines in
commandline should exists (e.g. support \n for newlines).
d) Using established standard comments char #

-- (PGP key available)
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >