Magnus Therning | 1 Feb 2007 02:00
Gravatar

Re: Re: how to get back deleted files in working copy?

On Wed, Jan 31, 2007 at 10:19:08 +0100, Peter Hercek wrote:
>Hi Magnus,
>
>this is what I meant by doing it manually:
>
>status:0 peter <at> ubimg [1163] ~/test/data
>% darcs query manifest
>./data/conv.ml
>./data/rand.ml
>status:0 peter <at> ubimg [1164] ~/test/data
>% darcs whatsnew -s
>M ./data/conv.ml -8 +17
>status:0 peter <at> ubimg [1165] ~/test/data
>% rm rand.ml
>status:0 peter <at> ubimg [1166] ~/test/data
>% darcs whatsnew -s
>M ./data/conv.ml -8 +17
>R ./data/rand.ml
>status:0 peter <at> ubimg [1167] ~/test/data
>% darcs revert
>hunk ./data/conv.ml 80
>  ... hunk data cut off ...
>Shall I revert this change? (1/?)  [ynWsfqadjkc], or ? for help: n
>hunk ./data/conv.ml 83
>  ... hunk data cut off ...
>Shall I revert this change? (2/?)  [ynWsfqadjkc], or ? for help: n
>hunk ./data/rand.ml 1
>  ... hunk data cut off ...
>Shall I revert this change? (3/?)  [ynWsfqadjkc], or ? for help: y
>Do you really want to revert these changes? y
(Continue reading)

Julien Pommier | 2 Feb 2007 23:28
Picon

darcs repair won't repair

Hello darcs users,
I was trying to pull a patch from a branch into my trunk, and the pull 
failed with a message saying that my repo was in an inconsistent state 
and that I have to fix it with "darcs repair". Ok. But when I run darcs 
repair, it fails with a message saying that I have duplicate patch 
names. Which is true, those were recorded one month ago. So I have two 
questions:

- Is it forbidden to use twice the same patch description ? I don't 
think so, but in that case why is darcs repair refusing to repair my 
repository ?

- How can I get out of this situation ? I'd really like to be able to 
keep my history

Best regards,
Julien.
Juliusz Chroboczek | 6 Feb 2007 21:59
Picon

Re: darcs repair won't repair

> But when I run darcs repair, it fails with a message saying that
> I have duplicate patch names. Which is true, those were recorded one
> month ago.

I think there's a confusion id.

Darcs identifies patches with their PatchInfo (pi), which is
a quadruple of (date, name, author, log).  Two patches in a Darcs repo
must never have the same pi.

So two patches can have the same name as long as they have a different
date.  Two patches can have the same date and the same name as long as
they have a different author.

Two distinct patches must never have identical date, name, author and
log message.

> - How can I get out of this situation ?

I think the simplest solution is to unpull all patches until one of
the two that conflict, then record again by hand.  If that is not
acceptable to you, we'll need to perform some surgery on the
repository by hand.

                                        Juliusz
Julien Pommier | 7 Feb 2007 18:59
Picon

Re: darcs repair won't repair

Hi Juliusz,

Quoting Juliusz Chroboczek <Juliusz.Chroboczek <at> pps.jussieu.fr>:

> So two patches can have the same name as long as they have a different
> date.  Two patches can have the same date and the same name as long as
> they have a different author.
>
> Two distinct patches must never have identical date, name, author and
> log message.
>

Ok, so I understand how I messed up :) I wanted to reindent correctly my sources
 mainly to replace all tabs with spaces. So I did that with a small script which
recorded one patch per file, using the same dumb description for all patches.
Since the script was fast, I guess almost some patches have the same timestamp

> > - How can I get out of this situation ?
>
> I think the simplest solution is to unpull all patches until one of
> the two that conflict, then record again by hand.  If that is not
> acceptable to you, we'll need to perform some surgery on the
> repository by hand.

I think I prefer trying the hard way :) (except if unpulling and then
rerecording is easy, but I am not sure of how to proceed). I have stacked many
patches above the conflicting ones. What should I do ? identify the files in
the _darcs/patches and edit their timestamp ?

Thanks for your help,
(Continue reading)

Juliusz Chroboczek | 7 Feb 2007 19:29
Picon

Re: darcs repair won't repair

> I think I prefer trying the hard way :) (except if unpulling and then
> rerecording is easy, but I am not sure of how to proceed). I have stacked many
> patches above the conflicting ones. What should I do ? identify the files in
> the _darcs/patches and edit their timestamp ?

