Posts Tagged ‘change packages’

Opening the Desk Drawers of the AccuRev Mind

January 3rd, 2011 by jtalbott

To borrow from a common print journalism trick, consider this the cleaning out the desk drawers of my AccuRev mind.  Or if you tend to avoid newspaper columnists, especially sports ones, then let’s just call this a random “did you know” or “what’s new” post.  I think the last time I did one of these was in the AccuRev Version 4.5 days, and we now entered the days of AccuRev 4.9, so there might be a few things tossed in here that aren’t necessarily fresh off the presses…

AccuRev 4.9 introduces the long sought after “stale filter”.  Actually, it’s an Update Preview search, but it shows not just (stale) files, but also anything that will change at update time, like moves and new elements.  You can even perform actions in that search pane, like Diffs, prior to updating…

    Software Configuration Management

AccuRev 4.9 also brings you the -t <time_spec> argument for both stat and pop.  This lets you provide a transaction or time stamp to the command so you can reference a configuration of code at a point in time without having to utilize a time-based stream.

Software Configuration Management

Sticking with command-line tidbits, you can now use pop -D to populate elements without including their entire directory structure.  Very useful in situations where you might have different applications contained under a root folder yet want to populate them at a top level.

Software Configuration Management

Another really helpful enhancement is to the Deep Overlap search.  Now when you Merge a file that is in Deep Overlap, AccuRev changes the status to (kept)(member) in the filter so that you know which files have been operated on.  You also have the ability to promote from this search window, and subsequently the promoted file will no longer appear in the filter.

Software Configuration Management

If you haven’t started using the AccuRev WebUI, you’re really missing out.  One lesser known capability in the WebUI is the ability to take a regular query, Group by any field, and automatically convert it to a bar, line, or pie chart.  This report can then be sent and accessed as a URL, and obviously can be viewed by users without installing the classic GUI.

Software Configuration Management

To further bind the classic GUI and WebUI together, AccuWork issues in the classic GUI now contain a hyperlink “Issue URL” which takes you directly to the URL rendering of the issue in the WebUI.  And for those with a very extensive stream structure, have you checked out the St\ream Filter to personalize and only display streams that you care about?

Software Configuration Management

For folks running Continuous Integration, or for those who just want to be able to use command-line to see what’s changed in a stream over time – including inherited content! – I think you’ll be happy with this one.  You can use the accurev diff command to compare the contents of a single stream with itself over a period of time, without having to create a time-based stream.

Software Configuration Management

Have you noticed that when using the Stream Issue Mode in the StreamBrowser, you now see Incomplete Issues right in the “Show Active…” box attached to streams?

Software Configuration Management

And lastly for now, bonus points for anyone who can comment here to point out the AccuRev command-line typo that still works as if it is spelled correctly.  AccuRevers or former ones need not apply  ;-)

__________________________________________________________________________________________________________________________________________________

Change Packages for Agile Workflow

June 24th, 2010 by damonpoole

User Story Based Engineering

In other blog posts I’ve talked about using Multi-stage Continuous Integration to scale Continuous Integration for use in multi-team environments and using streams or branches to model your workflow directly in your SCM tool. While both of these approaches work well and provide a lot of value, they can also present a new challenge: how to associate enhancement requests and defects, which can be lumped together using the term “work items,” with the changes that implement them?

If you are doing mainline development, life is pretty simple. On check-in enter the enhancement request ID or defect ID in the comments. Once that association is made, it is fairly straightforward to figure out which enhancements and defects have been checked in. On the other hand, the more people you have checking in to the same branch, the less likely it is to be stable, even if you are doing Continuous Integration. So, how can we maximize the benefits of using streams to represent process and integration stages and still have the ability to match work items to the work done to implement them?

Representing Process and Integration Stages with Change Packages

(Let me first point out that while I’m using the generic term “work item” here, in an Agile team one would most likely use the term “User Story.” Both apply equally well in this context, but I’ll stick with work item for now.)

There is an SCM concept that maps to a work item which can be tracked from place to place, and that is a “change package.” It is called a change package because it represents something which, once defined, can be applied to multiple places and tracked regardless of how many different places it has been propagated.

Change packages can be promoted individually or in groups from stream to stream. That way, as work is promoted from stream to stream you have a record of the content of each stream from a high level perspective instead of a files perspective. A list of files is not very meaningful or useful. On the other hand, change packages allow you to ask questions like “which user stories are in the stream that represents all user stories that are ‘done’,” without having to resort to mainline development.

Something’s A-Twitter in My Backing Stream

June 22nd, 2010 by amonty

