[darcs-users] get vs init+pull (BUG REPORT)

Tomasz Zielonka t.zielonka at students.mimuw.edu.pl
Fri Oct 22 08:08:59 UTC 2004


On Thu, Oct 21, 2004 at 01:36:22PM -0400, Andrew Pimlott wrote:
> On Thu, Oct 21, 2004 at 07:32:51PM +0200, Tomasz Zielonka wrote:
> > Good idea. Fortunately I managed to reproduce the bug with a simple
> > shell script which doesn't use any of my project's files. If you allow
> > me, I will first try to hunt the bug myself. If I fail (in 1-2 days
> > time), I will send the script to the list.
> 
> I will allow you.  :-)

Thanks ;)

OK, I think I've got it but it's too subtle for me to try fixing it.

This bug was introduced/triggered somewhere between 1.0.0rc2 and 1.0.0rc3.  I
think it was triggered by this patch:

    Wed Sep 29 13:06:06 CEST 2004  David Roundy <droundy at abridgegame.org>
      * fix commutation bug with renames and file adds/removals.

but is also related to this patch:

    Wed Sep 29 12:08:01 CEST 2004  David Roundy <droundy at abridgegame.org>
      * fix bug where conflicts weren't marked on pull!

AFAICT, it is a bug in Repository.sift_for_pending possibly related to some bug
in commute. Perhaps sift_for_pending shouldn't use vanilla commute?

If I undo (manually, rollback/unpull was impossible) the patch 'fix bug
where...', or I canonize pw_resolved and pc, the problem goes away, but only in
repos with empty pending, so it's not really a fix.

I've attached the test script and a patch that adds this test
(darcs-tests-ified) to darcs' test suite.

BTW. Should I use darcs reportbug to send the test? What is the purpose
    or reportbug: sending bugtests or bugfixes?

The script first creates repo1, then pulls it into repo2, which will
cause repo2 pending to become:
{
move ./B2 ./B1
move ./B1 ./B2
}

What's interesting is that the bug shows only when the first patch is recorded
in specific order, ie. it doesn't show when you use record --all.

It is possible that the bug also shows in push or apply. It will try to
check this.

Best regards,
Tomasz

-- 
.signature: Too many levels of symbolic links
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.sh
Type: application/x-sh
Size: 427 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20041022/d672dd82/attachment.sh 
-------------- next part --------------

New patches:

[add test for bad pending after pull
Tomasz Zielonka <t.zielonka at students.mimuw.edu.pl>**20041022075617] {
addfile ./tests/bad_pending_after_pull.sh
hunk ./tests/bad_pending_after_pull.sh 1
+#!/bin/sh
+
+set -ev
+
+[ -n "$DARCS" ] || DARCS=$PWD/../darcs
+export EMAIL=tester
+
+rm -fr temp1 temp2
+
+mkdir temp1
+cd temp1
+$DARCS init
+
+echo abc > A
+$DARCS add A
+echo def > B1
+$DARCS add B1
+# $DARCS record -all --patch-name patch1 # this way it doesn't trigger the bug
+while :; do echo y; done | $DARCS record --patch-name patch1
+
+$DARCS mv B1 B2
+$DARCS record --all --patch-name patch2
+cd ..
+
+mkdir temp2
+cd temp2
+$DARCS init
+$DARCS pull --all ../temp1
+$DARCS whatsnew | grep 'No changes'
+cd ..
+
+rm -fr temp1 temp2
+
}



Context:

