On Mon, Nov 10, 2008 at 04:18:39AM -0800, Jason Dagit <[EMAIL PROTECTED]> wrote: > If I understand your script correctly it constructs the patch bundle > itself from the patches in the repository. If you don't send the > patch that is on the top, eg., darcs changes --last=1, then I think > maybe you are taking a serious risk of corrupting your repositories.
Actually I'm taking the patch ids from the output of darcs changes
--xml, so probably the result will be fine.
> It seems like the safer approach is to use darcs send and specify
> exactly which patch you want to send.
>
> Something like, darcs send --matches='hash 12345' -o mybundle.dpatch
>
> Now, sometimes that will want to send more than one patch, and I'm not
> sure how you'll want to handle that in your script.
darcs send has --no-deps :)
>
> > Yes, I know that I could just use darcs send and select the patch
> > interactively, but my question is about how to do this from a script.
>
> You can also do it non-interactively. If you need examples we could
> discuss how on the list or you could look in the tests subdirectory of
> the darcs source to see examples that automate send from bash scripts.
> I can't tell for sure if your script is safe or not, but it seems
> like an avoidable risk :)
Actually here is what I get:
$ darcs show repo
Type: darcs
Format: hashed, darcs-2
Root: /home/vmiklos/darcs/t/test2
Pristine: HashedPristine
Cache: thisrepo:/home/vmiklos/darcs/t/test2
Default Remote: /home/vmiklos/darcs/t/test2.darcs
Num Patches: 12
So I have 12 patches in this repo.
$ dr send -o - --matches="hash
20081028223344-3b154-a4c92e0d199bfd3015a59efd5bb1b7700caec0f1.gz"
--no-deps ../test2.darcs
Creating patch to "/home/vmiklos/darcs/t/test2.darcs"...
You don't want to send any patches, and that's fine with me!
OK, so let's check if we have such an ID:
$ darcs changes --xml |grep -c
20081028223344-3b154-a4c92e0d199bfd3015a59efd5bb1b7700caec0f1.gz
1
Hmm, let's see if it's already pushed:
$ cd ../test2.darcs
$ darcs show repo
Type: darcs
Format: hashed, darcs-2
Root: /home/vmiklos/darcs/t/test2.darcs
Pristine: HashedPristine
Cache:
thisrepo:/home/vmiklos/darcs/t/test2.darcs
Num Patches: 0
So it seems --no-deps is not about "don't automatically fulfill
dependencies" (according to the doc), but about "if you select foo and
it depends on bar, then don't include foo, either". Is this on purpose,
or should I report it as a bug?
Thanks.
pgpXKz4YrTMjd.pgp
Description: PGP signature
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
