Eric Kow | 27 Dec 23:05 2011
Picon

informal poll: do you script interactive darcs?

Hi all,

We have some changes we'd like to experiment with in the interactive UI (see in particular issue1920). 
Unfortunately, the changes may break programs that script darcs by trying to talk to the interactive UI
(feeding it y/n answers).

Could I just do a quick little poll to see who's out there?  Does anybody script darcs in such a manner, even if
informally with echo yyyynyyd | darcs foo? (Our test scripts do that)

What do you use it for?

--

-- 
Eric Kow <http://erickow.com>

_______________________________________________
darcs-users mailing list
darcs-users <at> darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users
David Leuschner | 28 Dec 11:38 2011

Re: informal poll: do you script interactive darcs?

Hi Eric,

we feed darcs input from scripts.  For example on our integration
server we pull the next patch from an incoming repository and unpull
patches that have been amended in the incoming repository.  This is
all quick and dirty code that tends to break sometimes (not because of
darcs interaction but because of other assumptions that only hold in
95% of the cases and the 5% are too hard to automate).  For real
software, like the "darcs patch manager" we compile against darcs. (We
use DPM in combination with Rietveld to do our reviews and track what
needs to be done for which submitted patch.)

We'd love user interface improvements and wouldn't mind updating our
dirty scripts.  Scripting interactive programs is always tricky and we
are prepared that it will break sooner or later.  Most of the times
the fix will be easy.

It's more important that patch files are upwards and downwards
compatible.  At some time I built the following darcs version "2.7.3
(+ 300 patches)" but I can't use it to send patches to our "darcs
patch checker" service (which just applies the patch to a copy of the
current head repository and runs darcs check --test).  Our "DPC" runs
darcs 2.3 from Ubuntu and tries to "darcs apply" the patch bundle but
fails with this message:

1 patch for repository darcs.umidev.de:repos/all/DociData:

Tue Dec 20 10:08:24 CET 2011  wehr <at> factisresearch.com
  * TMP: use snapshot of roundtrip-scala

(Continue reading)

Gabriel Kerneis | 28 Dec 12:04 2011
Picon

Re: informal poll: do you script interactive darcs?

Dear David,

On Wed, Dec 28, 2011 at 11:38:16AM +0100, David Leuschner wrote:
> It's more important that patch files are upwards and downwards
> compatible.  At some time I built the following darcs version "2.7.3
> (+ 300 patches)" but I can't use it to send patches to our "darcs
> patch checker" service (which just applies the patch to a copy of the
> current head repository and runs darcs check --test).  Our "DPC" runs
> darcs 2.3 from Ubuntu and tries to "darcs apply" the patch bundle but
> fails with this message:
> 
> 1 patch for repository darcs.umidev.de:repos/all/DociData:
> 
> Tue Dec 20 10:08:24 CET 2011  wehr <at> factisresearch.com
>   * TMP: use snapshot of roundtrip-scala
> 
> darcs failed:  Bad patch bundle!
> 
> If I send the patch using darcs 2.5.2 it works.  I'm aware that I used
> a development build so I didn't report this as a bug.

This has probably been introduced by my "patch summary" patches and is indeed
very unfortunate.  Would you mind compiling the latest development version and
report the bug if it is still there (the formatting has changed twice, so it
might have been solved since)?

Best regards,
--

-- 
Gabriel Kerneis
(Continue reading)

David Leuschner | 29 Dec 15:49 2011

Re: informal poll: do you script interactive darcs?

Hi Gabriel,

> On Wed, Dec 28, 2011 at 11:38:16AM +0100, David Leuschner wrote:
>> It's more important that patch files are upwards and downwards
>> compatible.  At some time I built the following darcs version "2.7.3
>> (+ 300 patches)" but I can't use it to send patches to our "darcs
>> patch checker" service (which just applies the patch to a copy of the
>> current head repository and runs darcs check --test).  Our "DPC" runs
>> darcs 2.3 from Ubuntu and tries to "darcs apply" the patch bundle but
>> fails with this message:
>>
>> 1 patch for repository darcs.umidev.de:repos/all/DociData:
>>
>> Tue Dec 20 10:08:24 CET 2011  wehr <at> factisresearch.com
>>   * TMP: use snapshot of roundtrip-scala
>>
>> darcs failed:  Bad patch bundle!
>>
>> If I send the patch using darcs 2.5.2 it works.  I'm aware that I used
>> a development build so I didn't report this as a bug.
>
> This has probably been introduced by my "patch summary" patches and is indeed
> very unfortunate.  Would you mind compiling the latest development version and
> report the bug if it is still there (the formatting has changed twice, so it
> might have been solved since)?

