[darcs-users] darcs middleweight branching (aka in-repo branches)
michael at ndrix.org
Fri Mar 30 21:40:28 UTC 2012
Spontaneous branches are one of my favorite Darcs features: flyweight
branching, if you will. Of course, Darcs also supports heavyweight
branching by creating a new repository with "darcs get". I've often wanted
middleweight branching or "cheap in-repo local branches" (as issue555 calls
them). This has been a request since 2007.
I've hacked together a quick and dirty prototype to get a feel for the UX.
I'll attach the script to issue555 shortly for anyone that wants to try at
home. Here's a walkthrough of how it behaves. The goal of the walkthrough
is to make a local repository with branches for Darcs' reviewed and
screened repos and a third branch for my personal patches.
$ darcs get --lazy http://darcs.net/reviewed darcs
$ cd darcs
$ darcs-branch # w/o arguments, lists current branches
$ darcs-branch reviewed # declares that I want to be on a branch named
reviewed. creates one if needed
$ darcs-branch delete-me # junk branch for later
$ darcs-branch screened
$ darcs pull -a http://darcs.net/screened # pull screened patches into my
$ darcs-branch master
$ darcs pull -a http://darcs.net/screened # I want screened patches in my
personal branch too
$ echo my change nobody else wants > foo
$ darcs record -alm 'sample change'
Finished recording patch 'sample change'
$ darcs changes -p 'sample change'
Fri Mar 30 15:28:18 MDT 2012 Michael Hendricks <michael at ndrix.org>
* sample change
$ darcs-branch reviewed # switches to the branch I created earlier
$ darcs changes -p 'sample change' # finds no patch. it's not in this
$ darcs-branch --remove delete-me
It could use lots of polish, but how do others feel about the declarative
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the darcs-users