The latest release of Piston provides you with the ability to switch the upstream repository locations without losing any history.

For example:


1 $ piston switch http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-1 vendor\rails
2 Processing ‘vendor\rails’…
3 Fetching remote repository’s latest revision and UUID
4 Restoring remote repository to known state at r6010
5 Updating remote repository to http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-1@5990
6 Processing adds/deletes
7 Removing temporary files / folders
8 Updating Piston properties
9 Updated to r5990 (663 changes)

Piston 1.3.0 also shows the revision number of locked directories.

Installation

As usual, nothing could be simpler:


1 $ sudo gem install —include-dependencies piston

A minor correction to Piston:

  • Import subcommand would fail with a “svn: Explicit target required (‘vendor/rails’ interpreted as prop value)” error. This was a minor error in the import code. Reported by Daniel N.
  • The import subcommand could import another revision than what was intended, if HEAD was updated while the import is in progress.

Install using:


1 $ gem install piston

Piston 1.2.0 is here. From the ChangeLog:

  • New status subcommand. Shows M if locally or remotely modified. Applies to one, many, all folders. This subcommand requires the use of a Subversion 1.2.0 client. Thanks to Chris Wanstrath for the inspiration. His Rake
    tasks are available at http://errtheblog.com/post/38.
  • Minor patch by Miguel Ibero Carreras to make Subversion always use the C locale, instead of the current one. This allows Piston to be used with internationalized versions of Subversion. David Bittencourt later reported the same problem. Thanks!
  • Better handle how update finds it’s latest local revision to prevent conflicts. If you had never locally changed your vendor repositories, this fix will change nothing for you. This helps prevent local conflicts if you had ever applied a local patch.

Installation


1 $ gem install piston
2 Successfully installed piston, version 1.2.0

There is no need to install Piston on your server. A local installation on your development machine is all that you need to administer the remote code.

Caveat

It is imperative that you locally update your piston:local-revision property manually, just this once. Prior to 1.2.0, Piston would almost never update the piston:local-revision property, meaning it would always think there were local changes. With the new update implementation, Piston would try to merge changes that had already occured, causing many conflicts. You need to reset the value of piston:local-revision to the revision where you last did a piston update or import.

An example is in order.


1 $ svn propget piston:local-revision vendor\rails
2 29
3
4 $ svn log r head:1 vendor/rails
5 -
———————————————————————————————————
6 r31 | francois | 2006-11-17 10:05:54 0500 (ven., 17 nov. 2006) | 1 line
7
8 Updated to Rails r4500
9 -
———————————————————————————————————
10 r30 | francois | 2006-11-17 10:03:48 0500 (ven., 17 nov. 2006) | 1 line
11
12 Import Rails r4393
13 -
———————————————————————————————————
14
15 $ svn propset piston:local-revision 31 vendor\rails
16 property ‘piston:local-revision’ set on ‘vendor\rails’
17
18 $ svn commit —quiet —message "Updated piston:local-revision to 31, per ChangeLog instructions"

Visit Piston’s website.

Have you ever done a release using Capistrano, only to have it fail because an svn:externals update failed ? Yeah, you know the feeling. Happens to me all the time. Plus the deploy task takes way too long when the server has to make all those queries to remote servers, most of which you do not know if they will still be there tomorrow.

Introducing Piston

Piston is a command line utility that copies a remote repository’s content to your working copy. Having a local copy of the code gives you many benefits:

  • Faster updates on the server (only one repository is contacted);
  • Less dependent on external code repositories (they might disappear, be offline at a critical time, or even corrupted);
  • Ability to apply patches and enhancements without waiting for the patch to be applied upstream.

Installation


1 $ gem install piston
2 Successfully installed piston, version 1.0.1

There is no need to install Piston on your server. A local installation on your development machine is all that you need to administer the remote code.

Examples

For a Rails project:


1 $ piston import \
2 http://dev.rubyonrails.org/svn/rails/trunk \
3 vendor/rails
4 Exported r4818 from ‘http://dev.rubyonrails.org/svn/rails/trunk’ to ‘vendor/rails’
5
6 $ svn st -N vendor
7 A vendor/rails

As you can see, Piston copied the full contents of Rails Edge to my working copy.

Visit Piston’s Website

Search

Your Host

A picture of me

I am François Beausoleil, a Ruby on Rails and Scala developer. During the day, I work on Seevibes, a platform to measure social interactions related to TV shows. At night, I am interested many things. Read my biography.

Top Tags

Books I read and recommend

Links

Projects I work on

Projects I worked on