Good news, thanks!  I'll do a build and will let you know if it doesn't work.

Cheers,

(Continue reading)

Mark Stosberg | 28 Dec 15:31 2011
Picon

Re: informal poll: do you script interactive darcs?


We do some darcs automation, but never feed it "yes" or "no" answers.

   Mark
Eric Kow | 29 Dec 11:46 2011
Picon

Re: informal poll: do you script interactive darcs?

On 27 Dec 2011, at 22:05, Eric Kow wrote:
> We have some changes we'd like to experiment with in the interactive UI (see in particular issue1920). 
Unfortunately, the changes may break programs that script darcs by trying to talk to the interactive UI
(feeding it y/n answers).

Thanks to everybody for their responses!  As I understand it, people who have responded are either happy to
amend their scripts as needed, or are scripting the darcs the "right" way (using the library).

This sort of freedom to experiment is one of the advantages of being a small program.  There may be some
instability as we work out what really we want the UI to do, but the changes should be fairly minor.  Mostly
adding, removing, juggling confirmation prompts.  The sorts of decisions involved are “do we want a
final last regrets prompt” (so that you can revisit the very last patch/change), “what accept key do
we tie it to” ('y' or 'd'); “can we remove the unrevert impossible prompt” etc.  UI tuning.

--

-- 
Eric Kow <http://erickow.com>

_______________________________________________
darcs-users mailing list
darcs-users <at> darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users
Dave Love | 2 Jan 21:58 2012
Picon

Re: informal poll: do you script interactive darcs?

Eric Kow <kowey <at> darcs.net> writes:

> Could I just do a quick little poll to see who's out there?  Does
> anybody script darcs in such a manner, even if informally with echo
> yyyynyyd | darcs foo? (Our test scripts do that)
>
> What do you use it for?

