Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

Designing a better user experience

Tuesday, December 28, 2010 Pablo Santos 0 Comments

A few days ago we were working on the new "method history" functionality and then we were making fun about the error message to pop-up when a user clicks in the middle of two methods (it doesn't find any method then) and tries to find the history of the "non-selected" method (well, we're the ones to blame here because probably a disabled menu would work better :P)

But, you know, sometimes you would like to come up with very, very strong error messages... wouldn't you? :)
Pablo Santos
I'm the CTO and Founder at Códice.
I've been leading Plastic SCM since 2005. My passion is helping teams work better through version control.
I had the opportunity to see teams from many different industries at work while I helped them improving their version control practices.
I really enjoy teaching (I've been a University professor for 6+ years) and sharing my experience in talks and articles.
And I love simple code. You can reach me at @psluaces.

0 comentarios:

Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

SSL Enabled Plastic Connections - Reborn!

Tuesday, December 28, 2010 Miller Auker 5 Comments

NOTE: This article is updated and maintained at this link here
Here are the instructions on how to configure Plastic SCM release 3.0.187.x
(x > 0) to communicate using a secure SSL channel between the client and server.
First download and unzip the following package. PlasticSCM_SSL_ConfigFiles.zip. Next we are going to copy these files to specific locations.

Server setup:


  1. Stop the Plastic SCM server service from windows services

    1. In Windows goto Start->Run->type "services.msc" and find the Plastic Server service and stop it.

  2. Navigate to your Plastic SCM server installation folder and rename your current remoting.conf file to remoting.conf.bck.

  3. From the zip file server folder extract the new remoting.conf to the Plastic server installation folder.

    1. The provided remoting.conf file will configure your server to use the default TCP port 8084 for non-SSL client connections and TCP port 8085 for SSL connections.

    2. You can change the Listening ports above by editing the remoting.conf file.

  4. A plastic.key and a plastic.cert files should be generated for the SSL to work, these files should be placed in the Plastic SCM server folder.

    1. to generate the files, we will use a certificate generator tool makecert.exe obtainable from the .NET SDK:

      http://msdn.microsoft.com/en-us/library/bfsktky3%28VS.80%29.aspx

    2. use the following command from within .NET SDK command Prompt: c:\>hostname

    3. record the above hostname to use it in the following command to generate the certification files:

    4. c:\> makecert -r -pe -eku 1.3.6.1.5.5.7.3.1 -n "CN=hostname" -sv c:\plastic.key c:\plastic.cert

    5. see Figure 1



    1. If a pop up window “create Private Key password” is shown, choose None as illustrated in Figure 2



    1. Copy the generated plastic.cert and plastic.key from c:\ to the plastic scm server folder.

    2. Edit the remoting.conf file for the plastic server to point to the above generated certificate files; find the section and update it as illustrated below.

    <channel type="Codice.Channels.PlasticSecuredTcpChannel, 
    plastictcpchannel" port="8087"
    sslCertificateFile="C:\Program files\PlasticSCM\server\plastic.cert"
    sslPrivateKeyFile="C:\Program files\PlasticSCM\server\plastic.key"
    ;
    name="secured">

  5. Start the Plastic server, and check the connections on the server machine to verify that server is listening on the right TCP ports, executing the following command from a command-prompt c:\>netstat –na –p TCP as illustrated on Figure 3


Client setup:


To enable the Plastic SCM client to connect to the Plastic SCM server using SSL, first extract from client folder within the zip file, the file remoting.conf that should be extracted and placed in the Plastic SCM client installation folder.
Complete the setup following the below steps:
  1. re-run the Client configuration wizard, and point to the port that is used for SSL, in our case port 8085.

  2. edit the client.conf file adding the following line:

    1. <ServerProtocol>ssl</ServerProtocol>

    2. see Figure 4


  1. if you want to use the previous non SSL connection, you must remove the above added line in the client.conf file and re-run the Client configuration wizard, and point to the port that is used for non-SSL connections, in the default case port 8084.

The makecert.exe program is part of the Windows SDK, so Windows developers probably already have it. We found some easy instructions on doing this on another blog post here.

5 comentarios:

Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

Setting up two Plastic SCM installations on the same machine

Friday, December 24, 2010 John Posner 0 Comments

A single machine can host multiple Plastic SCM installations -- that is, multiple instances of a repository server process, each with its own set of repositories. In this post, I'll address a specific case:
  • You have already installed Plastic SCM on a Windows machine. Now, you want to create a second Plastic SCM installation on that machine.
Here's the recipe:
  1. To provide a home for the second repository server process, "clone" the server subdirectory within the Plastic SCM installation directory. For example, you can use Windows Explorer to Copy the server directory, then Paste it in the same location. Rename the new "clone" to server2.
  2. You need to reconfigure the repository server process to listen on a different IP port (say, 8085). In the server2 directory, run the configureserver program to make this change.
  3. You might need to reconfigure Plastic SCM's connection to its database back-end, so that the second installation uses a different set of database files. Still in the server2 directory, see whether file db.conf exists. If so, add a <DatabaseSuffix> subelement to this XML-format file. For example:

    <DbConfig>   ...   <DatabaseSuffix>_s2</DatabaseSuffix>   ...</DbConfig>

    If no db.conf file exists, the repository server is using the default database back-end, Firebird, which is embedded in the repository server and requires no configuration file.
  4. You need to create a new Windows service for the second instance of the repository server process. Open a command prompt window in the server2 directory, and run this command:

    plasticd --installservice --servicename=PlasticServer2

    Alternative: use the Windows command-line tool sc ("service control"). Be sure to enter the entire command on a single line, and to leave a SPACE after each "=" character. For example:

    sc create PlasticServer2
       binPath= "C:\Program Files\PlasticSCM"\server2\plasticd.exe
       DisplayName= "Plastic Server 2"
       start= auto

  5. Start the second repository server process:

    net start PlasticServer2
  6. Use Plastic SCM client software to remove the "cloned" repositories from the second Plastic SCM installation. (This is necessary only if you're using Firebird embedded or SQLite and your databases are in the server's directory!!) For example, using the CLI's command for removing a repository:

    cm rmrep myoldrepo@mymachine:8085

0 comentarios:

Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

Plastic SCM Plug-in for Hudson CI

Thursday, December 23, 2010 Miller Auker 2 Comments

In this blog post we will go through the very basic steps to setup Plastic SCM Plug in for Hudson CI and do some builds.

The Plastic SCM plug in developed for Hudson CI is basically an .hpi file which will be included in the HUDSON repository (working on it).

However, you can download the plug in from this link: Download_PlasticSCM_Plugin_for_Hudson
Just unzip the hpi file into .hudson/plugins, restart the server, and it should work.
For this Blog post my setup involves the following software:
  • OpenSuse 11.1_x86

  • Plastic SCM version 3.0.187.22

  • Hudson CI ver. 1.384 (also tried it with 1.398)

  • gcc-c++ ver. 4.3 (use it for compiling the Hello World sample with Hudson)

  • Test files you can download from this link: Download_Test_Files

Create a Plastic workspace and extract the test files into the directory of the workspace.
The test files are basically two files, a helloworld.cpp and a script file BuildHello that calls the g++ compiler and compiles helloworld.cpp. Add the files to Plastic SCM so they are controlled, as illustrated in figure1.



Figure 1


Now into Hudson:
Log into Hudson, in my setup: http://localhost:8080/

Navigate to Manage Hudson-->Manage plugins-->Installed (choose Installed Tab)
Illustrated in figure2



Figure 2

Plastic SCM Plug in should be in the list and enabled. (double checking here :-))
Plastic SCM plug in does not differ much from the other Hudson Plug ins, so let us create a project and do some builds.
  • New Job-->Job name: PlasticSCM_prj1-->Build a free-style software project-->OK

