[darcs-users] updating the wiki with a darcs push?

2013-06-20 Thread Ivan Zakharyaschev
Hello!

I've got the wiki source with "darcs get --lazy
http://darcs.net/darcs-wiki"; as advertised on the site, recorded an
edit locally (which adds a tip), and now I'd like to push it in order
to publish my changes.

Can I do this?

I know that in the world of Git, there are sites which would allow
"anonymous" pushes in similar situations. For example, IIRC, the
projects at http://repo.or.cz and http://gitorious.org have such an
option, and also the http://ikiwiki.info site has such a thing --
http://ikiwiki.info/news/git_push_to_this_wiki/ ,
http://ikiwiki.info/tips/untrusted_git_push/ . (There also has been a
talk about implementing this feature for another backend of ikiwiki --
monotone.)

What about darcs.net's wiki?

Best wishes,
-- 
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


[darcs-users] contributing to the darcs manual

2013-06-20 Thread Ivan Zakharyaschev
Hello!

http://darcs.net/Development/GettingStarted#adding-documentation says:
"Contribute to the darcs manual"

I wanted to write down a short note into the manual, but I can't find
the source for the manual.

Neither http://darcs.net/screened nor http://darcs.net/reviewed
include the sources for the manual.

Should I get http://darcs.net/releases/branch-2.8 , look for the
manual sources there, and try to push my tiny change to it (assuming
that the patch will be added to the patch tracker then, and ultimately
reviewed and perhaps included into the mainline darcs sources)?

Anyway, it seems there needs to be some clarification in the wiki for
how to "contribute to the darcs manual".

Best wishes,
-- 
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] contributing to the darcs manual

2013-06-21 Thread Ivan Zakharyaschev
Hello!

2013/6/21, Eric Kow :
> I notice you'd been improving our document infrastructure lately?
> The wiki says the manual is now part of source comments, but can't
> seem to find matching strings?

I see, so the manual is supposed to be part of the main darcs source code.

Actually, I wanted to make a note on calling Emacs directly as the
merge tool (with ugly shell programming to construct the Elisp
expression). I'm attaching it.

But this piece of manual (mentioning Emacs) seems not to be present in
the current darcs source in any form.

I've also prepared a longer hint/tip about this for darcs-wiki, but I
did this in the cloned repo of the wiki. That's why I asked about
untrusted pushes to the wiki, which could be a convenient feature.

Of course, I'll post it through the web interface if pushing is
impossible. (I do not want to clutter things by attaching that one to
the message, too.)

Best wishes,
-- 
Ivan


note-on-invoking-emacs-directly-for-merge-_without-ugly-shell-programming_.dpatch
Description: Binary data
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] contributing to the darcs manual

2013-06-21 Thread Ivan Zakharyaschev
2013/6/21, Ivan Zakharyaschev :

> I see, so the manual is supposed to be part of the main darcs source code.

Oh, as I could see now (since I haven't been into darcs development, I
couldn't know this before), the bits of the manual I wanted to modify
used to come from the darcs code before, too.

This note about external merge tools used to be in Resolution.lhs --
http://hackage.haskell.org/packages/archive/darcs/2.5.2/doc/html/src/Darcs-Resolution.html
.

Where should it belong now to? To Resolution.hs? Or simply it shoud be
added and left in the wiki, because the manual in the future releases
probably will lack these notes on external merge tools?

> Actually, I wanted to make a note on calling Emacs directly as the
> merge tool (with ugly shell programming to construct the Elisp
> expression). I'm attaching it.
>
> But this piece of manual (mentioning Emacs) seems not to be present in
> the current darcs source in any form.
>
> I've also prepared a longer hint/tip about this for darcs-wiki, but I
> did this in the cloned repo of the wiki. That's why I asked about
> untrusted pushes to the wiki, which could be a convenient feature.

Best wishes,
-- 
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] updating the wiki with a darcs push?

2013-06-21 Thread Ivan Zakharyaschev
Hi,

2013/6/21, Ganesh Sittampalam :

> In darcs, an anonymous push is a "send" - i.e. use "darcs send", which
> because of the configuration of the wiki repo, should default to sending
> the change to patc...@darcs.net where someone can check and apply them.
>
> The extra security over just being able to edit the wiki directly online
> is because there are more things you can do with direct repo access.

I see. Thanks for the explanation!

After reading the manual some time ago, I had the impression that
"darcs push" will somehow fallback to "darcs send" in such cases.
That's not true, is it? I have to use explicitly the "send" command,
haven't I?

> This does rely on having a working email setup locally, which is
> becoming a bit less common with the move to gmail etc. We're looking at
> adding general support for submitting patches over http instead, but
> it's not all there yet.

As for me, I feel that it's my problem to figure out how to send the
patches. So, I've received the answer that there is a way to submit
changes to the wiki from the local clone.

> If you don't have a working local email setup, the workaround is to use
> darcs send -o filename.dpatch and then manually send the file to
> patc...@darcs.net.

Should it be in the message body or an attachment?

I have run "darcs send --dry-run" in my local clone of darcs-wiki to
figure out which address the patches must be sent to, and actually the
address is darcs-users@darcs.net (not the one you quoted):

[imz@localhost darcs-wiki]$ darcs send --dry-run
Creating patch to "http://darcs.net/darcs-wiki";...
Patch bundle would be sent to: darcs-users@darcs.net
Would send the following changes:
Wed Jun 19 01:51:50 MSK 2013  Ivan Zakharyaschev 
  * tip: Invoking Emacs functions as external merge/diff tools.

  Preparing the args for an Emacs function in a shell script (as it is
done in the manual) is ugly. Here I show how do it with Elisp code.

Making no changes:  this is a dry run.
[imz@localhost darcs-wiki]$ fgrep darcs-users -r _darcs/
[imz@localhost darcs-wiki]$