I don't recomment it.  But if you really want to...

You will need to:

  - change the timestamp in the patch files;
  - recompute the pi hash, and rename the patch files accordingly;
  - modify _darcs/inventory consistently.

Code for computing the pi hash (the patch file's filename) can be
found in the funciton make_filename in PatchInfo.lhs.

                                        Juliusz
Thomas David Baker | 7 Feb 2007 23:46
Picon

Slow Push and Pull with Remote Repository

Hello,

I'm trying to solve a problem with a repository.  Each pull and push
takes about 3 minutes.

It is a large-ish repository (109MB total, _darcs folder is 61MB, 2370
changes according to "darcs changes").

I set up ssh/scp/sftp logging to see what it was doing, as described here:

http://wiki.darcs.net/index.html/DeveloperTips

It turns out that every time a pull or a push happens, hundreds of
commands like this are issued:

----------

scp -o ControlPath=/tmp//darcs-ssh/delroy <at> dev
delroy <at> dev:ersmithers_darcs_test/_darcs/patches/20061024182332-db8d4-6e9902a182892864b23efc86fa31c3352b7b9e4e.gz
/home/bakert/testdarcs/ersmithers_darcs_test/darcsHhasMC

----------

delroy <at> dev is where the repository I am push/pull-ing from/to is.

As each one takes up to a second this is why it is so slow.  Even if I
check out a new repository, make a one line change and then push it
still does hundreds of these.

I've tried issuing "darcs checkpoint" on the remote copy to no avail.
(Continue reading)

Denis Bueno | 8 Feb 2007 00:01
Picon

Re: Slow Push and Pull with Remote Repository

On 2/7/07, Thomas David Baker <bakert <at> gmail.com> wrote:
> Hello,
>
> I'm trying to solve a problem with a repository.  Each pull and push
> takes about 3 minutes.
>
> It is a large-ish repository (109MB total, _darcs folder is 61MB, 2370
> changes according to "darcs changes").

I ran into a similar problem with a large repo. I put all my class
assignments in a version-controlled edu/ directory of about 384 MB.
After created a darcs repo (both remote and local), issuing a darcs
pull took a long time (I didn't wait for it to finish) and used 1GB of
memory before I killed it off. I was running darcs on a Dual 2.5GHz
PowerMac G5. Using CVS or SVN for the same repo succeeded quickly and
without incident.

Is there some non-obvious reason why the time taken is so different
from CVS and SVN? Or, more generally, why is it so slow?

-Denis
David Roundy | 8 Feb 2007 00:24
Favicon
Gravatar

Re: Slow Push and Pull with Remote Repository

On Wed, Feb 07, 2007 at 10:46:10PM +0000, Thomas David Baker wrote:
> Hello,

Hi.

> I'm trying to solve a problem with a repository.  Each pull and push
> takes about 3 minutes.
> 
> It is a large-ish repository (109MB total, _darcs folder is 61MB, 2370
> changes according to "darcs changes").
...
> As each one takes up to a second this is why it is so slow.  Even if I
> check out a new repository, make a one line change and then push it
> still does hundreds of these.
> 
> I've tried issuing "darcs checkpoint" on the remote copy to no avail.

You probably need to create a tag.  Darcs uses tags to optimize the
treatment of old history.  Another possibility is that you've got some sort
of weird disjoint tags, and darcs optimize isn't able to figure out a good
way to order your partches.

> Probably unrelatedly if I try and do "darcs optimize --reorder-patches
> --checkpoint" on my local copy I get:
> 
> ----------
> 
> darcs: bug in darcs!
> fromJust error at DarcsRepo.lhs:525 compiled 06:01:36 Sep 13 2006

(Continue reading)

Juliusz Chroboczek | 8 Feb 2007 19:02
Picon

Re: Slow Push and Pull with Remote Repository

Please make sure you regularly tag the remote repo.  If that doesn't
help, consider using ``darcs optimize --reorder-patches''.

                                        Juliusz
Thomas David Baker | 8 Feb 2007 19:09
Picon

Re: Slow Push and Pull with Remote Repository

The remote repo has been tagged a lot, and recently.

I'll try "darcs optimize --reorder-patches''.  Is that on the remote
repo, or locally, or both?

T

On 08/02/07, Juliusz Chroboczek <Juliusz.Chroboczek <at> pps.jussieu.fr> wrote:
> Please make sure you regularly tag the remote repo.  If that doesn't
> help, consider using ``darcs optimize --reorder-patches''.
>
>                                         Juliusz
>
>

Gmane