The Emacs integrations (vc-darcs, darcsum, dvc(?)) will probably be
affected.  This is the sort of reason I wanted vc-darcs in the darcs
repo :-(.
Ganesh Sittampalam | 2 Jan 22:20 2012
Picon

Re: informal poll: do you script interactive darcs?

On 02/01/2012 20:58, Dave Love wrote:
> Eric Kow <kowey <at> darcs.net> writes:
> 
>> Could I just do a quick little poll to see who's out there?  Does
>> anybody script darcs in such a manner, even if informally with echo
>> yyyynyyd | darcs foo? (Our test scripts do that)
>>
>> What do you use it for?
> 
> The Emacs integrations (vc-darcs, darcsum, dvc(?)) will probably be
> affected.  This is the sort of reason I wanted vc-darcs in the darcs
> repo :-(.

Can you remind me why it's not? The obvious issues that spring to mind
are the maintenance burden and also managing copyright assignment to FSF.

From the point of view of the maintenance burden, I wouldn't be opposed
to adding it if it could come with a set of shell tests that would make
it easy to see when something it relied on was broken/changed.

Cheers,

Ganesh
Dave Love | 3 Jan 15:58 2012
Picon

Re: informal poll: do you script interactive darcs?

Ganesh Sittampalam <ganesh <at> earth.li> writes:

>> The Emacs integrations (vc-darcs, darcsum, dvc(?)) will probably be
>> affected.  This is the sort of reason I wanted vc-darcs in the darcs
>> repo :-(.
>
> Can you remind me why it's not? The obvious issues that spring to mind
> are the maintenance burden and also managing copyright assignment to FSF.

See the comment in <http://bugs.darcs.net/msg9586>.  I don't understand
why it needs an assignment for darcs, but the main reason for writing it
was the assignment.  It's maintained for the versions I use, but I
confess I can't keep up with the rate at which Emacs breaks things these
days, and it really needs some changes in Emacs (or did when I last
checked).

> From the point of view of the maintenance burden, I wouldn't be opposed
> to adding it if it could come with a set of shell tests that would make
> it easy to see when something it relied on was broken/changed.

I don't know how difficult that would be for vc-darcs off-hand.  It
probably would be more difficult for darcsum (which, unfortunately,
needs to know about essentially all of darcs' output).  I don't know how
I'd go abut writing tests for commands which produce asynchronous output
to a buffer; I suspect that's a fair amount of work.

I should have said that any change like this needs to be easy to test
for, so that things like vc-darcs can adjust as necessary to support
different versions.  If it can be done reliably by the darcs version
number, that should be OK.
(Continue reading)

Eric Kow | 3 Jan 20:10 2012
Picon

Re: informal poll: do you script interactive darcs?


On 3 Jan 2012, at 14:58, Dave Love wrote:
> See the comment in <http://bugs.darcs.net/msg9586>.  I don't understand
> why it needs an assignment for darcs, but the main reason for writing it
> was the assignment.  It's maintained for the versions I use, but I
> confess I can't keep up with the rate at which Emacs breaks things these
> days, and it really needs some changes in Emacs (or did when I last
> checked).

Note that since Jason's last message, we had a discussion (on darcs-users, presumably) what to do about
contribs.  We've since written it down

http://wiki.darcs.net/Development/Policy#contribs

Note also that for the particular change at hand, there may still be the option of only adding this prompt
only if writing to the terminal.  It could be worthwhile thinking about how to bring some stability into the
picture overall, though.

--

-- 
Eric Kow <http://erickow.com>

_______________________________________________
darcs-users mailing list
darcs-users <at> darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users
Simon Michael | 10 Jan 16:47 2012

darcsum fix

On 1/3/12 6:58 AM, Dave Love wrote:
> I don't know how difficult that would be for vc-darcs off-hand.  It
> probably would be more difficult for darcsum (which, unfortunately,
> needs to know about essentially all of darcs' output).

Ah.. yes, as Dave says. This is indeed unfortunate.

For the record, I've just pushed a fix to http://joyful.com:/repos/darcsum which fixes a darcsum record
hang with 
current darcs.
Lele Gaifax | 10 Jan 17:27 2012
Picon

Re: darcsum fix

Hi Simon,

since it's been a while since my last darcsum update, I took the
opportunity...

    $ cd darcsum/
    $ darcs show repo
	      Type: darcs
	    Format: darcs-1.0
	      Root: /home/lele/wip/darcsum
	  Pristine: PlainPristine "_darcs/pristine"
	     Cache: thisrepo:/home/lele/wip/darcsum, cache:/home/lele/.darcs/cache
    Default Remote: http://joyful.com/repos/darcsum
       Num Patches: 236
    $ darcs pull
    Pulling from "http://joyful.com/repos/darcsum"...

    darcs failed:  Incompatibility with repository http://joyful.com/repos/darcsum:
    Cannot mix darcs-2 repositories with older formats
    $ darcs cha --last=3
    Tue Jan 18 02:07:44 CET 2011  Simon Michael <simon <at> joyful.com>
      * site updates

    Mon Jan 17 23:28:37 CET 2011  Simon Michael <simon <at> joyful.com>
      * updates notes file

    Mon Jan 17 23:19:25 CET 2011  Simon Michael <simon <at> joyful.com>
      * add a makefile and simple hakyll-based home page
    $ darcs wha -s
    No changes!
(Continue reading)

Simon Michael | 10 Jan 17:56 2012

Re: darcsum fix

Hi Lele,

On 1/10/12 8:27 AM, Lele Gaifax wrote:
>      darcs failed:  Incompatibility with repository http://joyful.com/repos/darcsum:
>      Cannot mix darcs-2 repositories with older formats
...
> Oh well, not a problem, my copy was not modified, it's easier to grab
> a new one

Yup, I upgraded the repo some time back.

>      $ darcs get http://joyful.com/repos/darcsum
...
>      darcs failed:  Couldn't fetch `0000000635-d69eb8f2a2329128b7c308964e9784e0b68bd92db925b21becf30e51a8d8510d'
>      in subdir patches from sources:

I don't get this error, and would suspect your cache indeed - I'd try it with --no-cache.

Maybe this problem arises when a repo with locally-cached patches gets upgraded ?

>      $ APPDATA=/tmp darcs get http://joyful.com/repos/darcsum
>      Copying patches, to get lazy repository hit ctrl-C...
>      Hash failure in /home/lele/.darcs/cache/patches/0000001420-8c6d7cc9069e4736243fb4c5904f08c930d65c9b4771b2b178c71c1af4ecd3fb
...
> Am I missing something, is the help outdated about $APPDATA, or does
> it expect a ".darcs" subdir under $APPDATA?

 From your testing, it sure looks like cache location ignores APPDATA currently.

Gmane