Opened 4 years ago

Closed 20 months ago

#4315 enhancement closed fixed (fixed)

Need convenience command for removing news fragment files

Reported by: jml Owned by: therve
Priority: normal Milestone: totally automated release infrastructure
Component: release management Keywords:
Cc: thijs Branch: branches/delete-news-fragments-4315
(diff, github, buildbot, log)
Author: therve Launchpad Bug:

Description (last modified by therve)

After running build-news as part of the ReleaseProcess and then reviewing and committing the changes, we need to delete the news fragment files (e.g. 2155.bugfix).

Unfortunately, doing this correctly is a bit of a pain. My best guess...

find . -name '*.bugfix' -or -name '*.misc' -or -name '*.feature' -or -name '*.removal' -or -name '*.doc' | xargs svn rm

This should be simpler.

Change History (15)

comment:1 Changed 4 years ago by jml

  • Component changed from core to release management
  • Owner glyph deleted

comment:2 Changed 4 years ago by jml

  • Milestone set to regular-releases

comment:3 Changed 4 years ago by jml

NewsBuilder._headings.keys() is a list of the actual file extensions that ought to be deleted.

comment:4 Changed 4 years ago by therve

  • Description modified (diff)

comment:5 Changed 4 years ago by <automation>

comment:6 Changed 3 years ago by thijs

  • Cc thijs added

Should this be a new command (clean-news?) or be part of build-news?

comment:7 Changed 3 years ago by exarkun

There doesn't seem to be any reason to make it a separate command. Let's make it part of build-news.

comment:8 Changed 21 months ago by therve

  • Owner set to therve

comment:9 Changed 21 months ago by therve

  • Author set to therve
  • Branch set to branches/delete-news-fragments-4315

(In [36557]) Branching to 'delete-news-fragments-4315'

comment:10 Changed 21 months ago by therve

  • Keywords review added
  • Owner therve deleted

Alright, let's automate stuff some more! Please review.

comment:11 Changed 20 months ago by tom.prince

comment:12 Changed 20 months ago by tom.prince

  • Keywords review removed
  • Owner set to therve
  1. The docstring should be updated to indicate that build-news must be run from an svn checkout, and that it deletes the news framgments from svn.
  2. Before running 'svn rm', the presence of a svn repo should be checked (this code can be shared with buildAllTarballs. I'm not sure what the appropriate behaviour is, if it isn't. I think it is probably to just delete the files. Thus, if it is run in a bzr or git repository, the commit will automatically pick up the removals.

Please resubmit for review.

comment:13 Changed 20 months ago by therve

  • Keywords review added
  • Owner therve deleted

Thanks for the review. I updated the docstring, and raised an error when it's not a SVN directory. The check is slightly different from the other one so I kept it separated. I don't think we should support other use cases for now.

comment:14 Changed 20 months ago by tom.prince

  • Keywords review removed
  • Owner set to therve

Looks good. Please commit.

comment:15 Changed 20 months ago by therve

  • Resolution set to fixed
  • Status changed from new to closed

(In [36726]) Merge delete-news-fragments-4315

Author: therve
Reviewer: tom.prince
Fixes: #4315

Delete NEWS fragments when building release NEWS files.

Note: See TracTickets for help on using tickets.