Hi Matt,

I pulled from your repo and ran the

yt bootstrap_dev

method.  Everything was going fine - it checked out yt-supplemental, looked at my .hgrc and added my BB username, etc - until it wanted to set up my pasteboard.  It seems like when it made the hgbb._bb_apicall, it used my system user name, which is different from my BB username:

I am now going to create the repository:
on BitBucket.org.  This will set up the domain
which will point to the current contents of the repo.

Press enter to go on, Ctrl-C to exit.
using system user 'cmalone' as usernamehttp authorization required
realm: None
user: cmalone

Obviously this failed; however, when I ran this a second time it picked up my correct BB username:

I am now going to create the repository:
on BitBucket.org.  This will set up the domain
which will point to the current contents of the repo.

Press enter to go on, Ctrl-C to exit.
http authorization required
realm: None
user: ChrisMalone
password: -------------------------------------------------------------------------------------------------------------------------------------------------

and then it worked fine.  I can now use the pasteboard facilities, which are pretty cool!

I think for the bootstrap utility to be a bit more user-friendly, you might want to add a bit more description about why the user cares about the various components that are about to be installed  For example, the user probably doesn't know that the yt-supplemental repo is where all the hgbb or pasteboard stuff is contained or why they should want a BB account if they don't have one already.  This might be too much information to have in the bootstrap script itself, so perhaps provide a link to a page where these things are mentioned.

Anyhow, aside from the above (minor) points, I really like the bootstrap utility.  You've gone out of your way to make sure nothing was done without the user's permission.



On Mon, Mar 21, 2011 at 12:34 AM, Matthew Turk <matthewturk@gmail.com> wrote:
Hi all,

Last week we had a conversation about a bootstrap script, where the
feel of the room was either lukewarm or positive.  Mostly people
seemed to think it was ill-motivated or would take too many liberties.
 Over the last week, in the evenings etc I've created a bootstrap
script for development, which overall I think is pretty
well-motivated.  The script accomplishes the following things, each of
which requests for confirmation before going on.  It uses a modified
iniparse library so that any modifications to any ini files are made
in a non-destructive manner.  It accomplishes these tasks:

1) Ensure username is set up in ~/.hgrc
2) Ensure that the cedit and hgbb are enabled
3) Asks for and if needed creates a username on BitBucket
4) Sets up hgbb
5) Creates a pasteboard repository

The diff is here:


You can pull from my repo:

hg pull https://bitbucket.org/MatthewTurk/yt/

(But note the comment below about yt-supplemental)

There are a couple things in this:

 * I wrote up something called a "pasteboard" this last week for more
permanent mini-pastes of info.  This uses mercurial to create/destroy
items in it.  You can see some examples here:


This was born out of the SFLC thing that happened on the mailing list,
when Sam emailed his script.  I thought, wouldn't it be nice if we
were older, and we had a pasteboard that was persistent, with
descriptions, which we could programmatically upload/download from.
This adds the new commands:

yt pasteboard --desc="Something" some_file.py
yt pastegrab PASTE_ID USERNAME

This automatically tosses it up.  You get embed codes and some
highlights, but it's just easier to keep these things around than the

 * The idea of enabling hgbb, cedit and ensuring a bitbucket user is
because I am of the opinion we should make it easier to fork the
repository to make changes.  If those three are enabled, I believe a
command-line forking, editing of sources and so on, are all within our

 * This bootstrap script requires that the yt-supplemental repo be
checked out in ${YT_DEST}/src/ .  This repo is actually kind of cool,
in that it is a subrepo setup, and it pulls in a couple external
libraries that we can maintain.  Right now it grabs the docs, the
cookbook, and the extensions mentioned above.  This repo is now pulled
in the current install_script.sh.

Anyway, I am submitting this to the list to get some review.  There
may be errors, but I have tested it quite a bit.  It also informs the
user of what it's about to do and requires the user hit enter.  At one
point it even asks for a yes or no.

The reason I am interested in this is that I think the idea of
bootstrapping people into a development environment is, generally, a
good idea.  Particularly because some things -- like the pasteboard,
like forking, like contributing changes -- should be made really easy
and have the potential for a very high payoff.  I hope I've motivated
things a bit better.

I was hoping that before I merged it I could get someone else to read
it over, maybe a couple people even to test it, and to get a good feel
for whether this is worthwhile or whether I should pull these changes
and just ignore the idea.  What do people think?


Yt-dev mailing list