(Probably, it gets this information from the web, because grepping the
local _darcs/ hasn't revealed that it is stored locally.)

Ok, I was worried that choosing this path for submitting changes to
the wiki would require additional attention of a reviewer, which means
more unnecessary human work, because the changes done through the web
interface are anyway accepted automatically.

Are the patches for darcs-wiki sent to darcs-users@ processed
automatically somehow?

Best wishes,
-- 
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


[darcs-users] currently preferred way to import history from Git

2015-01-21 Thread Ivan Zakharyaschev
Hello!

I've started to explore the available ways to import history from Git,
and have come to some uncertainty.

First, I used Google, and it gave me
. Then, looking at [the history of
the page](http://darcs.net/_history/DarcsBridgeUsage), I realized that
there was some uncertainty with which source repo to announce there.

So, to explore all related wiki modifications, I did:

$ darcs get http://darcs.net/darcs-wiki
$ cd darcs-wiki/
$ find . -iname '*bridge*'
./Bridge.page
./DarcsBridgeUsage.page
./GSoC/2011-Bridge.page
$

And a surprise: there is also http://darcs.net/Bridge , which seems to
be more fresh:

$ darcs log -- Bridge.page | head
Changes to Bridge.page:

Wed Jan 21 02:06:25 MSK 2015  bfrk <>
  * fixed the command sequence for incremental export

Thu Jun 12 23:21:50 MSK 2014  Guillaume Hoffmann 
  * clean and update darcs-vs-others pages

Fri Aug 16 17:50:25 MSK 2013  owst 
  * Update bridge page to recommend darcs-bridge
$ darcs log -- DarcsBridgeUsage.page | head
Changes to DarcsBridgeUsage.page:

Fri Aug 16 17:52:22 MSK 2013  owst 
  * Re-add darcs-bridge repo url, now that it should support simple
one-way conversions

Thu Apr 11 19:08:03 MSK 2013  Owen Stephens 
  * Various updates to Bridge information on the wiki

Mon Apr  8 01:16:43 MSK 2013  owst 
  * It's not true that darcs-bridge is contained in mornfalls
darcs-fastconvert repository...
$

Which tool should I prefer? Are they substantially different? Does
`darcs convert` work better than `darcs-fastconvert` from
darcs-bridge? Are there any news in this area?

These things seem not to be clarified on the wiki. At least, a note in
 stating that it is obsolete (if
this is true) and linking to the more fresh page would help.

Also, if I'm using darcs-2.8.4 from my distro, and according to the
wiki, `darcs convert` is available in darcs-2.10 only, then should I
build a new darcs or try to build darcs-bridge?

Best regards,
-- 
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] currently preferred way to import history from Git

2015-01-22 Thread Ivan Zakharyaschev
Hi,

Thanks for all the replies!

2015-01-22 9:53 UTC+03:00, Ganesh Sittampalam :

> 'darcs convert' is currently supported.

So, I believe 'darcs convert --import' doesn't have the notion of Git
branches, does it? (At least, there are no examples of using 'darcs
convert --import' on the wiki at all, so I can only guess.)

Then, I believe, I should proceed as follows if I want to import Git
branches AB, A, B from repo "repo", such that AB has been merged into
A and into B:

mkdir repo_darcsimport
cd repo_darcsimport

1. import AB into a darcs directory ("AB"):

mkdir AB
cd AB
(cd ../../repo; git fast-export AB) | darcs convert import
cd ..

2. import the complement of AB w.r.t. A into "A"

darcs get AB A
cd A
(cd ../../repo; git fast-export AB..A) | darcs convert import
cd ..


2. import the complement of AB w.r.t. B into "B" (analoguosly)

Correct?

Actually, after I make the transition to darcs, I'm thinking about a
workflow with a reduced number of branches (no intersection branch
AB), so I won't need a working darcs directory for AB. Does it make
sense?

Say, A is a feature I'm working on, and B is some implementation aspect.

(In Git, I had to have the AB branch to avoid the hassle of
cherry-picking a new patch from either A and B, and making sure that
it is clear from the history that there is a single patch which is
relevant for both A and B.)

When I'm hacking the implementation aspect B, I plan to work in the
darcs working directory "B", then pull the patches relevant for A (by
interactively selecting them):

cd ../A
darcs pull ../B

(and a similar situation will arise whenever I am working on feature
A, and have touched--among other changes--the aspect B of the
implementation, then I will want to pull the relevant subset of new
changes into B).

(There is a complication in this picture although: not to review the
patches I have already decided on, I should have a dir for the last
reviewed state of B, and another one--the actual working dir for B,
and:

cd ../A
darcs pull ../B.working --complement ../B.reviewed
# if successful then
cd ../B.reviewed
darcs pull --all ../B.working

I could use tags for marking reviewed patches, but then I would need a
supply of numerous tags, and a flood of meaningless tags in the repo.)

Whenever I want to show a simplified version of the program (without
aspect B, but with feature A), I can create a temporary darcs working
dir with the intersection of A and of the complement to B:

mkdir A_essence
cd A_essence
darcs pull ../A --complement ../B

>> These things seem not to be clarified on the wiki. At least, a note in
>>  stating that it is obsolete (if
>> this is true) and linking to the more fresh page would help.
>
> Good point, I've updated it as you suggest.
>
>> Also, if I'm using darcs-2.8.4 from my distro, and according to the
>> wiki, `darcs convert` is available in darcs-2.10 only, then should I
>> build a new darcs or try to build darcs-bridge?
>
> I'd suggest building a new darcs and using 'darcs convert'.

-- 
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] currently preferred way to import history from Git

2015-01-22 Thread Ivan Zakharyaschev
2015-01-22 13:16 UTC+03:00, Ivan Zakharyaschev :

> Actually, after I make the transition to darcs, I'm thinking about a
> workflow with a reduced number of branches (no intersection branch
> AB), so I won't need a working darcs directory for AB. Does it make
> sense?
>
> Say, A is a feature I'm working on, and B is some implementation aspect.
>
> (In Git, I had to have the AB branch to avoid the hassle of
> cherry-picking a new patch from either A and B, and making sure that
> it is clear from the history that there is a single patch which is
> relevant for both A and B.)

I want to add a clarification about my annoyance with Git:

if I have a sequence of such A1, A2, ... branches, and B1, B2, B3, ...
with the idea that A1 is a subset of A2, and so on, and B1 is a subset
of B2, and so on, then it is quite tiresome to maintain the history
graph clean:

after I add a patch to the intersection of A1 and B1 (A1B1), I have to
rebase the set of changes A1B1..A1 onto the new state of A1B1, and
then A1..A2 onto the new state of A1, and so on (you get the idea).

What is annoying is that I can't postpone this procedure for later,
because a partially rebased history with many branches looks weird:
some heads are updated, but some are left attached to the old tree,
and you don't get the idea of each branch being a superset of some
other one. With darcs, it would at least seem not to be so weird
because you are not forced to think about the non-rebased branches as
long independent branches, but rather a set merely lacking just a few
new patches.

> When I'm hacking the implementation aspect B, I plan to work in the
> darcs working directory "B", then pull the patches relevant for A (by
> interactively selecting them):
>
> cd ../A
> darcs pull ../B
>
> (and a similar situation will arise whenever I am working on feature
> A, and have touched--among other changes--the aspect B of the
> implementation, then I will want to pull the relevant subset of new
> changes into B).
>
> (There is a complication in this picture although: not to review the
> patches I have already decided on, I should have a dir for the last
> reviewed state of B, and another one--the actual working dir for B,
> and:
>
> cd ../A
> darcs pull ../B.working --complement ../B.reviewed
> # if successful then
> cd ../B.reviewed
> darcs pull --all ../B.working

-- 
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] currently preferred way to import history from Git

2015-01-23 Thread Ivan Zakharyaschev
Hi,

Fri, 23 Jan 2015 17:16 +0100, Ben Franksen :
> Ivan Zakharyaschev wrote:
>> 2015-01-22 9:53 UTC+03:00, Ganesh Sittampalam :
>>
>>> 'darcs convert' is currently supported.
>>
>> So, I believe 'darcs convert --import' doesn't have the notion of Git
>> branches, does it? (At least, there are no examples of using 'darcs
>> convert --import' on the wiki at all, so I can only guess.)
>>
>> Then, I believe, I should proceed as follows if I want to import Git
>> branches AB, A, B from repo "repo", such that AB has been merged into
>> A and into B:
>>
>> mkdir repo_darcsimport
>> cd repo_darcsimport
>>
>> 1. import AB into a darcs directory ("AB"):
>>
>> mkdir AB
>> cd AB
>> (cd ../../repo; git fast-export AB) | darcs convert import
>> cd ..
>>
>> 2. import the complement of AB w.r.t. A into "A"
>>
>> darcs get AB A
>> cd A
>> (cd ../../repo; git fast-export AB..A) | darcs convert import
>> cd ..
>>
>>
>> 2. import the complement of AB w.r.t. B into "B" (analoguosly)
>>
>> Correct?
>
> Yes, that should work, assuming that AB indeed refers to the "splitting
> point" beyond which A and B differ.

Now, after I've been into exploring these things more closely, I can
tell that this is not quite possible yet with the current 'darcs
convert import'.

'darcs convert import' only creates repos from scratch. So 2. is
impossible; one can't feed extra history (in Git's notation: AB..A) to
an existing repo (A) which was initially made a clone of AB.

So I've tried another way.

I've done an experiment where I independently did an import of AB and
A into two darcs repos, hoping that the identical common source Git
commits would result in identical darcs patches, but that's not true.

cd A; darcs pull ../AB --dry-run

reports another instance of the common patch. They have different IDs.
(If someone is interested, I can post my complete shell session to
demonstrate this.)

I'm not quite sure whether this is expected and whether this could be
fixed easily. So I looked into the code, and couldn't find out why the
generated IDs should differ:

-- Darcs/Patch/Index/Types.hs:80:

makePatchID = PID . makePatchname

-- Darcs/Patch/Info.hs:282:

makePatchname :: PatchInfo -> SHA1
makePatchname pi = sha1PS sha1_me

-- and PatchInfo seems to contain only the info that must be identical
for identical Git commits:

data PatchInfo = PatchInfo { _piDate:: !B.ByteString
   , _piName:: !B.ByteString
   , _piAuthor  :: !B.ByteString
   , _piLog :: ![B.ByteString]
   , isInverted :: !Bool
   }

-- 

Perhaps someone here has ideas whether the current behavior giving
non-identical patches could and should be fixed.

Best regards,
-- 
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


[darcs-users] vc-darcs.el and the length of hashes (cons: Args out of range)

2015-12-14 Thread Ivan Zakharyaschev

Hello!

As a darcs user from time to time (and sympathizer), I have recently 
started to use vc-darcs.el in Emacs. (I know there are other darcs 
libraries for Emacs, but I'm interested in the Emacs VC interface, too, 
because I'm accustomed to using it in certain situations.)


I want to share some observations about a discovered bug in one of the 
implementations of vc-darcs (which I'm left with as the only one, because 
the other link is dead).


Perhaps, this will help make it better.

I'm not sure about where this inconsistency comes from. Perhaps, an older 
version of darcs had a different interface w.r.t. the ids of patches. 
Understanding this would make it clearer how to proceed with a possible 
fix (keep both variants or not, check versions,...). Do you have any 
suggestions?


Best regards,
Ivan

-- Forwarded message --
Date: Tue, 8 Dec 2015 13:18:54 +0300
From: Ivan Zakharyaschev 
To: jch@
Subject: vc-darcs: cons: Args out of range

Hello!

I've just installed your vc-darcs.el from your repo. (BTW, the second
implementation mentioned at http://darcs.net/RelatedSoftware/Emacs and
http://www.emacswiki.org/emacs/DaRcs --
http://www.loveshack.ukfsn.org/emacs/vc-darcs.el -- is not available
because the site doesn't open.)

When I call

C-x v l
in a file under darcs control, I get the error message:

cons: Args out of range: "6119dca7cd08261f99cecc2643451601ad6d", 0, 61

I'm using:

$ darcs --version
2.10.0 (release)

Best regarads,
--
Ivan



-- Forwarded message --
Date: Tue, 8 Dec 2015 13:20:41 +0300
From: Ivan Zakharyaschev 
To: jch@
Subject: Re: vc-darcs: cons: Args out of range

$ emacs --version
GNU Emacs 24.3.1
Copyright (C) 2013 Free Software Foundation, Inc.

-- Forwarded message --
Date: Wed, 9 Dec 2015 02:34:42 +0300
From: Ivan Zakharyaschev 
To: Juliusz Chroboczek 
Subject: Re: vc-darcs: cons: Args out of range

2015-12-08 18:20 UTC+03:00, Juliusz Chroboczek :

Could you please say

  M-: (setq debug-on-error t) RET

and send me a backtrace?


Sure. I'm attaching it.

-- Forwarded message --
Date: Wed, 9 Dec 2015 03:37:02 +0300
From: Ivan Zakharyaschev 
To: Juliusz Chroboczek 
Subject: Re: vc-darcs: cons: Args out of range

So,

the patch hash is SHA1 -- http://darcs.net/Internals/NamedPatch (via
http://darcs.net/Internals/Hashes ).

SHA1 is 40 hexadecimal digits long -- https://en.wikipedia.org/wiki/SHA-1 .

And vc-darcs.el tries to get 62 symbols of `h' in `vc-darcs-changes'...

So, is `h' the hash?..

  (let ((h (cdr (assoc 'hash (cadr e)
(when h
  (push (substring h 0 61) l))

Probably, yes. So, something is wrong (40 vs 62)...

--
IvanDebugger entered--Lisp error: (args-out-of-range 
"fa1eff0e1163fc2c716cccb2f4ab9bffe21597c1" 0 61)
  substring("fa1eff0e1163fc2c716cccb2f4ab9bffe21597c1" 0 61)
  (cons (substring h 0 61) l)
  (setq l (cons (substring h 0 61) l))
  (progn (setq l (cons (substring h 0 61) l)))
  (if h (progn (setq l (cons (substring h 0 61) l
  (let ((h (cdr (assoc (quote hash) (cadr e) (if h (progn (setq l (cons 
(substring h 0 61) l)
  (progn (let ((h (cdr (assoc (quote hash) (cadr e) (if h (progn (setq l 
(cons (substring h 0 61) l))
  (if (and (consp e) (eq (car e) (quote patch))) (progn (let ((h (cdr (assoc 
(quote hash) (cadr e) (if h (progn (setq l (cons (substring h 0 61) l)))
  (let ((e (car (prog1 ch (setq ch (cdr ch)) (if (and (consp e) (eq (car e) 
(quote patch))) (progn (let ((h (cdr (assoc ... ... (if h (progn (setq l 
(cons ... l
  (while (not (null ch)) (let ((e (car (prog1 ch (setq ch (cdr ch)) (if 
(and (consp e) (eq (car e) (quote patch))) (progn (let ((h (cdr ...))) (if h 
(progn (setq l ...
  (let ((ch (cddr (car changes))) (l (quote nil))) (while (not (null ch)) (let 
((e (car (prog1 ch (setq ch ...) (if (and (consp e) (eq (car e) (quote 
patch))) (progn (let ((h ...)) (if h (progn ...))) (nreverse l))
  (let ((changes (xml-parse-region 1 (point-max (if (and (null (cdr 
changes)) (eq (quote changelog) (car (car changes nil (error "Unexpected 
output from darcs changes --xml.")) (let ((ch (cddr (car changes))) (l (quote 
nil))) (while (not (null ch)) (let ((e (car (prog1 ch ... (if (and (consp 
e) (eq (car e) (quote patch))) (progn (let (...) (if h ...)) (nreverse l)))
  (progn (apply (function vc-do-command) t 0 vc-darcs-program-name files 
"changes" "--xml" flags) (let ((changes (xml-parse-region 1 (point-max (if 
(and (null (cdr changes)) (eq (quote changelog) (car (car changes nil 
(error "Unexpected output from darcs changes --xml.")) (let ((ch (cddr (car 
changes))) (l (quote nil))) (while (not (null ch)) (let ((e (car ...))) (if 
(and (consp e) (eq ... ...)) (progn (let ... ...) (nreverse l
  (unwind-p

[darcs-users] vc-darcs.el records changes without the fullname unlike darcs itself (with a PATCH)

2015-12-14 Thread Ivan Zakharyaschev

Another problem I've noticed with the vc-darcs.el from jch@ is that it
doesn't use the author's fullname when recording changes.

This has been discovered thanks to a warning by "darcs amend".

Let's have a look how the code of vc-darcs.el could be fixed. (I'll
post if I come up with something.)

Here is an example session demonstrating the problem:

~/tests $ mkdir test-darcs
~/tests $ cd test-darcs/
~/tests/test-darcs $ darcs init
Repository initialized.
~/tests/test-darcs $ echo a > a
~/tests/test-darcs $ darcs add a
Adding 'a'
~/tests/test-darcs $ darcs rec
addfile ./a
Shall I record this change? (1/2)  [ynW...], or ? for more options: y
hunk ./a 1
-
+a
Shall I record this change? (2/2)  [ynW...], or ? for more options: y
Do you want to record these changes? [Yglqk...], or ? for more options: y
Finished recording patch 'A.'
~/tests/test-darcs $

(On the last step above, there is another minor problem -- probably caused
by vc-darcs.el, since I didn't experience it before starting to use
vc-darcs.el:

Emacs is started to edit the message (as before), but the buffer
(named something like _DARCS_PATCH:...) is read-only. I had to do
C-x C-q to be able to edit it.)

Now, let's use Emacs VC to make and record a change:

edit the file in Emacs, and C-x v v

Then, I tried to amend the last change:

~/tests/test-darcs $ echo c > a
~/tests/test-darcs $ darcs amend
patch 81d803550190efdbf33b3b0e61915ea30bcda416
Author: i...@altlinux.org
Date:   Tue Dec 15 06:24:57 MSK 2015
  * B.
Shall I amend this patch? [yNjk...], or ? for more options: y
hunk ./a 1
-b
-
+c
Shall I record this change? (1/1)  [ynW...], or ? for more options: y
Do you want to record these changes? [Yglqk...], or ? for more options: y
You're not i...@altlinux.org! Amend anyway? withSignalsHandled: Interrupted!
interrupt
~/tests/test-darcs $

You see, there is a warning. And here is the reason:

~/tests/test-darcs $ darcs log
patch 81d803550190efdbf33b3b0e61915ea30bcda416
Author: i...@altlinux.org
Date:   Tue Dec 15 06:24:57 MSK 2015
  * B.

patch d3d9ad100dffc3ece9c042712c87750b04cf941c
Author: Ivan Zakharyaschev 
Date:   Tue Dec 15 06:18:27 MSK 2015
  * A.
~/tests/test-darcs $

The last recorded change (with Emacs VC) doesn't have the fullname.

Let's have a look at the code of `vc-darcs-checkin':

...
(vc-darcs-do-command 'record 'async files "-a" "--pipe")
(with-current-buffer (get-buffer "*vc*")
  (process-send-string nil
   (format "%s\n%s\n%s\n%s"
   date vc-darcs-mail-address patch-name log))
  (process-send-eof

It refers only to `vc-darcs-mail-address', which is:

vc-darcs-mail-address is a variable defined in `vc-darcs.el'.
Its value is "i...@altlinux.org"

Documentation:
*The email address to use in darcs.

There is no fullname here.

It's defined like this:

(defcustom vc-darcs-mail-address
  (or (getenv "DARCS_EMAIL")
  (getenv "EMAIL")
  (if (string-match "<" user-mail-address)
  user-mail-address
  (format "%s <%s>"
  (user-full-name) user-mail-address)))
  "*The email address to use in darcs."
  :type '(choice string (const nil))
  :group 'vc-darcs)

So it makes an attempt to insert the fullname, but in my case it fails.

Well, I have it written down in ~/.darcs/author, that why darcs knows it:

Ivan Zakharyaschev 

And "finger" (after I've just installed it) also knows it:

$ /usr/bin/finger imz | head -1
Login: imz  Name: Ivan Zakharyaschev

And even (user-full-name) evaluates correctly.

So, the reason is that EMAIL environment variable is set to just the
plain address (without the fullname). I'm not sure, but that may be
because Git (or perhars darcs) expects it to be that way, so I've set
it like this.

If that is a common possibility, I think that the value of EMAIL in
the above code should be treated similarly to `user-mail-address'
(with a check for "<").

Hence, the suggested fix:

diff -rN -u old-vc-darcs/vc-darcs.el new-vc-darcs/vc-darcs.el
--- old-vc-darcs/vc-darcs.el2015-12-15 07:47:00.563953863 +0300
+++ new-vc-darcs/vc-darcs.el2015-12-15 07:47:00.563953863 +0300
@@ -97,12 +97,13 @@
   :group 'vc-darcs)

 (defcustom vc-darcs-mail-address
-  (or (getenv "DARCS_EMAIL")
-  (getenv "EMAIL")
-  (if (string-match "<" user-mail-address)
-  user-mail-address
-  (format "%s <%s>"
-  (user-full-name) user-mail-address)))
+  (let ((addr (or (getenv "DARCS_EMAIL")
+ (getenv "EMAIL")
+ user-mail-address)))
+(if (string-match "<" addr)
+   addr
+  (format "%s <%s>"
+ (user-full-name) addr)))
   "*The email address to use in darcs."
   :type '(choice string (const nil))
   :group 'vc-darcs)

Best regards,
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] vc-darcs.el records changes without the fullname unlike darcs itself (with a PATCH)

2015-12-14 Thread Ivan Zakharyaschev

On Tue, 15 Dec 2015, Ivan Zakharyaschev wrote:


Another problem I've noticed with the vc-darcs.el from jch@ is that it
doesn't use the author's fullname when recording changes.

This has been discovered thanks to a warning by "darcs amend".

Let's have a look how the code of vc-darcs.el could be fixed. (I'll
post if I come up with something.)


I've pushed my fix to http://hub.darcs.net/imz/vc-darcs_jch .

(Before that I had to convert to darcs-2 to be able to push to 
hub.darcs.net, so that might be considered a temporary darcs-2 repo to 
publish the fixes until Juliusz converts his one.)



Hence, the suggested fix:

diff -rN -u old-vc-darcs/vc-darcs.el new-vc-darcs/vc-darcs.el
--- old-vc-darcs/vc-darcs.el2015-12-15 07:47:00.563953863 +0300
+++ new-vc-darcs/vc-darcs.el2015-12-15 07:47:00.563953863 +0300
@@ -97,12 +97,13 @@
  : group 'vc-darcs)

(defcustom vc-darcs-mail-address
-  (or (getenv "DARCS_EMAIL")
-  (getenv "EMAIL")
-  (if (string-match "<" user-mail-address)
-  user-mail-address
-  (format "%s <%s>"
-  (user-full-name) user-mail-address)))
+  (let ((addr (or (getenv "DARCS_EMAIL")
+ (getenv "EMAIL")
+ user-mail-address)))
+(if (string-match "<" addr)
+   addr
+  (format "%s <%s>"
+ (user-full-name) addr)))
   "*The email address to use in darcs."
  : type '(choice string (const nil))
  : group 'vc-darcs)


Best regards,
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] vc-darcs.el and the length of hashes (cons: Args out of range)

2015-12-14 Thread Ivan Zakharyaschev

On Tue, 15 Dec 2015, Ivan Zakharyaschev wrote:

I'm not sure about where this inconsistency comes from. Perhaps, an older 
version of darcs had a different interface w.r.t. the ids of patches. 
Understanding this would make it clearer how to proceed with a possible fix 
(keep both variants or not, check versions,...). Do you have any suggestions?


A stupid fix which works for the newer darcs has been pushed to 
http://hub.darcs.net/imz/vc-darcs_jch/patch/2744a57b44e61a4ab186fe38d8d4645b467ce4e2 
.



SHA1 is 40 hexadecimal digits long -- https://en.wikipedia.org/wiki/SHA-1 .

And vc-darcs.el tries to get 62 symbols of `h' in `vc-darcs-changes'...

So, is `h' the hash?..

  (let ((h (cdr (assoc 'hash (cadr e)
(when h
  (push (substring h 0 61) l))

Probably, yes. So, something is wrong (40 vs 62)...


--
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] vc-darcs.el and the length of hashes (cons: Args out of range)

2015-12-15 Thread Ivan Zakharyaschev

On Tue, 15 Dec 2015, Ivan Zakharyaschev wrote:


implementation mentioned at http://darcs.net/RelatedSoftware/Emacs and
http: //www.emacswiki.org/emacs/DaRcs --
http: //www.loveshack.ukfsn.org/emacs/vc-darcs.el -- is not available
because the site doesn't open.)


Thanks, Steve, for pointing out that that must be Dave Love's site.

I've just found two vc-darcs repos at hub.darcs.net with changes authored 
by him:


http://hub.darcs.net/fx/vc-darcs/changes
http://hub.darcs.net/ddssff/vc-darcs/changes

The first one seems to have incorporated the changes from the second 
fork, and having fresh changes by Dave Love from as late as October 04, 
2015.


(Now, I don't have time to try it out.)

So, the wikis should probably be updated accordingly -- to point to the 
live darcs repo with the code. (Perhaps, I'll do that a bit later.)


Best regards,
Ivan.
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] Q: language-c upstream repo

2015-12-21 Thread Ivan Zakharyaschev

On Sun, 20 Dec 2015, Ivan Zakharyaschev wrote:

And I've cloned the repo listed at 
https://hackage.haskell.org/package/language-c-0.4.7 , namely: 
http://code.haskell.org/language-c


But then I discovered that if I want to publish them on hub.darcs.net , I 
need a darcs-2 repo, and the initial one which I used for cloning is a 
darcs-1 repo.


I could do the conversion to darcs-2, but I read that it is not reproducible: 
run several times on the same set of patches it will give different results.


Ganesh Sittampalam re-assured me at 
http://stackoverflow.com/a/34385874/94687
that it is not always so bad, and gave advices that I still try to go 
through the conversion and pushing my changes to a clone of the other 
upstream darcs-2 repo:


As I've discovered also a language-c repo at hub.darcs.net which looks like 
an upstream repo: http://hub.darcs.net/visq/language-c , I'm in doubt whether


Unfortunately, it didn't go smoothly -- when pushing the converted repo, 
darcs "couldn't commute" some tag patches, and it seems it refused to do 
anything further:


~/TOOLS/prog/language-c.darcs-2 $ darcs push ../language-c_hub/
HINT: if you want to change the default remote repository to
  /home/imz/TOOLS/prog/language-c_hub,
  quit now and issue the same command with the --set-default flag.
darcs: bug at src/Darcs/Patch/Depends.hs:327 compiled May 26 2015 04:16:45
Failed to commute common patches:
patch 71a1a541365ab8de9a874c21681f07b97bc1669b
Author: benedikt.hu...@gmail.com
Date:   Tue Aug 16 20:19:10 MSK 2011
  tagged 0.4.1
patch f711caf67e93818e50033b7453e503ac23f26441
Author: benedikt.hu...@gmail.com
Date:   Wed Feb 24 10:19:43 MSK 2010
  * old tag: darcs_apply_bug
patch c400ff96bc04d011ad9ab89966a104965f4b3548
Author: benedikt.hu...@gmail.com
Date:   Thu Aug 21 16:32:18 MSD 2008
  tagged 0.3.1
patch 4ab2c817f54dbd8f06a1350cb9a4abf28e25ddeb
Author: benedikt.hu...@gmail.com
Date:   Tue Aug 12 20:34:05 MSD 2008
  * old tag: 0.3
patch c64f7c2830d166da91fa0d20b8a6877babe6d580
Author: benedikt.hu...@gmail.com
Date:   Tue Jun  3 12:45:36 MSD 2008
  * old tag: 0.1
See http://wiki.darcs.net/BugTracker/Reporting for help on bug reporting.
~/TOOLS/prog/language-c.darcs-2 $

For now, I'm still in doubt what would be a simple way to transfer the 
several last patches to a darcs-2 fork.


Perhaps, there is some kind of a known problem with converted tags in 
darcs?


Best regards,
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] Q: language-c upstream repo

2015-12-21 Thread Ivan Zakharyaschev

On Mon, 21 Dec 2015, Ivan Zakharyaschev wrote:


Ganesh Sittampalam re-assured me at http://stackoverflow.com/a/34385874/94687
that it is not always so bad, and gave advices that I still try to go through 
the conversion and pushing my changes to a clone of the other upstream 
darcs-2 repo:


Unfortunately, it didn't go smoothly -- when pushing the converted repo, 
darcs "couldn't commute" some tag patches, and it seems it refused to do 
anything further:


For now, I'm still in doubt what would be a simple way to transfer the 
several last patches to a darcs-2 fork.


Perhaps, there is some kind of a known problem with converted tags in darcs?


It looks like a bug in the darcs conversion in my case, because my 
darcs-2 result of the conversion lacks some tags, which are present in the 
darcs-1 source (and also in the hub darcs-2 repo). It's strange that the 
conversion once done for hub didn't have this problem.


~/TOOLS/prog/language-c.darcs-2 $ darcs show tags
imz_init_typos-fixed
0.4.1
0.3.1
$ cd ../language-c
~/TOOLS/prog/language-c $ darcs show tags
imz_init_typos-fixed
0.4.1
darcs_apply_bug
0.3.1
0.3
0.1
~/TOOLS/prog/language-c_hub $ darcs show tags
0.4.1
darcs_apply_bug
0.3.1
0.3
0.1

The conversion was done like this (with some warnings/error messages):

~/TOOLS/prog $ darcs convert darcs-2 language-c language-c.darcs-2
WARNING: the repository produced by this command is not understood by
Darcs 1.x, and patches cannot be exchanged between repositories in
darcs-1 and darcs-2 formats.

Furthermore, repositories created by different invocations of
this command SHOULD NOT exchange patches.

Please confirm that you have read and understood the above
by typing `I understand the consequences of my action': I understand the 
consequences of my action

lossy conversion:
merger 0.0 (
merger 0.0 (
hunk ./src/Language/C/Data/Position.hs 115
+-- | advance to the next row
+incRow :: Position -> Position
+incRow (Position o f r c) = Position o f (r + 1) c
+incRow p  = p
hunk ./src/Language/C/Data/Position.hs 115
+{-# INLINE adjustPos #-}
+-- | adjust position: change file and line number, reseting column to 1. 
This is usually
+--   used for #LINE pragmas. The absolute offset is not changed - this 
can be done

+--   by @adjustPos newFile line . incPos (length pragma)@.
+adjustPos :: FilePath -> Int -> Position -> Position
+adjustPos fname row (Position offs _ _ _) = Position offs fname row 1
+adjustPos _ _ p   = p
)
hunk ./src/Language/C/Data/Position.hs 115
--- | advance to the next row
+-- | advance to the next row, this does not reset the column.  use
+-- @retPos@ if that's what you want to do.
)
Finished converting.


Best regards,
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] Q: language-c upstream repo

2015-12-21 Thread Ivan Zakharyaschev

On Mon, 21 Dec 2015, Ivan Zakharyaschev wrote:

It looks like a bug in the darcs conversion in my case, because my darcs-2 
result of the conversion lacks some tags, which are present in the darcs-1 
source (and also in the hub darcs-2 repo). It's strange that the conversion 
once done for hub didn't have this problem.


~/TOOLS/prog/language-c.darcs-2 $ darcs show tags
imz_init_typos-fixed
0.4.1
0.3.1
$ cd ../language-c
~/TOOLS/prog/language-c $ darcs show tags
imz_init_typos-fixed
0.4.1
darcs_apply_bug
0.3.1
0.3
0.1
~/TOOLS/prog/language-c_hub $ darcs show tags
0.4.1
darcs_apply_bug
0.3.1
0.3
0.1

The conversion was done like this (with some warnings/error messages):

~/TOOLS/prog $ darcs convert darcs-2 language-c language-c.darcs-2
WARNING: the repository produced by this command is not understood by
Darcs 1.x, and patches cannot be exchanged between repositories in
darcs-1 and darcs-2 formats.

Furthermore, repositories created by different invocations of
this command SHOULD NOT exchange patches.

Please confirm that you have read and understood the above
by typing `I understand the consequences of my action': I understand the 
consequences of my action

lossy conversion:
merger 0.0 (
merger 0.0 (
hunk ./src/Language/C/Data/Position.hs 115
+-- | advance to the next row
+incRow :: Position -> Position
+incRow (Position o f r c) = Position o f (r + 1) c
+incRow p  = p
hunk ./src/Language/C/Data/Position.hs 115
+{-# INLINE adjustPos #-}
+-- | adjust position: change file and line number, reseting column to 1. 
This is usually
+--   used for #LINE pragmas. The absolute offset is not changed - this can 
be done

+--   by @adjustPos newFile line . incPos (length pragma)@.
+adjustPos :: FilePath -> Int -> Position -> Position
+adjustPos fname row (Position offs _ _ _) = Position offs fname row 1
+adjustPos _ _ p   = p
)
hunk ./src/Language/C/Data/Position.hs 115
--- | advance to the next row
+-- | advance to the next row, this does not reset the column.  use
+-- @retPos@ if that's what you want to do.
)
Finished converting.




$ darcs --exact-version
darcs compiled on May 26 2015, at 04:18:50

Context:

[TAG 2.10.0
Guillaume Hoffmann **20150419200705
 Ignore-this: 6d154c9aa51c8328c777ca9a2c223125
]

Compiled with:

HTTP-4000.2.19
array-0.4.0.1
attoparsec-0.12.1.3
base-4.6.0.0
base16-bytestring-0.1.1.6
binary-0.7.3.0
bytestring-0.10.0.0
containers-0.5.0.0
cryptohash-0.11.6
data-ordlist-0.4.7.0
dataenc-0.14.0.4
directory-1.2.0.0
filepath-1.3.0.1
hashable-1.2.3.1
haskeline-0.7.2.1
html-1.0.1.2
mmap-0.5.8
mtl-2.2.1
network-2.4.2.3
old-locale-1.0.0.5
old-time-1.1.0.1
parsec-3.1.8
process-1.1.0.2
random-1.1
regex-applicative-0.3.1
regex-compat-tdfa-0.95.1.4
tar-0.4.0.1
terminfo-0.3.2.5
text-1.2.0.4
time-1.4.0.1
transformers-0.4.2.0
transformers-compat-0.4.0.4
unix-2.6.0.0
unix-compat-0.4.1.4
utf8-string-0.3.7
vector-0.10.0.1
zip-archive-0.2.3.7
zlib-0.5.4.0


Best regards,
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] Q: language-c upstream repo

2015-12-21 Thread Ivan Zakharyaschev

On Mon, 21 Dec 2015, Guillaume Hoffmann wrote:


Indeed, "darcs convert" is sensitive to patch ordering, which is a
problem in your case.


But isn't it a bug that some tags seem to be lost after the conversion? 
(As I have demonstrated below: the tags are present in the source darcs-1 
repo, but not in the result.)



I know it's not really solving the problem but have you noticed that
the user "visq" on hub.darcs.net is actually the maintainer of
language-c ? (As I can see from the repo history
http://code.haskell.org/language-c/_darcs/inventory ).  I guess you
can make patches against the hub.darcs.net repo then.


Ok, thanks, I'll work it out somehow. I simply have already recorded some 
patches and have wondered about a simple way to transfer them to the 
darcs-2 repo (a clone of the URL above).



2015-12-21 7:26 GMT-03:00 Ivan Zakharyaschev :

On Mon, 21 Dec 2015, Ivan Zakharyaschev wrote:


It looks like a bug in the darcs conversion in my case, because my darcs-2
result of the conversion lacks some tags, which are present in the darcs-1
source (and also in the hub darcs-2 repo). It's strange that the conversion
once done for hub didn't have this problem.

~/TOOLS/prog/language-c.darcs-2 $ darcs show tags
imz_init_typos-fixed
0.4.1
0.3.1
$ cd ../language-c
~/TOOLS/prog/language-c $ darcs show tags
imz_init_typos-fixed
0.4.1
darcs_apply_bug
0.3.1
0.3
0.1
~/TOOLS/prog/language-c_hub $ darcs show tags
0.4.1
darcs_apply_bug
0.3.1
0.3
0.1

The conversion was done like this (with some warnings/error messages):

~/TOOLS/prog $ darcs convert darcs-2 language-c language-c.darcs-2
WARNING: the repository produced by this command is not understood by
Darcs 1.x, and patches cannot be exchanged between repositories in
darcs-1 and darcs-2 formats.

Furthermore, repositories created by different invocations of
this command SHOULD NOT exchange patches.

Please confirm that you have read and understood the above
by typing `I understand the consequences of my action': I understand the
consequences of my action
lossy conversion:
merger 0.0 (
merger 0.0 (
hunk ./src/Language/C/Data/Position.hs 115
+-- | advance to the next row
+incRow :: Position -> Position
+incRow (Position o f r c) = Position o f (r + 1) c
+incRow p  = p
hunk ./src/Language/C/Data/Position.hs 115
+{-# INLINE adjustPos #-}
+-- | adjust position: change file and line number, reseting column to 1.
This is usually
+--   used for #LINE pragmas. The absolute offset is not changed - this
can be done
+--   by @adjustPos newFile line . incPos (length pragma)@.
+adjustPos :: FilePath -> Int -> Position -> Position
+adjustPos fname row (Position offs _ _ _) = Position offs fname row 1
+adjustPos _ _ p   = p
)
hunk ./src/Language/C/Data/Position.hs 115
--- | advance to the next row
+-- | advance to the next row, this does not reset the column.  use
+-- @retPos@ if that's what you want to do.
)
Finished converting.




$ darcs --exact-version
darcs compiled on May 26 2015, at 04:18:50

Context:

[TAG 2.10.0
Guillaume Hoffmann **20150419200705
 Ignore-this: 6d154c9aa51c8328c777ca9a2c223125
]

Compiled with:

HTTP-4000.2.19
array-0.4.0.1
attoparsec-0.12.1.3
base-4.6.0.0
base16-bytestring-0.1.1.6
binary-0.7.3.0
bytestring-0.10.0.0
containers-0.5.0.0
cryptohash-0.11.6
data-ordlist-0.4.7.0
dataenc-0.14.0.4
directory-1.2.0.0
filepath-1.3.0.1
hashable-1.2.3.1
haskeline-0.7.2.1
html-1.0.1.2
mmap-0.5.8
mtl-2.2.1
network-2.4.2.3
old-locale-1.0.0.5
old-time-1.1.0.1
parsec-3.1.8
process-1.1.0.2
random-1.1
regex-applicative-0.3.1
regex-compat-tdfa-0.95.1.4
tar-0.4.0.1
terminfo-0.3.2.5
text-1.2.0.4
time-1.4.0.1
transformers-0.4.2.0
transformers-compat-0.4.0.4
unix-2.6.0.0
unix-compat-0.4.1.4
utf8-string-0.3.7
vector-0.10.0.1
zip-archive-0.2.3.7
zlib-0.5.4.0



Best regards,
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users




___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] Q: language-c upstream repo

2015-12-21 Thread Ivan Zakharyaschev

On Mon, 21 Dec 2015, Guillaume Hoffmann wrote:


But isn't it a bug that some tags seem to be lost after the conversion? (As
I have demonstrated below: the tags are present in the source darcs-1 repo,
but not in the result.)


Can you first run "darcs optimize reorder" and then do the conversion?


I did this.

This didn't help with the lost tags (isn't it strange?), but did help with 
being able to push to the darcs-2 repo from hub (a clone of it):


(BTW, there are axtra patches in the darcs-1 repo.)

~/TOOLS/prog $ cd language-c.pristine.reordered/
~/TOOLS/prog/language-c.pristine.reordered $ darcs show tags
0.4.1
darcs_apply_bug
0.3.1
0.3
0.1
~/TOOLS/prog/language-c.pristine.reordered $ darcs optimize reorder
Done reordering!
~/TOOLS/prog/language-c.pristine.reordered $ darcs show tags
0.4.1
darcs_apply_bug
0.3.1
0.3
0.1
~/TOOLS/prog/language-c.pristine.reordered $ cd ..
~/TOOLS/prog $ darcs convert darcs-2 language-c.pristine.reordered 
language-c.pristine.darcs-2

WARNING: the repository produced by this command is not understood by
Darcs 1.x, and patches cannot be exchanged between repositories in
darcs-1 and darcs-2 formats.

Furthermore, repositories created by different invocations of
this command SHOULD NOT exchange patches.

Please confirm that you have read and understood the above
by typing `I understand the consequences of my action': I understand the 
consequences of my action

lossy conversion:
merger 0.0 (
merger 0.0 (
hunk ./src/Language/C/Data/Position.hs 115
+-- | advance to the next row
+incRow :: Position -> Position
+incRow (Position o f r c) = Position o f (r + 1) c
+incRow p  = p
hunk ./src/Language/C/Data/Position.hs 115
+{-# INLINE adjustPos #-}
+-- | adjust position: change file and line number, reseting column to 1. 
This is usually
+--   used for #LINE pragmas. The absolute offset is not changed - this 
can be done

+--   by @adjustPos newFile line . incPos (length pragma)@.
+adjustPos :: FilePath -> Int -> Position -> Position
+adjustPos fname row (Position offs _ _ _) = Position offs fname row 1
+adjustPos _ _ p   = p
)
hunk ./src/Language/C/Data/Position.hs 115
--- | advance to the next row
+-- | advance to the next row, this does not reset the column.  use
+-- @retPos@ if that's what you want to do.
)
Finished converting.
~/TOOLS/prog $ cd language-c.pristine.darcs-2/
~/TOOLS/prog/language-c.pristine.darcs-2 $ darcs show tags
0.4.1
0.3.1
~/TOOLS/prog/language-c.pristine.darcs-2 $ darcs push ../language-c_hub
HINT: if you want to change the default remote repository to
  /home/imz/TOOLS/prog/language-c_hub,
  quit now and issue the same command with the --set-default flag.
patch e3ef50ad1602f11b10b5aa1d7e529e06866c3e91
Author: benedikt.hu...@gmail.com
Date:   Thu Dec  4 09:38:40 MSK 2014
  * Notes concerning MAINTAINANCE, whitespace fixes in Test
Shall I push this patch? (1/2)  [ynW...], or ? for more options: v
[Notes concerning MAINTAINANCE, whitespace fixes in Test
benedikt.hu...@gmail.com**20141204063840
 Ignore-this: fc7e006cc9b2fa7566b33f8caa35e769
] addfile ./MAINTAINANCE
hunk ./MAINTAINANCE 1
+# Maintainance Release Procedure
+
+# bump version and update dependencies if necessary
+emacs language-c.cabal
+darcs record
+
+# apply patches
+darcs am *.patch
+
+# add minimal test for new functionality
+# (edit test/harness)
+
+# haskell updates
+# (update GHC to stable release)
+cabal update
+cabal install -p --upgrade-dependencies
+
+# regression test
+DEFAULT_BROWSER=firefox bash scripts/regression_test
+
+# upload to code.haskell.org
+darcs push
+
+# upload to hub.darcs.net and github (using patches)
+
+# upload to hackage (using website)
hunk ./test/src/CParse.hs 29
-nonParseEnvVar :: String [_$_]
+nonParseEnvVar :: String
hunk ./test/src/CParse.hs 39
-[_$_]
+
hunk ./test/src/CParse.hs 59
-  True -> [_$_]
+  True ->
hunk ./test/src/CParse.hs 62
-  setTestStatus parseTest1 $ [_$_]
+  setTestStatus parseTest1 $
hunk ./test/src/CParse.hs 68
-  setTestStatus parseTest1 $ [_$_]
+  setTestStatus parseTest1 $
hunk ./test/src/CParse.hs 71
-  [_$_]
+
Shall I push this patch? (1/2)  [ynW...], or ? for more options: n
patch 1f08b2e3e6ee99c93e0b8283a8a409efe38bf41c
Author: benedikt.hu...@gmail.com
Date:   Thu Dec  4 09:39:10 MSK 2014
  * Scott Kovach : added derived Eq,Ord instances to 
NodeInfo


Shall I push this patch? (2/2)  [ynW...], or ? for more options: v
[Scott Kovach : added derived Eq,Ord instances to 
NodeInfo

benedikt.hu...@gmail.com**20141204063910
 Ignore-this: ec4894a483080f5d658cbaacabdbaa95

] hunk ./src/Language/C/Data/Node.hs 29
-   deriving (Data,Typeable)
+   deriving (Data,Typeable,Eq,Ord)
hunk ./src/Language/C/Data/Node.hs 38
-instance Eq NodeInfo where
-  (NodeInfo   _ _ id1) == (NodeInfo   _ _ id2) = id1 == id2
-  _   == _   =
-error "Attributes: Attempt to compare `OnlyPos' attributes!"
+--instance Eq NodeInfo w

Re: [darcs-users] Q: language-c upstream repo (fwd)

2015-12-22 Thread Ivan Zakharyaschev


-- Forwarded message --
Date: Tue, 22 Dec 2015 05:59:17 +
From: Benedikt Huber 
To: Ivan Zakharyaschev , haskell-c...@haskell.org
Subject: Re: Q: language-c upstream repo

Hi Ivan,
the hub.darcs.net repository is a mirror of http://code.haskell.org/language-c 
(the official upstream) that was created to simplify contributing.
Conversion to darcs-2 was not straightforward IIRC, and the update of the 
repository did not work out.That's why code.haskell.org is still darcs-1.
Best, Benedikt

Ivan Zakharyaschev  schrieb am So., 20. Dez. 2015 um 16:32 
Uhr:
  Hello!

  I've been interested in hacking language-c library a bit for my needs. (If
  it turns out useful and successful, I'll tell about it.)

  And I've cloned the repo listed at
  https://hackage.haskell.org/package/language-c-0.4.7 , namely:
  http://code.haskell.org/language-c

  Apart from my special hacks, I've also fixed some typos and so on.

  But then I discovered that if I want to publish them on hub.darcs.net , I
  need a darcs-2 repo, and the initial one which I used for cloning is
  a darcs-1 repo.

  I could do the conversion to darcs-2, but I read that it is not
  reproducible: run several times on the same set of patches it will give
  different results.

  As I've discovered also a language-c repo at hub.darcs.net which looks
  like an upstream repo: http://hub.darcs.net/visq/language-c , I'm in doubt
  whether I should continue making my patches against the darcs-1 repo which
  is said to be upstream at hackage or against
  http://hub.darcs.net/visq/language-c whichis not officially declared as
  the upstream but looks more fresh.

  ..if I want to be able to send some of my patches upstream.

  Best regards,
  Ivan

___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] Q: language-c upstream repo (fwd)

2015-12-22 Thread Ivan Zakharyaschev

Hi, Benedikt!

Thanks for your reply clarifying these things.


-- Forwarded message --
Date: Tue, 22 Dec 2015 05:59:17 +
From: Benedikt Huber 


the hub.darcs.net repository is a mirror of 
http://code.haskell.org/language-c (the official upstream) that was created 
to simplify contributing.
Conversion to darcs-2 was not straightforward IIRC, and the update of the 
repository did not work out.That's why code.haskell.org is still darcs-1.


To be able to push to hub.darcs.net, I've done the conversion with "darcs 
convert darcs-2" with the help of the advices from darcs developers -- 
after a "darcs optimize reorder", and the resulting darcs-2 repo had no 
problems with pushing to (a clone of) your darcs-2 repo at hub.darcs.net. 
(Although one thing that still appears strange to me is that some tags 
were lost in my result of the conversion, but not in your darcs-2 repo. 
I've described all this in the previous messages in this thread.)


Anyway, now, this darcs-2 mirror of the upstream code.haskell.org darcs-1 
repo is at http://hub.darcs.net/imz/language-c_hackage


It is "compatible" with your darcs-2 repo at hub.darcs.net, and compared 
to it has 2 extra patches. These are the last two changes in the 
"official upstream" darcs-1 repo (they are from December 2014).


Ivan Zakharyaschev  schrieb am So., 20. Dez. 2015 um 
16:32 Uhr:



  I've been interested in hacking language-c library a bit for my needs.
  (If
  it turns out useful and successful, I'll tell about it.)

  And I've cloned the repo listed at
  https://hackage.haskell.org/package/language-c-0.4.7 , namely:
  http://code.haskell.org/language-c

 Apart from my special hacks, I've also fixed some typos and so on.

  But then I discovered that if I want to publish them on hub.darcs.net
  , I
  need a darcs-2 repo, and the initial one which I used for cloning is
  a darcs-1 repo.

  I could do the conversion to darcs-2, but I read that it is not
  reproducible: run several times on the same set of patches it will
  give
  different results.

  As I've discovered also a language-c repo at hub.darcs.net which looks
  like an upstream repo: http://hub.darcs.net/visq/language-c , I'm in
  doubt
  whether I should continue making my patches against the darcs-1 repo
  which
  is said to be upstream at hackage or against
  http://hub.darcs.net/visq/language-c whichis not officially declared
  as
  the upstream but looks more fresh.

 ..if I want to be able to send some of my patches upstream.


Best regards,
Ivan___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] updating the wiki with a darcs push?

2015-12-23 Thread Ivan Zakharyaschev

Hello!

On Sun, 23 Jun 2013, Simon Michael wrote:


On 6/21/13 5:57 AM, Ivan Zakharyaschev wrote:

 As for me, I feel that it's my problem to figure out how to send the
 patches. So, I've received the answer that there is a way to submit
 changes to the wiki from the local clone.


Another option is to publish your branch of the wiki on hub.darcs.net and 
request that a wiki admin pull from it, which has some advantages.


Maybe there should be an official wiki repo on hub for easy forking.
I've just set it up: http://hub.darcs.net/darcs/darcs-wiki .


Thanks for it! It's useful for forking off and having a public place to 
save one's changes to the wiki (made in a repo, not through the 
web-interface, which is the preferred way to edit wikis for me.)


Like the darcs-screened and darcs-reviewed repos already on hub, it's 
currently a one-way mirror from the official repos on darcs.net, updated 
periodically (currently, on the hour).


However, there are currently discrepancies between the content of the real 
wiki and the hub mirror, which I've just discovered -- 
http://bugs.darcs.net/issue2483 .


So, the correct way to pull someone's changes for the wiki from
hub.darcs.net would be to pull only the complement of his repo to the
mirror repo.

Example -- how not to pull the extra (spam) changes from a fork (imz's 
one) and also an interesting example of the usage of --complement:


[imz@ovicaa darcs-wiki2]$ darcs pull --complement
http://hub.darcs.net/imz/darcs-wiki
http://hub.darcs.net/darcs/darcs-wiki --dry-run
Would pull the following changes:
patch c6ee1c26ddc1fcbb6b6ddded99ade9a773bfea98
Author: Ivan Zakharyaschev 
Date:   Wed Jun 19 01:51:50 MSK 2013
  * tip: Invoking Emacs functions as external merge/diff tools.

  Preparing the args for an Emacs function in a shell script (as it is
done in the manual) is ugly. Here I show how do it with Elisp code.

patch 66383b0cb4abec8770687c00c1e8bd7c6dbc709f
Author: Ivan Zakharyaschev 
Date:   Wed Dec 23 20:40:28 MSK 2015
  * minor: correct formatting of code

Making no changes: this is a dry run.
[imz@ovicaa darcs-wiki2]$

Best regards,
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] updating the wiki with a darcs push?

2015-12-23 Thread Ivan Zakharyaschev

Hello!

On Fri, 21 Jun 2013, Ganesh Sittampalam wrote:


On 20/06/2013 13:30, Ivan Zakharyaschev wrote:


I've got the wiki source with "darcs get --lazy
http://darcs.net/darcs-wiki"; as advertised on the site, recorded an
edit locally (which adds a tip), and now I'd like to push it in order
to publish my changes.

Can I do this?

I know that in the world of Git, there are sites which would allow
"anonymous" pushes in similar situations. [...]

What about darcs.net's wiki?


In darcs, an anonymous push is a "send" - i.e. use "darcs send", which
because of the configuration of the wiki repo, should default to sending
the change to patc...@darcs.net where someone can check and apply them.


"darcs send" run in a clone of the wiki repo wants--as before--to send 
patches to this list, namele, darcs-users@. Is this correct?


$ darcs send --dry-run
Creating patch to "http://darcs.net/darcs-wiki";...
Patch bundle would  be sent to: darcs-users@darcs.net
Would send the following changes:

My concern was that this is probably not at the level of automation of 
applying the patches as I'd wish (without an intervention of a human 
administrator; people edit the wiki without requiring the administrator to 
do something).



The extra security over just being able to edit the wiki directly online
is because there are more things you can do with direct repo access.


I see and agree.


We're looking at
adding general support for submitting patches over http instead, but
it's not all there yet.


Has something changed in this respect since then? I see "darcs help send" 
mentioning posting to HTTP:


If `_darcs/prefs/post` exists in the target repository, darcs will
upload to the URL contained in that file, which may either be a
`mailto:` URL, or an `http://` URL.  In the latter case, the
patch is posted to that URL.

Does this work? Can the wiki be setup to automatically accept changes via 
HTTP posts?


Best regards,
Ivan

___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users


Re: [darcs-users] Q: language-c upstream repo

2015-12-25 Thread Ivan Zakharyaschev

Hi,

I went further recording patches and tags to the darcs-1 clone of 
language-c from Hackage (because I'm not sure which format will be 
preferred for requesting a pull to upstream) and wanting to push them to 
the darcs-2 clone at hub.darcs.net (becauase I want to save and publish 
them somewhere).


I want to share some notes about some encountered problems and how they 
were overcome.


On Mon, 21 Dec 2015, Ivan Zakharyaschev wrote:


On Mon, 21 Dec 2015, Guillaume Hoffmann wrote:



 Can you first run "darcs optimize reorder" and then do the conversion?


I did this.

This didn't help with the lost tags (isn't it strange?), but did help with 
being able to push to the darcs-2 repo from hub (a clone of it):


Now I have again converted from my new state of the darcs-1 repo to 
darcs-2 and tried to push to (a clone of) the previous state darcs-2 
repo (at hub.darcs.net). And have had again that problem ("Failed to 
commute common patches").


After some attempts to convert "only a part of all the patches", I've 
discovered that obliterating my two new tags helps.



 I suspect this is the same bug as http://bugs.darcs.net/issue2466 ,
 that is, "dirty" tags (tag that have unrelated patches before them)
 are not exported.


One of the tags did indeed not have all preceding patches as its 
dependency.


(And the tags were not very useful anyway, being more like branches which 
might receive further changes. And I'm going to solve the problem of 
saving branches by having several repos at hub.darcs.net.)


Best regards,
Ivan
___
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users