[darcs-users] Per-directory version control

Kenneth Knowles kknowles at uclink.berkeley.edu
Wed Mar 3 16:20:26 UTC 2004

On Wed, Mar 03, 2004 at 10:53:48AM -0500, Sean E. Russell wrote:
> Hi Kenneth,
> On Tuesday 02 March 2004 21:02, Kenneth Knowles wrote:
> > If you are using the 'push' model, then it seems like it would be very easy
> > to make a wrapper script that just pushed to both places:
> So, you're suggesting a sort of "svn switch" methodology to do this?

Sort of, but since in darcs every working directory is a "branch" its much
simpler, conceptually.
> Therefore, I'd have three repositories; foo-project, bar-language, and foo.  
> The problem I see with this is that if someone checks out foo-project, they 
> won't get the source code unless they, too, do a seperate darcs pull.
> I'm vaguely uneasy about disassociating the sourcecode from the rest of the 
> project.

Ah yes, so it would be useful to have a way to tell darcs to recursively apply
itself to a directory (during a get or pull), but still omit that directory from
consideration when creating patches.  I don't see any way around the second bit,
because foo will need its own patch history independent of other projects.  Does
this seem like what you want (I've never had this situation for myself):

Assuming foo is already part of your foo-project:
$ cd /path/to/foo-project
$ darcs remove foo
$ cd foo
$ darcs inittree
$ darcs subproject foo

$ cd /someone/elses/path/to/foo-project
$ darcs pull
[pulls all of foo-project]
Would you like to pull subproject foo?  y
[executes a new darcs pull on foo.  foo can have its own default pull location,
or if a repo was given on the command line it could be used]

$ cd /path/to/bar-language
$ darcs record
[records all bar-language patches]
Would you like to record changes to subproject foo as well? y
[totally new dialog that generates a patch for foo]

$ cd ~/srcdir
$ darcs get http://path/to/foo-project
[gets foo-project and foo-project/foo]

Every scenario I can think of makes it a user interface issue; the patches never
have to interact.  Locally, you obviously don't want to have to pull your
changes to foo twice, but I think you can solve this by just symlinking between
your two projects.


More information about the darcs-users mailing list