Clearing vestigial branches from a remote git repo

Submitted by Barrett on Sat, 08/06/2016 - 13:41

A couple of team repos I work on have, over time, accumulated feature and integration branches which are no longer needed.  Best practice is to clear these branches out once the code they contain is merged, but "the best laid schemes of mice and men..."

So I found myself facing a git repo with several dozen unneeded branches and no patience to clear them one at a time.  The solution to the problem is the command below.


Thoughts on management

Submitted by Barrett on Sat, 08/06/2016 - 10:51

I've been reading several books on the process of software development and management of late (see reading list below) and have begun trying to determine the nature of my own management philosophy.  This is an ongoing process in my head, but below are some of my initial thougts (summarized predominantly in platitude-ish sayings, because even though my inner snarker hates them that's how my mind works).

Hopefully the team I work with wont read this and feel that my behavior is not consistent with these.  I think this how I actually do things, but I'm as fallbile as anyone.


Git Bisect: The go-to tool for answering the "when did this stop working" question

Submitted by Barrett on Sun, 03/13/2016 - 21:24

Continuous integration and automated testing can significantly reduce the odds of regressions, but eventually, every project will fnd themselves facing a feature that used to work and no longer does.  When that time comes for you, I recommend git bisect.

[Fixed] Get valid RSS by adding CDATA wrappers to RSS description elements

Submitted by Barrett on Sat, 08/15/2015 - 06:19

A couple weeks ago, I posted about a problem I was having getting RSS to validate because the description element contained HTML markup.

The solution turned out to be as easy as I expected, once I found the right place to look. The first place I went was the Views module, where I found views-view-row-rss.html.twig in the templates directory. "Perfect", I thought, "that's my boy." A quick edit later, followed by a couple cache clears and some head-scratching, I still wasn't seeing my change.

RSS: Should stand for Real Simple, Sorta

Submitted by Barrett on Sun, 07/26/2015 - 09:48

For ages I've thought that I should get this site included on the Drupal Planet feed, and with the new build in D8 and a currently renewed momentum to actually write here, this seemed like a good time to actually do it.  Should be simple, right? Tag my content, allow commenting, submit the RSS feed url for inclusion, profit.  Not so much.

Finding all the redirects for a content type

Submitted by Barrett on Sat, 07/25/2015 - 12:55

We're in the middle of a drupal to drupal migration of one of our content types (blogs) and a stakeholder pointed out that they have a large set of redirects for the contet types that will need to be migrated, which raises the question of how to find all the redirects.  The easy thing to do is to list the redirects where the source is the node id of blogs published blogs.

select nid, dn.title, r.* from drupal_node as dn join drupal_path_redirect as r on dn.nid=substring(source, 6) where status=1 and dn.type='blog_post'

Adventures in D8'ing

Submitted by Barrett on Sat, 07/25/2015 - 10:07

It's time to make the jump to D8.  Let's face it, my site is mostly a haphazardly maintained blog site; it could really be done in GitHub Pages without real loss of functionality. There's realy nothing beyond core that I need, so might as well make the jump now.

First thing I notice: is pathauto still not in core? REALLY? When was the last time you saw a site using node/xxx paths?