# Piston 1.0.1 - Remote Repository Copying

**URL:** <https://www.ruby-forum.com/t/piston-1-0-1-remote-repository-copying/66400>\
**Category:** Ruby\
**Created:** [August 25, 2006, 7:46am UTC](https://www.ruby-forum.com/t/piston-1-0-1-remote-repository-copying/66400 "2006-08-25T07:46:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![fbeausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Post date:** [August 25, 2006, 7:46am UTC](https://www.ruby-forum.com/t/piston-1-0-1-remote-repository-copying/66400/1 "2006-08-25T07:46:05Z")

</div>

[http://piston.rubyforge.org/](http://piston.rubyforge.org/)

From the README:

Piston is a utility that enables merge tracking of remote  
repositories. This is similar to svn:externals, 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 has a similar purpose than svnmerge.py which you can find in  
the contrib/client-side folder of the main Subversion. The main  
difference is that Piston is designed to work with remote  
repositories. You should also investigate if SVK would be a better fit  
for you.

From Wikipedia’s 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 Piston, we retain the second meaning, to exert a force on a fluid  
inside the cylinder. In our case, the fluid is the code copied from  
the remote repository.

= Installation

$ gem install piston

Piston Home Page: [http://piston.rubyforge.org/](http://piston.rubyforge.org/)

Have a nice day !

---

<div class="post-metadata">

**Author:** ![fbeausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Post date:** [August 26, 2006, 11:09am UTC](https://www.ruby-forum.com/t/piston-1-0-1-remote-repository-copying/66400/2 "2006-08-26T11:09:57Z")

</div>

On Aug 24, 2006, at 10:44 PM, Francois B. wrote:

> the contrib/client-side folder of the main Subversion. The main  
> cylinder, or to exert a force on a fluid inside the cylinder.
> 
> ## Have a nice day !
> 
> François Beausoleil  
> [http://blog.teksol.info/](http://blog.teksol.info/)

```
Very cool Francois!

```

Thanks-  
-Ezra

---

<div class="post-metadata">

**Author:** ![fbeausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Post date:** [August 26, 2006, 11:28am UTC](https://www.ruby-forum.com/t/piston-1-0-1-remote-repository-copying/66400/3 "2006-08-26T11:28:16Z")

</div>

From the Ruby-Talk list. I didn’t look into this too closely, but it  
may be useful for a scenario where we use a set of flexible ‘power-tool’  
plugins in every project.

---

<div class="post-metadata">

**Author:** ![fbeausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Post date:** [August 26, 2006, 11:28am UTC](https://www.ruby-forum.com/t/piston-1-0-1-remote-repository-copying/66400/4 "2006-08-26T11:28:16Z")

</div>

How embarrassing–normally I am capable of using email. Please  
disregard.

---

<div class="post-metadata">

**Author:** ![fbeausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Post date:** [August 26, 2006, 1:40pm UTC](https://www.ruby-forum.com/t/piston-1-0-1-remote-repository-copying/66400/5 "2006-08-26T13:40:30Z")

</div>

On 8/24/06, Francois B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> [http://piston.rubyforge.org/](http://piston.rubyforge.org/)
> 
> From the README:
> 
> Piston is a utility that enables merge tracking of remote  
> repositories. This is similar to svn:externals, 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.

Nice work Francois! After reading the website a question I still had  
was  
how does Piston manage my local modifications? Is there anyway to  
version-control those changes, or do we need to stick with SVK for that?

Josh

---

<div class="post-metadata">

**Author:** ![fbeausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Post date:** [September 4, 2006, 2:46pm UTC](https://www.ruby-forum.com/t/piston-1-0-1-remote-repository-copying/66400/6 "2006-09-04T14:46:13Z")

</div>

Hello Josh,

2006/8/25, Josh K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> On 8/24/06, Francois B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Piston is a utility that enables merge tracking of remote  
> > repositories. This is similar to svn:externals, 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.
> 
> Nice work Francois! After reading the website a question I still had was  
> how does Piston manage my local modifications? Is there anyway to  
> version-control those changes, or do we need to stick with SVK for that?

Piston copies the contents of the remote repository to your local  
working copy. It then svn adds it. So, you really have the files  
locally, ready to be changed / updated.

When you update again, Piston copies the changes from the remote  
repository, and as an additional step, merges any local changes that  
have occured between the last update and this one.

In this case, examples probably speak a lot louder than words.

I’ll write something up and put it on the web.

Thanks for the comments.

Bye !

---

<div class="post-metadata">

**Author:** ![fbeausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Post date:** [September 4, 2006, 2:46pm UTC](https://www.ruby-forum.com/t/piston-1-0-1-remote-repository-copying/66400/7 "2006-09-04T14:46:30Z")

</div>

Hello Jeremy,

2006/8/25, Jeremy K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> svn export url here  
> svn add here  
> svn propset merge-point 1234 here  
> svn propget merge-point here  
> svn diff -r1234 url | patch -p0  
> svn propset merge-point 4567

In short, yes, that’s what Piston does. It tracks a bit more than  
that, but this is it.

> In this case, examples probably speak a lot louder than words.

You are right, that’s what I should have done.

> svk makes vendor branches very easy, too (and a lot more.)

Again, you are right. But svk is slightly foreign in the way it  
works. I don’t want to start a flame fest. I tried svk myself. I  
haven’t spent ages on it. In the docs for Piston, I do mention SVK,  
even put the URL. Piston is an alternative to SVK.

Have a nice day !

---

<div class="post-metadata">

**Author:** ![fbeausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Post date:** [September 4, 2006, 2:46pm UTC](https://www.ruby-forum.com/t/piston-1-0-1-remote-repository-copying/66400/8 "2006-09-04T14:46:27Z")

</div>

On 8/25/06, Francois B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Nice work Francois! After reading the website a question I still had  
> > was  
> > how does Piston manage my local modifications? Is there anyway to  
> > version-control those changes, or do we need to stick with SVK for that?

Guessing here, but:

Piston copies the contents of the remote repository to your local

> working copy. It then svn adds it. So, you really have the files  
> locally, ready to be changed / updated.

svn export url here  
svn add here  
svn propset merge-point 1234 here

When you update again, Piston copies the changes from the remote

> repository, and as an additional step, merges any local changes that  
> have occured between the last update and this one.

svn propget merge-point here  
svn diff -r1234 url | patch -p0  
svn propset merge-point 4567

In this case, examples probably speak a lot louder than words.

> I’ll write something up and put it on the web.

svk makes vendor branches very easy, too (and a lot more.)  
jeremy
