Re: how to make envb checkout more...idempotent?

15 views
Skip to first unread message

Jason Baker

unread,
Mar 4, 2010, 10:54:10 AM3/4/10
to Brad Allen, envbu...@googlegroups.com
On Wed, Mar 3, 2010 at 6:21 PM, Brad Allen <bal...@zeomega.com> wrote:
When using SVN, the checkout command acts as an update. That does not seem to hold true with hg clone. Any ideas about a workaround?

ballen@ubu0904:~/ZeOmega/git/trunkle$ envb checkout
--> hg clone http://bitbucket.org/mirror/sqlalchemy sqlalchemy
real URL is http://bitbucket.org/mirror/sqlalchemy/
abort: destination 'sqlalchemy' already exists
--> "hg clone http://bitbucket.org/mirror/sqlalchemy sqlalchemy" returned code 255
--> ABORTED

For the record, I think you mean to say "less idempotent".  According to wikipedia:  "Idempotence describes the property of operations in mathematics and computer science that means that multiple applications of the operation do not change the result."

Git clone and hg clone are both idempotent because you can apply them as many times as you want and still have the same thing.  With SVN, that may not be true.

Semantics aside, this is an issue that I have put some thought into.  Although there doesn't exist a complete solution currently, there are a few features to make this less of a problem. 

First of all, there's a separate update command.  This way, you only have to do checkout once and then just do updates the rest of the time.

Secondly, you can specify which parcels to operate on using the -p flag.  This way if you have already checked out parcel1 and now want to check out parcel2, you can just use this command:  "envb checkout -p parcel2".

Aside from that, I have yet to think of a better way to do this.  I'm open to suggestions though.
Reply all
Reply to author
Forward
0 new messages