Illustrated on figure 3



Figure 3


  • Next page we will configure Source Code Managment-->Plastic SCM-->Selector (Insert Plastic SCM workspace selector, fig 4+5)

    • Selector can be obtained by many ways, this is just one of them.

    • CD to your workspace directory ex.cd \millerwks\prj1\

    • execute cm showselector (cm ss) ex. \millerwks\prj1\cm ss

    • Selector will be printed and could look like this example:


repository "default"
path "/"
br "/main"
co "/main"


  • On the same page under the Build-->Execute shell-->Command (Insert the name of the shell script BuildHello, fig 6)

  • Save
Illustrated in the next figures



Figure 4



Figure 5



Figure 6


And now we are ready to do a "manual build" without triggers, so go ahead and push the button Build Now as indicated in fig 7.



Figure 7


Well, after pushing the Build Now (for many times), I get Build failed which is not cool! lets try to find out what is causing the failing of this build.
In the Build History on the left I entered into the latest build, and clicked on Concole Output. see fig 8.



Figure 8


Ok, cannot find the build script Buildhello, checking figure 1 with figure 6, I inserted the name of the script wrongly, Buildhello instead of the correct BuildHello. So I go to the configuration of the project within Hudson and fix the name, as in fig 9.



Figure 9


A manual build now and things looks much better, fig 10 + 11



