[darcs-users] some darcs comments from Johan Tibell
Trent W. Buck
twb at cybersource.com.au
Mon Jan 4 06:32:08 UTC 2010
Johan Tibell <johan.tibell at gmail.com> writes:
>> $ time ssh fs darcs get --lazy $PWD $PWD+issue1234
>> [...]
>> $ du -sh $PWD $PWD+issue1234
>> 52M /home/twb/Desktop/Darcs/darcs
>> 4.7M /home/twb/Desktop/Darcs/darcs+issue1234
>
> Is it best practice to create your topic branches inside the directory
> of the main branch as done in this case?
I think you've misread $PWD+issue1234 -- it creates a branch in the same
directory as HEAD ($PWD), not *within* HEAD, e.g. $PWD/issue1234.
In other words,
~/Desktop/Darcs/darcs -- is the HEAD
~/Desktop/Darcs/darcs+issue1234 -- is a branch
~/Desktop/Darcs -- isn't a repo at all
> Also it doesn't have quite the same effect. When checking out a new
> branch in Git using "git checkout -b" untracked/uncommited files are
> still present in the working directory of the new branch
Granted. I think you really want in-repo branching rather than just
*fast* branching that Darcs currently has. In-repo branches have been
discussed before -- I expect Eric can cite the threads and BTS bugs.
As a fugly hack (re the working tree), you could
cp -a $PWD $PWD+branch
darcs optimize --relink --sibling $PWD+branch # reclaim disk space
cd $PWD+branch
> This also means that already compiled files in dist/ (created by
> Cabal) can be more easily shared between branches.
Granted. I usually cheat with a --builddir that's shared between repos,
or by cheating with cp -a (as above). I keep meaning to get C caching
(distcc?) working, too.
>> - they're not using --lazy for branches;
>
> Aside: I want all my history locally so I don't use lazy.
Fair enough, when HEAD is remote. If HEAD is local, then a lazy branch
won't lose any disconnectedness. Even with hard linking, it's noticably
faster for me (darcs 2.0.2, 8000-ish patches):
$ time darcs get --complete $PWD $PWD+delete-me-complete
Copying patches, to get lazy repository hit ctrl-C...
Finished getting.
real 0m27.379s
user 0m8.053s
sys 0m9.451s
$ time darcs get --lazy $PWD $PWD+delete-me-lazy
Finished getting.
real 0m1.171s
user 0m0.684s
sys 0m0.271s
>> - they're using HUGE repositories.
>
> Why assume when you can ask?
Sorry; "branching is slow" is a regular complaint we get on darcs-users,
so I was speaking generally rather than about you specifically.
>> I think this is just git setting $LESS to FSR (unless it's already set
>> to something else). The help text "disappears" because your terminal
>> emulator has been configured that way. Try ^A:altscreen off in GNU
>> Screen -- I dunno about other terminals. LESS=F should help if you use
>> less.
>
> I don't want to change the default behavior of less for all uses. Can
> I have it do this just for darcs?
Only in an ugly way: DARCS_PAGER=darcs-less, where darcs-less is just a
script in your path of the form
#!/bin/sh
less -F "$@"
More information about the darcs-users
mailing list