I previously requested a feature for darcs. I always pull from an http repo, and push over SSH. I have to push using --no-set-default and typing the ssh repo in full, which I automate with a .bat file in each repo.
Today I noticed that darcs has _darcs/prefs/repos, which seems to list the repo's that darcs has used. In one of my typical repo files, I have an http entry and an SSH entry. To get darcs to behave the way I want, all I need to do is push using the first non-http repo in that list.
I have implemented my version of the darcs push command inside my paper tool, the code is all online here. Now I can delete all my push.bat scripts, and just type paper push from any darcs repo. As an added bonus, I now don't need to change to the root directory to perform a push.
It would be really nice if someone could incorporate this feature into the main darcs codebase. However, I'm quite happy using my paper tool for now. I certainly don't have time to patch, or even build darcs :-)
Feature request duly filed: http://bugs.darcs.net/issue792
ReplyDeleteYou might find it useful to set default flags to commands, either for all reposes or specific ones;
ReplyDeletehttp://darcs.net/manual/node5.html#SECTION00510010000000000000
Saying
push no-set-default
in your 'defaults' file should at least save you the trouble of specifying that each time.
Maybe it's even possible to set the remote repository path for each repo?
Now implemented in the darcs darcs (I love saying that) repository
ReplyDeleteYou'll want to put
pull remote-repo URL
in your _darcs/prefs/defaults
kowey: That's great, many thanks!
ReplyDelete