[darcs-users] aliases for repositories

Jason Dagit dagit at codersbase.com
Sun Sep 6 19:12:43 UTC 2009


On Sun, Sep 6, 2009 at 7:37 AM, Olivier Schwander<oschwand at chadok.info> wrote:
> Hi,
>
> Is there a way to define aliases for repositories ? I find it difficult
> and error-prone to type the full repository path each time you want to
> push or pull. The shell completion using the content of _darcs/repos is
> not a perfect solution since it will be polluted by all the paths of
> the filesystem and by all the repositories you ever push-pulled.
>
> In a few word:
>
> darcs pull upstream
>
> instead of:
>
> darcs pull http://example.net/darcs/project/main_branch
>
> Moreover, I think it would be safer to use aliases because it is easier to
> read one word than a full url (I am used to push/pull to/from the wrong branch
> due to too much hitting TAB for completion).

darcs stores the most recent repository you interacted with in:
_darcs/prefs/sources

The default behavior for push/pull without a repository is to use what
is listed in the sources file.

So for example, if you did a darcs get of
http://example.net/darcs/project/main_branch, then later:
darcs pull
darcs push

Should both assume you mean
http://example.net/darcs/project/main_branch.  If you want to pull
from a different repo without updating the sources use the command
line parameter:
--no-set-default

Does this cover your usage?

Jason


More information about the darcs-users mailing list