1. Summarise the issue (what were doing, what went wrong?)
I created a local copy of a repo that I had cloned from my server, using
`darcs get REPO REPO_2`.
I then tried to push some patches, hoping to push to the remote server,
but darcs tried to push to the original local repo.
I then checked the prefs files:
$ for file in _darcs/prefs/{defaultrepo,repos,sources}; do echo "$file:
"; cat $file; echo ""; done
_darcs/prefs/defaultrepo:
/home/owen/code/foo_repo
_darcs/prefs/repos:
/home/owen/code/foo_repo
_darcs/prefs/sources:
repo:/home/owen/code/foo_repo
repo:user@my_server:foo_repo.darcs
It seems we have some duplication here, what are these files used for?
The manual doesn't even mention defaultrepo!
I then tried to delete the local entry from sources, (which was
therefore still in the defaultrepo file) - trying to push, darcs didn't
complain, and still tried to push to the defaultrepo location!
Then, I tried deleting the defaultrepo entry, and pushing... darcs then
fails with:
darcs failed: Missing argument: [REPOSITORY]
Usage: darcs push [OPTION]... [REPOSITORY]
I shouldn't have to edit these files manually; darcs should help me out!
2. What behaviour were you expecting instead?
For *my* usecase, I'd like darcs to
a) Keep the remote as the defaultrepo and repos, when cloning locally.
b) Notice if I delete an entry from repos that is in defaultrepo and
complain/warn me.
c) Give me a way of getting darcs to use a different entry in
sources/repos for pushing/sending
I suppose there might be some usecases for keeping the local repo in
these files, but I'd at least like a get flag (--use-remote-as-default
or something).
3. What darcs version are you using? (Try: darcs --exact-version)
Latest screened:
2.9.1 (+ 401 patches)
4. What operating system are you running?
Linux X86_64
|