[darcs-users] darcs patch: Rename --ignore-unrelated-repos to --all... (and 1 more)

Dmitry Kurochkin dmitry.kurochkin at gmail.com
Mon Sep 22 16:44:15 UTC 2008


On Mon, Sep 22, 2008 at 8:35 PM, David Roundy <droundy at darcs.net> wrote:
> On Mon, Sep 22, 2008 at 05:17:28AM -0700, Dmitry Kurochkin wrote:
>> Hi.
>>
>> I was not able to 'darcs replace' --ignore-unrelated-repos with
>> --allow-unrelated-repos in tests/issue1039.sh. I tried:
>>
>> darcs replace ignore-unrelated-repos allow-unrelated-repos tests/issue1039.sh
>>
>> But it changes nothing. How can tokens starting with '-' be replaced?
>
> Hmmm.  For one thing, you'd have to specify the token characters
> manually.  You'd have to do something like
>
> darcs replace --token-chars '[a-z\-]' -- --hello-world --goodbye-world foo
>
> The '--' tells getopt that the remaining arguments are not flags.
> It's an option that's accepted by various commands (e.g. diff):
>
> $echo hello > foo
> $echo goodbye > --bar
> $diff foo --bar
> diff: unrecognized option `--bar'
> diff: Try `diff --help' for more information.
> $ diff -- foo --bar
> 1c1
> < hello
> ---
>> goodbye

Thanks! I did not know about '--', very nice feature. BTW you do not
need to specify --token-chars, as doc says:

if one of your tokens contains a `-' or `.', you will then (by
default) get the ``filename'' regexp, which is [A-Za-z_0-9\-\.].

Regards,
  Dmitry


More information about the darcs-users mailing list