[make xml changes output the original filename when doing changes on a file.
David Roundy <droundy at abridgegame.org>**20041021120539] 
[add test for rerecord empty patch
Tommy Pettersson <ptp at lysator.liu.se>**20041019191519] 
[use creator hash and original file name in file annotate links
Will <will at glozer.net>**20041020063238] 
[clean up 'use strict' warnings in cgi
Will <will at glozer.net>**20041020060934] 
[don't mmap on windows-semantics filesystems.
David Roundy <droundy at abridgegame.org>**20041019102101] 
[add symlink to tarball as darcs-latest.tar.gz on make dist.
David Roundy <droundy at abridgegame.org>**20041019085945] 
[link to darcs.css stylesheet
Mark Stosberg <mark at summersault.com>**20041018120816] 
[rerecord shouldn't fail when the patch becomes an empty patch.
David Roundy <droundy at abridgegame.org>**20041017124826] 
[darcs init is now silent on success.
David Roundy <droundy at abridgegame.org>**20041017122851] 
[initial test for rerecord
Mark Stosberg <mark at summersault.com>**20041017013403
 I noticed that there appeared to be no tests at all for 'rerecord', so I added a
 very basic one. Now at least if the command is completely broken there will some
 indication from the test suite. 
 
 I did break from convention by coding the test in Perl rather than 'sh'. Perl 
 has a much more flexible and powerful testing system. Since Perl is used in a
 few other places in the project, I thought I could sneak this in here. :)
 I think Perl could be provide a better long term solution for the automated
 test suite. 
 
 I believe I adjusted the Makefile appropriately so this will get run. However,
 I'm having trouble getting my environment set up so that "make test" works at all,
 so I wasn't able to test this.
 
 The test should be easy to translate to a 'sh' script if you want to keep that
 consistency for now. 
 
     Mark
 
] 
[use DIV rather than verbatim when compiling docs to HTML.
David Roundy <droundy at abridgegame.org>**20041017121413] 
[fix option/options typo in docs.
David Roundy <droundy at abridgegame.org>**20041017121319] 
[add style for darcs command option headers
Mark Stosberg <mark at summersault.com>**20041016212736] 
[add extra "options" markers
Mark Stosberg <mark at summersault.com>**20041016210257
 These are used to highlight the places when command options
 are explained in the descriptive text. For the web-based manual
 these could be turned into CSS classes that can be styled,
 and perhaps also HTML anchors.
] 
[improve syntax consistency, add "options" sections
Mark Stosberg <mark at summersault.com>**20041016205515
  - Sometimes it would say the "'compress' flag" and other times:
     "--compress option".
     (with dashes and s/flag/option). I made it consistent.
 
  - Some \begin{option} sections appear as well since darcs thought
    it was the same patch. 
 
 
  
] 
[move extra "--reply" documentation closer to the first chunk. 
Mark Stosberg <mark at summersault.com>**20041016202638] 
[canonize self
Mark Stosberg <mark at summersault.com>**20041016201245] 
[typo fix
Mark Stosberg <mark at summersault.com>**20041016200011] 
[add --creator-hash to annotate.
David Roundy <droundy at abridgegame.org>**20041016184220
 This change is intended to make it possible to fix darcs.cgi behavior when
 there are file renames.  Currently, it's not possible to view with
 darcs.cgi versions of file prior to a rename event.  By specifying the file
 name *when it was created*, we can avoid that difficulty.
] 
[use new darcs.css with manual as well.
David Roundy <droundy at abridgegame.org>**20041016171201] 
[adding darcs.css
Mark Stosberg <mark at summersault.com>**20041016160355
 This is the one stylesheet to unify them all. At least, the intent is that it would be used
 on the main darcs set, the online manual, and the wiki, to unify the darcs
 online presence.
 
] 
[use anonymous file handle for temporary files in darcs.cgi.
David Roundy <droundy at abridgegame.org>**20041016165802] 
[improve error message when push gets a bad repo as argument.
David Roundy <droundy at abridgegame.org>**20041016155515] 
[Add explicit --dont-look-for-adds to tests, because they
simons at cryp.to**20041015150115
 fail if the user has set
 
   whatsnew look-for-adds
 
 in his ~/.darcs/defaults file. "make check" should probably
 ignore this config file altogether.
] 
[IORef is now in Data hierarchy
simons at cryp.to**20041015145538] 
[System.Time exports all this module needs
simons at cryp.to**20041015145524] 
[remove trailing whitespace
simons at cryp.to**20041015145447] 
[foreign exports withArray0
simons at cryp.to**20041015145329] 
[prelude exports elem
simons at cryp.to**20041015145226] 
[don't import bug twice in darcs_cgi.
David Roundy <droundy at abridgegame.org>**20041016144821] 
[add new \begin{options} module to documentation.
David Roundy <droundy at abridgegame.org>**20041016135437] 
[eliminate "David's Advanced Revision Control System" from manual and web page.
David Roundy <droundy at abridgegame.org>**20041016122054] 
[partial docs spruce up to highlight long flag descriptions
Mark Stosberg <mark at summersault.com>**20041016024829
 I can't decide whether this update (if applied to the rest of the docs) would
 really add much. Give it a whirl and let me know. If it seems good, I can work
 on update the rest of the docs.
 
     Mark
 
] 
[remove redundent docs for 'trackdown'
Mark Stosberg <mark at summersault.com>**20041016025325
 The description was how to run 'trackdown' was repeated in slightly different words. I removed
 one copy. 
] 
[add --summary option to commands that accept --dry-run.
David Roundy <droundy at abridgegame.org>**20041015112027] 
[remove vestigial sentence from web page.
David Roundy <droundy at abridgegame.org>**20041015105008] 
[make changes accept --verbose as a synonymn for --summary.
David Roundy <droundy at abridgegame.org>**20041014120604] 
[add 'cvs -n update' equivalence
mark at summersault.com**20041014030202
 I use '-n update' nearly as much as plain 'update', so I thought this was worth including for reference. 
] 
[bring ChangeLog up to date.
David Roundy <droundy at abridgegame.org>**20041014114923] 
[don't accept newlines in patch names.
David Roundy <droundy at abridgegame.org>**20041014114833] 
[quote conflict attribute values in xml output
Will <will at glozer.net>**20041013161333] 
[clarify that boringfile is a repository path
andrew at pimlott.net**20041012205127] 
[fix bug where new files didn't show up in darcs diff.
David Roundy <droundy at abridgegame.org>**20041013111107] 
[fix bug in slurp_recorded_and_unrecorded when called from a different directory.
David Roundy <droundy at abridgegame.org>**20041013110922] 
[make pull prompt for confirmation when there is a conflict with unrecorded changes.
David Roundy <droundy at abridgegame.org>**20041013111327] 
[make unrevert interactive.
David Roundy <droundy at abridgegame.org>**20041012111740] 
[Fix compilation errors if HAVE_MAPI and HAVE_CURSES are both unset
mklooster at baan.nl**20041011095851] 
[update ChangeLog a bit.
David Roundy <droundy at abridgegame.org>**20041011111827] 
[don't try to generate a new name on get if name was given explicitely.
David Roundy <droundy at abridgegame.org>**20041010123829] 
[fixed a bug in changes --from-tag.
David Roundy <droundy at abridgegame.org>**20041010123136] 
[when remaking website, also remake docs.
David Roundy <droundy at abridgegame.org>**20041010105157] 
[Beatify, er, canonise myself in authors.hs.
Juliusz Chroboczek <jch at pps.jussieu.fr>**20041009171340] 
[always mark conflicts, even if there's an obvious solution.
David Roundy <droundy at abridgegame.org>**20041009115131] 
[when rerecording conflicted patch, remove the conflict.
David Roundy <droundy at abridgegame.org>**20041009104906] 
[when matching patch names, include "UNDO: " in rolled-back patches.
David Roundy <droundy at abridgegame.org>**20041008111510] 
[handle better the case where unrevert context doesn't make sense.
David Roundy <droundy at abridgegame.org>**20041008104452] 
[remove unused read_patch function.
David Roundy <droundy at abridgegame.org>**20041007120450] 
[have cgi preserve whitespace in comments
Will <will at glozer.net>**20041007181910] 
[make cgi stylesheet location configurable
Will <will at glozer.net>**20041007180619] 
[add new slurp_recorded_and_unrecorded function.
David Roundy <droundy at abridgegame.org>**20041007120513] 
[Clean up stringify calls in configure.ac (take 3)
Taral <taral at taral.net>**20041005173835] 
[Clean up SignalHandler.lhs warnings
Taral <taral at taral.net>**20041005172302] 
[Clean up External.hs warnings
Taral <taral at taral.net>**20041005172251] 
[Use -Werror
Taral <taral at taral.net>**20041004190657] 
[make clean didn't remove authors executable
ijones at debian.org**20041005031319] 
[fix linking problem with --disable-optimize
Tomasz Zielonka <t.zielonka at students.mimuw.edu.pl>**20041005075950] 
[fix overwriting of c_context.c in tarball source.
David Roundy <droundy at abridgegame.org>**20041005112445] 
[Add RTSFLAGS to GNUmakefile
Taral <taral at taral.net>**20041004192542] 
[Clean up Patch.lhs warnings (take 2)
Taral <taral at taral.net>**20041004192505] 
[Make stringify put string in .rodata
Taral <taral at taral.net>**20041004190637] 
[fix replace documentation.
David Roundy <droundy at abridgegame.org>**20041005111328] 
[really fix newlines in whatsnew -u
andrew at pimlott.net**20041005030757] 
[fix bug in defaults processing of options with -- in them.
David Roundy <droundy at abridgegame.org>**20041005105533] 
[more win32 build fixes
Will <will at glozer.net>**20041004173323] 
[Make clear author can be a commented email address.
Ralph Corderoy <ralph at inputplus.co.uk>**20041004120404
 I didn't realise that I could enter a commented email address when
 prompted.  Hence my authors.hs addition to fix up my existing patches.
 These documentation and prompt changes try to avoid this for others.
] 
[Remove unused var in Tag.lhs
Taral <taral at taral.net>**20041003162732] 
[Clean up FastPackedString.hs warnings
Taral <taral at taral.net>**20040928232322] 
[Clean up Context.lhs warnings
Taral <taral at taral.net>**20040928232212] 
[Move file-specific options out of GNUmakefile
Taral <taral at taral.net>**20040928224635] 
[can't make AUTHORS in predist, since history isn't available.
David Roundy <droundy at abridgegame.org>**20041004105119] 
[fix win32 build problem
Will <will at glozer.net>**20041003213706] 
[TAG 1.0.0rc3
David Roundy <droundy at abridgegame.org>**20041003114608] 

Patch bundle hash:
7c89fd808d5f0e548256839216b3724814bb693f


More information about the darcs-users mailing list