Figure 10



Figure 11


And it is by time we try if our hello program built correctly as illustrated in fig 12.




Figure 12


2 comentarios:

Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

Announcing the method history

Thursday, December 23, 2010 Pablo Santos 0 Comments

We’re very happy to announce our newest Plastic SCM release (3.0.13) including one of the features we’re most proud of: method-based history!

You can now select a method within Visual Studio, right click to show the context menu, and select “method history”. Plastic SCM will go through the file history and analyze the evolution of that specific method!!

Pablo Santos
I'm the CTO and Founder at Códice.
I've been leading Plastic SCM since 2005. My passion is helping teams work better through version control.
I had the opportunity to see teams from many different industries at work while I helped them improving their version control practices.
I really enjoy teaching (I've been a University professor for 6+ years) and sharing my experience in talks and articles.
And I love simple code. You can reach me at @psluaces.

0 comentarios:

Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

Why merge tracking matters

Thursday, December 16, 2010 Pablo Santos , 0 Comments

My goal with this blog post is to explain why merge tracking is so huge for all the Subversion, CVS and VSS users out there who still think “hey, I don’t care about the new SCM systems, I don’t need distributed development!”

I know the GitHubbers and Mercurial users and Plastikers out there know what I’m talking about, but for the sake of clarity: the new DVCS systems are not only good because they’re distributed, but specially because they’re able to handle merging correctly. (Yes, I hear SVN users shouting: “we do have merge tracking after 1.5”, I know, I know, and I still say… switch to another system! :P.)

So, I will try to explain why merge tracking is so important with a very simple scenario. Let’s go.

Pablo Santos
I'm the CTO and Founder at Códice.
I've been leading Plastic SCM since 2005. My passion is helping teams work better through version control.
I had the opportunity to see teams from many different industries at work while I helped them improving their version control practices.
I really enjoy teaching (I've been a University professor for 6+ years) and sharing my experience in talks and articles.
And I love simple code. You can reach me at @psluaces.

0 comentarios:

Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

New manual: Introduction to Plastic SCM

Wednesday, December 15, 2010 John Posner 0 Comments

I'm happy to announce that a new manual, Introduction to Plastic SCM, has joined the product documentation set. It's available as a PDF, at http://www.plasticscm.com/releases/3.0.1/plastic_intro.pdf . This new "Intro" goes wide, but not deep. It's intended to give you a feel for what you can do with Plastic SCM, and for how (and how easily) you can accomplish SCM tasks with this great product!

For the most part, this manual replaces the Plastic SCM User's Guide (which also was called the "Introduction" in some places). But there is some reference-level material, such as the details of the configuration language for the workspace's selector, that is not included in the new manual. So don't get rid of your "User's Guide" bookmark just yet!

We love to get feedback on all our work, so please don't hesitate to send questions, complaints, and compliments to doc@codicesoftware.com.

0 comentarios:

Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

A plugable Plastic SCM server

Saturday, December 11, 2010 Pablo Santos 2 Comments

Yesterday I got a SheevaPlug development kit and the first idea that came to my mind was “hey, let’s put a Plastic server here!” I’m involved in a small robotics project at the university (I’m an associate professor in Computer Science, although robotics is not my area) and we’re evaluating different alternatives to use as the robot brain. But yes, before moving some engines I wanted to check if it was possible to set it up as a Plastic server.

The look and feel


Well, I just took a few pictures of the “pluggable computer” today, close to my BlackBerry so you can see how small it is.



Start up


First thing is to go and plug the “thing”. Then it is supposed to start up and get an IP address from your router. That’s what I did, then went to my router configuration and checked that a new box was online!



Then I followed the instructions here to connect using ssh and log in. Cool!

Setting up


Follow the instructions step by step, all of them, including the one related to the time and date settings because otherwise you’ll end up in trouble when installing packages. It takes just a few seconds to go through all the commands. (I didn’t set the date at the beginning and jumped into mono installation and… ouch! Didn’t work!)



Installing mono


Again, really simple and well documented here. It’s an old 2.0 Mono (so I will try to come up with a newer 2.8 in the coming days, but just stayed with this one for the initial tests).

$ apt-get install mono-2.0-devel

And then don’t forget to install the following one too (otherwise you won’t have remoting and Plastic won’t work!)

$ apt-get install libmono-system-runtime2.0-cil



Copying Plastic


I just copied the Plastic SCM server binaries into /root/plastic/server and then run:

$ mono plasticd.exe –console

But… it didn’t work!

First thing I hit was that the SQLite libraries installed by default on the box were not ok to work with the Mono wrapper.

Ok, first things first. Here’s my db.conf to use a SQLite backend:


<DbConfig>
<ProviderName>sqlite</ProviderName>
<ConnectionString>Data Source={0};Pooling=true</ConnectionString>
</DbConfig>


Installing SQLite


First I got the package and then installed gcc and make

$ apt-get install wget
$ apt-get install gcc
$ apt-get install make
$ wget http://67.18.92.124/sqlite-autoconf-3070400.tar.gz

Then I built the sources with the following flags:

$ CFLAGS=-DSQLITE_ENABLE_COLUMN_METADATA=1 ./configure && make

Then I just added the .libs path inside the SQLite src dir to the LD_LIBRARY_PATH (hey! I know it is not clean but I’m just doing a quick test!)

Starting up Plastic


I typed:

$ LD_LIBRARY_PATH=/root/sqlite/sqlite-autoconf-3070400/.libs:/usr/lib:/root/plastic/server: mono plasticd.exe --console

And it … started up!



But then I connected from another machine and got a beautiful zlib related error. Why? Because Plastic wasn’t correctly loading zlib, so I did the following “fix” (from the server’s path):

$ ln -s /usr/lib/libz.so.1 libz.so

And then I restarted and everything worked!

Ideas


Well, I really love the idea of the “pluggable Plastic SCM server”. I’m using this one as a “spare mirror server” where I automatically push my changes from my laptop on checkin. The “plug” doesn’t have a lot of “disk space” (flash) but an external card can be plugged in or even an external hard drive. Or, even better, I’ll give it a try connecting the Plastic SCM server on it to an external MySQL database… Cool, isn’t it? I mean, for $99 you can have a really cheap mirror server (unless you’re a team with 100 developers or more but, hey!, then don’t be so cheap and buy a real backup!! :P)
Pablo Santos
I'm the CTO and Founder at Códice.
I've been leading Plastic SCM since 2005. My passion is helping teams work better through version control.
I had the opportunity to see teams from many different industries at work while I helped them improving their version control practices.
I really enjoy teaching (I've been a University professor for 6+ years) and sharing my experience in talks and articles.
And I love simple code. You can reach me at @psluaces.

2 comentarios:

Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

Welcome to the jungle!

Friday, December 10, 2010 Pablo Santos , 6 Comments

Note to readers: I strongly recommend reading this post while listening this.

And now... for those about to Git... we salute you!

We’ve just released GitJungle, a small, beautiful Git repository browser using our Plastic SCM Branch Explorer (BrEx) visualization technology that basically lets you look at your Git repo from... well, a different angle.

Pablo Santos
I'm the CTO and Founder at Códice.
I've been leading Plastic SCM since 2005. My passion is helping teams work better through version control.
I had the opportunity to see teams from many different industries at work while I helped them improving their version control practices.
I really enjoy teaching (I've been a University professor for 6+ years) and sharing my experience in talks and articles.
And I love simple code. You can reach me at @psluaces.

6 comentarios:

Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

Plastic Themes

Thursday, December 09, 2010 Pablo Santos 0 Comments

Today I'll come up with a small tip and no, it won't be related to branching, merging, replicas or patterns from the Linux kernel... promised!

An easy one for a Thursday, cool?

Ok, I'd love to have something as cool as the Chrome Theme Gallery but let's start small: do you know your current Plastic SCM GUI client is able to change the top banner so you can customize it and look cooler than any of your colleagues?

Look, suppose you want to give your GUI a more Christmas-time style:



Cool, isn't it?

Ok, in order to change your banner:

  • Create a beautiful png image (500x56 aprox)
  • Save it as banner.png at your Plastic client location
  • Restart the Plastic GUI and... you're done!

    In case you want to give a try to the Christmas banner, just download this one:



    And now a quick look at my own private banner gallery... ;)



    Well, I know you're all very busy "pros" doing important stuff with Plastic but... maybe you can give it a try, or even better, design and share your own!! :)

    Enjoy!
    Pablo Santos
    I'm the CTO and Founder at Códice.
    I've been leading Plastic SCM since 2005. My passion is helping teams work better through version control.
    I had the opportunity to see teams from many different industries at work while I helped them improving their version control practices.
    I really enjoy teaching (I've been a University professor for 6+ years) and sharing my experience in talks and articles.
    And I love simple code. You can reach me at @psluaces.
  • 0 comentarios:

    Who we are

    We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

    If you want to give it a try, download it from here.

    We also code SemanticMerge, and the gmaster Git client.

    DVCS for everyone

    Tuesday, December 07, 2010 Pablo Santos 2 Comments

    Or, an illustrated guide to DVCS...

    As you’ve probably realized, I’ve started writing a series of blog posts, trying to be as “educational” as possible, and covering topics that range from the history of SCM to branching patterns to the way in which the folks working on the Linux kernel make the best use of branching patterns.

    My challenge for today is to try to turn the distributed development tiger into a friendly cat, unable to scare anyone. I know a good fraction of the readers are not really scared of DVCS at all (you Git, Hg, Plastic and Bazaar coders out there!) but since we released our free version one month ago I receive more and more emails from people saying things like “hey, yes, I need better branching and merging but... what’s all this noise about being distributed?”.

    So here goes, I’ll try to give you a very easy explanation.

    Pablo Santos
    I'm the CTO and Founder at Códice.
    I've been leading Plastic SCM since 2005. My passion is helping teams work better through version control.
    I had the opportunity to see teams from many different industries at work while I helped them improving their version control practices.
    I really enjoy teaching (I've been a University professor for 6+ years) and sharing my experience in talks and articles.
    And I love simple code. You can reach me at @psluaces.

    2 comentarios:

    Who we are

    We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

    If you want to give it a try, download it from here.

    We also code SemanticMerge, and the gmaster Git client.

    Integrating Plastic SCM with Trac Issue Tracking

    Friday, December 03, 2010 John Posner 0 Comments

    Hello, Plastic SCM user community! My name is John Posner, and I'm happy to introduce myself as a new member, having joined the Codice team as a technical writer. Actually, the technical writer. I arrive with some pretty good SCM credentials, having spent most of the past two decades in this field. I was on the original team that developed Rational ClearCase, and was also the first tech writer at AccuRev. (AccuRev claimed to be "ClearCase done better" -- with some justification, IMHO. An AccuRev stream managed to serve as both a branch and a label – pretty cool, but hard for many people to understand and use.)

    I've spent the past couple of weeks learning Plastic SCM, and now I'd like to share some of what I've learned. Codice makes a big deal of "task-based development" and a "branch per task" approach, so that's one of the areas I focused on. Since Codice doesn't have its own issue-tracking system (ITS), this approach can work only if Plastic SCM plays well with existing, popular ITSs. And since this sort of thing is pretty complex, I was hoping to find some juicy bugs -- one of a tech writer's greatest joys!

    I took a look at Codice's list of ITS integrations, currently eight of them, and decided that Trac was in my comfort zone. This open-source ITS is built in Python, which I've used a lot over the past decade. (The Codice guys seem to be into Ruby for scripting, but I forgive them.) So I fired up my Windows 7 laptop, an HP Pavilion dv7, and jumped in.

    Download Party!

    Here's a list of the software I downloaded, all of it free:

    Whoa – what's Subversion doing on that list? It turns out that the XML-RPC plugin code is stored in a Subversion repository -- go figure!

    In this age of Windows wizards, software installation is pretty straightforward, so here's just a brief outline of how I proceeded:

    1. I installed Plastic SCM in the standard way, into the standard location C:\Program Files\PlasticSCM.
    2. I installed Python in the standard way, into the standard location C:\Python26.
      (OK, I confess: both Plastic SCM and Python were already installed on this machine when I started this little exercise.)
    3. I installed Python's distutils 0.6 module using the wizard in setuptools-0.6c11.win32-py2.6.exe. This places easy_install.exe in folder C:\Python26\Scripts.
    4. At a command prompt, I used this command to install Trac:
      easy_install Trac==0.12

      As with distutils programs, Trac programs get placed in folder C:\Python26\Scripts.
    5. In a Web browser, I went to trac.edgewall.org/wiki/TracStandalone and copied this script for creating username-password entries, storing it as file trac_digest.py:

      from optparse import OptionParser
      # The md5 module is deprecated in Python 2.5
      try:
          from hashlib import md5
      except ImportError:
          from md5 import md5
      realm = 'trac'
      
      # build the options
      usage = "usage: %prog [options]"
      parser = OptionParser(usage=usage)
      parser.add_option("-u", "--username",action="store",
          dest="username", type = "string",
          help="the username for whom to generate a password")
      parser.add_option("-p", "--password",action="store",
          dest="password", type = "string",
          help="the password to use")
      parser.add_option("-r", "--realm",action="store",
          dest="realm", type = "string",
          help="the realm in which to create the digest")
      (options, args) = parser.parse_args()
      
      # check options
      if (options.username is None) or (options.password is None):
          parser.error("You must supply both the username and password")
      if (options.realm is not None):
          realm = options.realm
      
      # Generate the string to enter into the htdigest file
      kd = lambda x: md5(':'.join(x)).hexdigest()
      print ':'.join((options.username, realm,
                      kd([options.username, realm, options.password])))
      
    6. It was a bit too soon to install the Trac XML-RPC plugin at this point, so I didn't. A little massaging of the Trac environment is required first.

    Setting Up the SCM and ITS

    With both the SCM and ITS systems installed, I set up some data to be used by their integration. Chances are you're like me: more familiar with Plastic SCM than with Trac. So I'll gloss over the Plastic SCM details and spend more time on the Trac details.

    To set up a Plastic SCM environment for the integration, I performed the following operations in Plastic SCM's beautiful, capable, speedy GUI: create a new repository; create a new workspace; create a few text files in the workspace; in the Items view, place the files under source control:


    ... and in the Labels view, create label BL_01 and attach it to everything in sight:


    I just had to illustrate those last two commands; they're right there when you need them, sitting at the top of their context menus. Sweet! (Another confession: to create files in the workspace, you need to go outside the Plastic SCM GUI.)

    Next, I set up a Trac issue-tracking environment in folder c:\nov9trac:

    • Go to the Python scripts folder, where the Trac executables were installed, and initialize a new environment:
      > cd C:\Python26\Scripts
      > trac-admin C:\nov9trac initenv
    • Create a digest entry for user jjp (that's me), using the script I download in Step #5 above, and store it as a one-line text file
      > python trac_digest.py –-username=jjp –-password=any > auth_digest.txt
    • Give myself permission to do just about anything in this Trac environment
      > trac-admin C:\nov9trac permission add jjp TRAC_ADMIN
    • Start a Trac Web server for this environment, listening on port 8765 and using the one-entry digest as its username-password database. The command prompt window becomes the Trac Web server's console
      > tracd -–port=8765 --auth=nov9trac,auth_digest.txt,trac C:\nov9trac


    With the Web server up and running, I fired up a Web browser and connected to the server. I made sure to enter a URL that included the exact hostname/portnumber combo that appeared in the Web server's startup console message:


    A Trac intro page appeared, where I logged in as jjp (the only Trac user so far):


    Then, I created some Trac issue records, called "tickets".


    For Ticket #1, I chose the title Alpha Project; for ticket #2, Beta Project, and so on. (Inspired choices, huh?)

    Setting Up the Integration

    Just about all the work I had done so far was to set up the Plastic SCM and Trac environments separately. Now for the fun part: getting the systems to work together. The integration is based on a tried-and-true (that is, old) network communication technology: XML-RPC. Here's the basic idea:

    When a particular branch is selected in the BranchExplorer, Plastic SCM makes a remote procedure call (RPC) to the Trac server. The server returns field values from the Trac ticket that is associated with the branch.

    Each Plastic SCM branch is associated with a Trac ticket, and each Trac ticket represents an engineering task. Et voila (or the Spanish equivalent), "branch per task" is a reality.

    Setting up the integration was just as straightforward – configuring the Trac server to use XML-RPC, and establishing a protocol in Plastic SCM for associating branches with tickets/tasks. Here's how I enabled XML-RPC support in Trac:

    1. I downloaded and installed Trac's XML-RPC plugin (which involved performing a Subversion checkout):
      > cd C:\Python26\Scripts
      > easy_install -Z -U http://trac-hacks.org/svn/xmlrpcplugin/trunk
    2. I enabled the XML-RPC plugin by adding these lines to the end of the Trac environment's configuration file, C:\nov9trac\conf\trac.ini:
      [components]
      tracrpc.* = enabled
    3. XML-RPC calls are to be made by an unauthenticated Trac user, named anonymous. So I created this user and give him (her? it?) permission to make the calls:
      > python trac_digest.py -–username=anonymous –-password=X >> auth_digest.txt
      > trac-admin C:\nov9trac permission add anonymous XML_RPC
    And here's how I turned on the Trac integration in Plastic SCM:

    1. In the GUI, I selected Issue Tracking in the top-level toolbar:

    2. In the Issue Tracking dialog, I (1) selected Trac as the issue tracking system; (2) specified a branch prefix, establishing the protocol that all Plastic SCM branches with names of the form tktNNN are to be linked with Trac ticket NNN; and (3) specified the URL of the Trac server – the same URL I used when creating the Trac tickets.


      To make sure that I'd done my work correctly, I (4) clicked the Test Connection button (and held my breath). It worked the very first time – no kidding!

    Using the Integration

    Finally, it was time to test the integration between the Plastic SCM and Trac issue tracking systems! Using the BranchExplorer, I created a subbranch of /main, naming it tkt0011. (Would those leading zeros cause a problem?) I refreshed the BranchExplorer display, and sure enough – the new subbranch was annotated with the title of Trac ticket #11: Kappa Project.


    So far, so good!

    Next, I clicked Show Extended Information in the BranchExplorer's toolbar, and then clicked Edgewall Trac Extension in the extended info panel. Uh-oh, the panel was blank. Then I figured out that the BranchExplorer is not telepathic – I was thinking about the /main/tkt0011 branch, but I hadn't selected that branch. Clicking on the branch revealed a very nice extended information display:


    And to get access to the actual Ticket #11, I double-clicked in the extended information panel:


    That's the integration – simple to set up and simple to use!

    I know what you're thinking: did I find any bugs in this facility? Sure I did! If Trac's Web server is not running, trying to launch the BranchExplorer causes the Plastic SCM GUI to hang. I also thought of an enhancement: when looking at a ticket, the Trac user should be able to see what files have been created/changed for that task. It should be easy to implement, since it's just the set of revisions created on a particular Plastic SCM branch. That's one of the beauties of a branch-per-task approach. I'll try to get the Codice guys to address both these items. Bye for now!

    0 comentarios:

    Who we are

    We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

    If you want to give it a try, download it from here.

    We also code SemanticMerge, and the gmaster Git client.

    DVCS explained - working disconnected

    Thursday, December 02, 2010 Pablo Santos 0 Comments

    I recorded a short screencast/presentation explaining what distributed version control is about, focusing on disconnected development. Distributed development is much more than that, but let's start with a simple scenario that is very helpful for teams all sizes.

    I just focus on how a DVCS helps you working disconnected and allows you to share (push) your changes back to the main server.

    Hope it helps!

    Pablo Santos
    I'm the CTO and Founder at Códice.
    I've been leading Plastic SCM since 2005. My passion is helping teams work better through version control.
    I had the opportunity to see teams from many different industries at work while I helped them improving their version control practices.
    I really enjoy teaching (I've been a University professor for 6+ years) and sharing my experience in talks and articles.
    And I love simple code. You can reach me at @psluaces.

    0 comentarios: