darcs

Patch 312 Slightly fix context generation in Setup.

Title Slightly fix context generation in Setup.
Superseder Nosy List ganesh, kowey, mornfall
Related Issues
Status accepted Assigned To
Milestone

Created on 2010-07-22.11:16:01 by mornfall, last changed 2011-05-10.21:36:15 by darcswatch. Tracked on DarcsWatch.

Files
File name Status Uploaded Type Edit Remove
slightly-fix-context-generation-in-setup_.dpatch mornfall, 2010-07-22.11:16:00 text/x-darcs-patch
unnamed mornfall, 2010-07-22.11:16:00
See mailing list archives for discussion on individual patches.
Messages
msg11820 (view) Author: mornfall Date: 2010-07-22.11:16:00
This produces a valid context regardless of the appropriate release tag being
present. This is only part of a solution though, since the context need not be
minimal... I am afraid that we may need to introduce a darcs optimize --reorder
into Setup to make this mechanism at least somewhat reliable.

The other problem is that the +N patches won't work even then when the tag is
absent. Again, optimize --reorder is needed to make it correct if the
appropriate version tag is out of order, since sadly darcs chan --from-tag
. will only list patches that have landed in the repo after the tag, not
patches that are outside the tag (which is not the same thing).

Yours,
   Petr.

PS: At least we see why people struggle with finding out whether they have the
same repository... The correct sequence is darcs optimize --reorder, darcs
changes --context and compare the context files. Or so it seems...

1 patch for repository http://darcs.net/:

Thu Jul 22 13:14:10 CEST 2010  Petr Rockai <me@mornfall.net>
  * Slightly fix context generation in Setup.
Attachments
msg11821 (view) Author: ganesh Date: 2010-07-22.11:29:38
Petr Rockai wrote:

> This produces a valid context regardless of the appropriate release
> tag being present. This is only part of a solution though, since the
> context need not be minimal... I am afraid that we may need to
> introduce a darcs optimize --reorder into Setup to make this
> mechanism at least somewhat reliable.    

Either that, or add a feature to darcs to get hold of the information
directly (which should be rather cheaper).

> PS: At least we see why people struggle with finding out whether they
> have the same repository... The correct sequence is darcs optimize
> --reorder, darcs changes --context and compare the context files. Or
> so it seems...   

I don't think this is enough if the patches happened to be in a
different order before the tag. The only reliable test I know is to try
push/pull between them.

Ganesh

=============================================================================== 
Please access the attached hyperlink for an important electronic communications disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
===============================================================================
msg11822 (view) Author: kowey Date: 2010-07-22.14:07:38
On Thu, Jul 22, 2010 at 11:16:01 +0000, Petr Ročkai wrote:
> This produces a valid context regardless of the appropriate release tag being
> present.

The example here being darcs 2.4.4 not having the 2.4.4 tag in HEAD
(sigh!)

Slightly fix context generation in Setup.
-----------------------------------------
> -      -- FIXME currently we run changes --from-tag to at least assert that the
> -      -- requested version is tagged in this repository... it is a weak check,
> -      -- but otherwise, my ~/_darcs context tends to gets used when running
> -      -- from an unpacked distribution
> -      rawSystemStdout verbosity "darcs"
> -                          ["changes", "--from-tag", display version ]
> +      inrepo <- doesDirectoryExist "_darcs"
> +      unless inrepo $ fail "Not a repository."

So we relax the check some more.  Applied, thanks!

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, please try +44 (0)1273 64 2905.
msg11823 (view) Author: darcswatch Date: 2010-07-22.14:09:54
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-70f09ede41661fb72747d410b842d9ddac4e447f
msg11824 (view) Author: mornfall Date: 2010-07-22.15:39:50
"Sittampalam, Ganesh" <ganesh.sittampalam@credit-suisse.com> writes:

> Petr Rockai wrote:
>
>> This produces a valid context regardless of the appropriate release
>> tag being present. This is only part of a solution though, since the
>> context need not be minimal... I am afraid that we may need to
>> introduce a darcs optimize --reorder into Setup to make this
>> mechanism at least somewhat reliable.    
>
> Either that, or add a feature to darcs to get hold of the information
> directly (which should be rather cheaper).

The problem with that is that you need to detect system darcs version
and do something else if it's too old, anyway. But I agree it would be
cheaper to have this in darcs proper. It would help in other situations,
too.
msg14350 (view) Author: darcswatch Date: 2011-05-10.21:36:15
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-70f09ede41661fb72747d410b842d9ddac4e447f
History
Date User Action Args
2010-07-22 11:16:01mornfallcreate
2010-07-22 11:17:22darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-70f09ede41661fb72747d410b842d9ddac4e447f
2010-07-22 11:29:38ganeshsetnosy: + ganesh
messages: + msg11821
2010-07-22 14:07:38koweysetnosy: + kowey
messages: + msg11822
2010-07-22 14:09:54darcswatchsetstatus: needs-review -> accepted
messages: + msg11823
2010-07-22 15:39:50mornfallsetmessages: + msg11824
2011-05-10 21:36:15darcswatchsetmessages: + msg14350