• This repository has been archived on 29/Apr/2020
  • Stars
    star
    119
  • Rank 297,930 (Top 6 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 16 years ago
  • Updated about 14 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Piston is a utility that eases vendor branch management. This repository is a complete reimplementation of Piston to provide different backends, depending on the repositories and working copies you pistonize from.
Piston is a utility that eases vendor branch management.
This is similar to <tt>svn:externals</tt>, except you have a local copy of
the files, which you can modify at will.  As long as the changes are
mergeable, you should have no problems.

Piston is Ruby 1.9.1 compatible.

This tool has a similar purpose than svnmerge.py which you can find in the
contrib/client-side folder of the main Subversion repository at
http://svn.collab.net/repos/svn/trunk/contrib/client-side/svnmerge.py.
The main difference is that Piston is designed to work with remote
repositories.  Another tool you might want to look at, SVK, which you can find
at http://svk.elixus.org/.

From Wikipedia's Piston page (http://en.wikipedia.org/wiki/Piston):
  In general, a piston is a sliding plug that fits closely inside the bore
  of a cylinder.

  Its purpose is either to change the volume enclosed by the cylinder, or
  to exert a force on a fluid inside the cylinder.

For this utility, I retain the second meaning, "to exert a force on a fluid
inside the cylinder."  Piston forces the content of a remote repository
location back into our own.


= Notes on 2.0

In the 1.0 era, Piston was exclusively geared towards Subversion repositories.
In early 2008, Git gained a lot of popularity among Ruby and Rails coders.
Piston was rewritten during that period to allow many repositories and working
copies to be used together.

The documentation still refers to Subversion throughout, but 2.0 allows any
repository to be used with any working copy.


= Installation

Nothing could be simpler:

 $ gem install piston


= Usage

First, you need to import the remote repository location:

 $ piston import http://dev.rubyonrails.org/svn/rails/trunk vendor/rails
 Exported r4720 from 'http://dev.rubyonrails.org/svn/rails/trunk' to 'vendor/rails'

 $ svn commit -m "Importing local copy of Rails"

When you want to get the latest changes from the remote repository location:

 $ piston update vendor/rails
 Updated 'vendor/rails' to r4720.

 $ svn commit -m "Updates vendor/rails to the latest revision"

You can prevent a local Piston-managed folder from updating by using the
+lock+ subcommand:

 $ piston lock vendor/rails
 'vendor/rails' locked at r4720.

When you want to update again, you unlock:

 $ piston unlock vendor/rails
 'vendor/rails' unlocked.

If the branch you are following moves, you should use the switch subcommand:

 $ piston import http://dev.rubyonrails.org/svn/rails/branches/1-2-pre-release vendor/rails
 $ svn commit vendor/rails

 # Vendor branch is renamed, let's follow it
 $ piston switch http://dev.rubyonrails.org/svn/rails/branches/1-2-stable vendor/rails


= Contributions

== Bash Shell Completion Script

Michael Schuerig contributed a Bash shell completion script.  You should copy
+contrib/piston+ from your gem repository to the appropriate folder.  Michael
said:

  I've put together a bash completion function for piston. On Debian, I
  just put it in /etc/bash_completion.d, alternatively, the contents can
  be copied to ~/.bash_completion. I don't know how things are organized
  on other Unix/Linux systems.


= Caveats

== Speed

This tool is SLOW.  The update process particularly so.  I use a brute force
approach.  Subversion cannot merge from remote repositories, so instead I
checkout the folder at the initial revision, and then run svn update and
parse the results of that to determine what changes have occured.

If a local copy of a file was changed, it's changes will be merged back in.
If that introduces a conflict, Piston will not detect it.  The commit will be
rejected by Subversion anyway.

== Copies / Renames

Piston *does not* track copies.  Since Subversion does renames in two
phases (copy + delete), that is what Piston does.

== Local Operations Only

Piston only works if you have a working copy.  It also never commits your
working copy directly.  You are responsible for reviewing the changes and
applying any pending fixes.

== Remote Repository UUID

Piston caches the remote repository UUID, allowing it to know if the remote
repos is still the same.  Piston refuses to work against a different
repository than the one we checked out from originally.


= Subversion Properties Used

* <tt>piston:uuid</tt>: The remote repository's UUID, which we always confirm
  before doing any operations.
* <tt>piston:root</tt>: The repository root URL from which this Piston folder
  was exported from.
* <tt>piston:remote-revision</tt>: The <tt>Last Changed Rev</tt> of the remote
  repository.
* <tt>piston:local-revision</tt>: The <tt>Last Changed Rev</tt> of the Piston
  managed folder, to enable us to know if we need to do any merging.
* <tt>piston:locked</tt>: The revision at which this folder is locked.  If
  this property is set and non-blank, Piston will skip the folder with
  an appropriate message.

More Repositories

1

jaccard

A library to make calculating the Jaccard Coefficient Index a snap
Ruby
45
star
2

mindcode

Java
41
star
3

nestor

Ruby
27
star
4

counters

Easily record any metric in your system
Ruby
24
star
5

mongo_explorer

A Cocoa administration interface for Mongo databases
C
24
star
6

quicken_parser

A quick'n'dirty parser for the Quicken QFX format
Ruby
21
star
7

cliaws

A command-line client for Amazon Web Services
Ruby
20
star
8

ios-alarm

iOS Alarm Clock: Track your sleeping patterns
Objective-C
16
star
9

clitt

Command line, offline, time tracker
Ruby
15
star
10

dnsd

A simple (toy) implementation of DNS server
C
13
star
11

google_reader

Ruby Google Reader API (unofficial)
Ruby
10
star
12

acctsoft

A basic accounting software, written in Ruby, using the Rails framework. UI in French.
Ruby
10
star
13

upcoming

A sample Rails project for the Montreal.rb crowd - upcoming, without the Yahoo login-wall
Ruby
8
star
14

mor7-google-charts-demo

A simple Rails application demoing using Google Charts
Ruby
6
star
15

komando

Command-driven framework, especially suited for web applications
6
star
16

autotestr

Autotest for Rails using Watchr
Ruby
5
star
17

family_budget

A Family Budget application
JavaScript
5
star
18

streaming-state-machine

This code refers to a blog post I made about using Scala case classes to implement states within a state machine
Scala
5
star
19

defmulti

An implementation of multimethod dispatching in Ruby
4
star
20

chronos-vagrant

Vagrant script to boot chronos and play with it
Ruby
4
star
21

Doto

Todo for iPhone, iPad, iPod Touch and Mac
Objective-C
4
star
22

gip

Gip into place: Piston without the SVN cruft
Ruby
3
star
23

fogbugz-svnhook

A Subversion post-commit hook that will edit FogBugz cases using Trac-like keywords
3
star
24

fogbugz_offline

Take FogBugz offline with you
Ruby
3
star
25

blog.teksol.info

The source of http://blog.teksol.info/
Ruby
3
star
26

monitor

Application monitoring
Ruby
3
star
27

baby-pow

A keyboard basher for kids; does fireworks style stuff. Uses Lร–VE game engine
Lua
3
star
28

budget

Online Budget Manager
JavaScript
2
star
29

so-536261

An attempt at answering a StackOverflow question
2
star
30

swarmtag

2
star
31

mor9-refactoring-to-patterns

JavaScript
2
star
32

linked_list

A LinkedList implementation that implements the same interface as Array
Ruby
2
star
33

haskell-lecture

Haskell
2
star
34

rpn_calc_on_clojure

Reverse Polish Notation calculator on Clojure, accross the network
Clojure
2
star
35

dm_on_rails

A blank Rails application that shows how to integrate DataMapper with Rails
Ruby
2
star
36

urlparser

URL Parser library, with code for Java, Ruby and other languages
Ruby
1
star
37

bundler-758-repro

Issue 758 on Bundler reproduction
1
star
38

git-wiki

1
star
39

hobo-repro

1
star
40

hadoop-bloomfilter

Extraction of the Hadoop CountingBloomFilter
Java
1
star
41

pycounters

A port of my counters gem - easily track counters for your systems
Python
1
star
42

almoneya

Double-entry accounting system written in Scala + Elm over PostgreSQL
Scala
1
star
43

gongren

A simple Rails application to manage a co-working space.
Ruby
1
star
44

ttr-ga

Haskell
1
star
45

Twearch

Objective-C
1
star
46

family

A "Family Manager": track kid's allowances, food journals, etc.
Scala
1
star
47

rental_agency

A demo Rails 3 application for a rental agency (cars, trucks, etc)
Ruby
1
star
48

simple_queues-scala

Companion to Ruby's SimpleQueues, designed for inter-operation
Scala
1
star
49

lift-scripts

A Bash script to automate Lift tasks
Shell
1
star
50

scoutinv

A tool to manage a scout group's inventory.
Ruby
1
star
51

trbl-api-sample

An example app using Trailblazer
Ruby
1
star
52

sony_reader

A Ruby library to access the Sony Reader without Sony's rootkit possibilities
Ruby
1
star
53

universal_person_organization_model_sql

A Universal Person and Organization SQL Model
1
star
54

zeus

Zeus is a work in progress to abstract the DB away in a separate hierarchy.
Ruby
1
star
55

dotfiles

My dotfiles
Vim Script
1
star
56

nestor_growl

A plugin for Nestor
Ruby
1
star
57

active_url

A Rails gem for generating secret URLs.
Ruby
1
star
58

surrender

Acts as a filter, returning the list of files that don't match the retain rules
Go
1
star