One of the cornerstones of any successful organization is communication. On Agile teams, we often meet to share information, update one another on progress, to reflect on that progress and discuss how the process can be improved. These interactions, be they stand-up or retrospective meetings, provide this information at regular intervals. But what if you need “real-time”  information sharing?

Consider the concept of “one piece flow”, often treated as the holy grail of engineering process purists. Lean/Kanban fan boys live to talk about this at conferences, and in the isle outside my cube. The idea is that a single “workpiece” at a time moves through the workflow. In the software development process, this is rarely limited to a single item, but instead is throttled by WIP limits to minimize the bottlenecks in the process. For example, the number of items worked on by developers is limited so that the count of items designated “ready for test” is kept at a manageable level. As a tester on an agile team, I’d like to know as soon as an item is moved from the “wip/development” phase to the “test/validation” phase.

Consider the following basic stream structure -

Simple Stream Structure

In an ideal model, testers would be notified as soon as an issue is promoted from the WIP stream to the Validation stream. This model assumes that the project is utilizing AccuRev change packages to track work items as issues. Having a distinct stream for validation purposes simplifies the job of the tester. All issues that exist in this stream have been unit tested by developers, passed basic regression tests, and are ready to be explored, validated, and promoted to the next stage in the workflow.

So, how can this level of communication be achieved? AccuRev triggers! The rest of this post will demonstrate how the server post-promote trigger could be used to provide updates using arguably the king of “What’s Happening?” – Twitter.

Why use Twitter in your Backing Stream?

Why not? Sure, you could use e-mail. But who wants more e-mail? Tweet it, and let them aggregate the information for you. Team members can follow the account, or not. Pointy-haired managers that dream of pie charts and love visibility can subscribe to an RSS feed, that you don’t have to manage. Lastly, if you’re an agilista, you’re already hip and trendy, (and let’s face it, you probably  already tweeted about the awesome presentation on Lean that you saw at the latest Agile conference).

The Server Post-Promote Trigger

I am not going to go into the gory details of the AccuRev trigger system. Here’s what you need to know.

  1. The trigger can be written in whatever language you like. In this example, I use Ruby.
  2. The trigger needs to be registered with the AccuRev server, and associated with the depot for your software project.

For this exercise, I wrote a quick script called tweet_post_promote.rb. The first step is to register this script with AccuRev.

>accurev mktrig -p SoftwareProject server-post-promote-trig ~/dev/ruby/tweet_post_promote.rb

Once registered, the trigger will now fire for all promotes in the SoftwareProject depot. Let’s take a look at the contents of the script.

#!/usr/bin/env ruby

require ‘rubygems’

require ‘crack’

require ‘twitter’

ACCUREV_DIR = “/sandbox/amonty/accurev/”

ACCUREV_STORAGE = “#{ACCUREV_DIR}storage/”

ACCUREV_SITE_SLICE = “#{ACCUREV_STORAGE}site_slice/”

USER = ‘ValidationBot’

PASS = ‘password’


def load_trigger_data(file)

xml = ”

File.open(“#{ACCUREV_SITE_SLICE}#{file}”) do |f|

xml = f.read

end

Crack::XML.parse(xml)

end


def twitter_get_auth(user, pass)

httpauth = Twitter::HTTPAuth.new(user, pass)

Twitter::Base.new(httpauth)

end


def main()

hash = load_trigger_data ARGV[1]

if hash["triggerInput"]["stream1"] == “Validation” then

changePackageIssue = hash["triggerInput"]["changePackages"]["changePackageID"]

update_string = “Issue #{changePackageIssue} just promoted to stream #{hash["triggerInput"]["stream1"]}”

twitter = twitter_get_auth(USER, PASS)

twitter.update update_string

end

end

main if __FILE__ == $0

This script is very simple. It makes use of the Ruby gems crack and Twitter. Essentially, the script takes the XML trigger file (provided as ARGV[1]) and loads it into a hash. Then the script checks to see if the stream being promoted to is our Validation stream. If so, it uses the twitter gem to update the status on our ValidationBot account.

Something's a-Twitter in my backing stream

A more useful example is to provide a link to the AccuRev Web UI Issue screen.

Something's a-Twitter in My Backing Stream

This way, anyone subscribing to the feed can click on the link and open the issue in the AccuRev Web UI.

Something's A-Twitter in My Backing Stream

This is a small example of how AccuRev triggers can be used to increase communication on your team. Testers can follow the ValidationBot account and be notified via their favorite Twitter client whenever an issue is promoted to the validation stream and they need to begin work on it. This could obviously be extended to include additional information (actual file changes, for example). That is, of course, if you can fit it into 140 characters. :)

For more information on AccuRev triggers, please see the Administrator’s Guide.