[darcs-devel] [issue215] darcs reports a bug in darcs, "pending has conflicts"

Georg Bauhaus bugs at darcs.net
Mon Jul 3 13:53:19 PDT 2006


New submission from Georg Bauhaus <bauhaus at arcor.de>:

Hi,

I was moving files around. Looking at whatsnew -s I noticed that
the trunk/test subdirectory was marked 'R'. This was a surprise
as I had thought I had added the directory, and had
moved a file to trunk/test. However, this might have come
late.

Anyway, here is as much of the session as I could
recover, and the file pending_buggy. I'll have a snapshot of
the directory, in case it's of some use.

Thanks for darcs.

Georg

----------
files: darcs-bug-session-20060225.txt, pending_buggy
messages: 752
nosy: bauhaus, droundy, tommy
status: unread
title: darcs reports a bug in darcs, "pending has conflicts"

____________________________________
Darcs issue tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue215>
____________________________________
-------------- next part --------------
{
move ./trunk/test_binsearch.ada ./trunk/test
hunk ./trunk/ada_tok.adb 1
-with Ada.Strings.Wide_Maps.Wide_Constants;
-package Ada_Tok is
-   -- Description of Ada tokens, and tokenization
-
-   use Ada.Strings.Wide_Maps;
-
-   -- some characters are covered by Ada 95 character sets
-   -- already. Add at least some more.
-
-   greek_letters: constant WIDE_CHARACTER_SET :=
-     to_set(WIDE_CHARACTER_RANGES'
-            (WIDE_CHARACTER_RANGE'(WIDE_CHARACTER'val(16#03B1#),
-                                   WIDE_CHARACTER'val(16#03C9#)),
-             -- greek small letters
-
-             WIDE_CHARACTER_RANGE'(WIDE_CHARACTER'val(16#0391#),
-                                   WIDE_CHARACTER'val(16#03A9#))
-               -- greek capital letters
-            ));
-
-   letters: constant WIDE_CHARACTER_SET :=
-     -- Letters occuring in identifiers.  Some of the non-ASCII
-     -- characters are included. The intent is to include at least
-     -- those that are used somewhere in wikibook-ada.
-
-     Wide_Constants.letter_set
-     or to_set(WIDE_CHARACTER_RANGE'(WIDE_CHARACTER'val(16#0100#),
-                                     WIDE_CHARACTER'val(16#017E#)))
-                 -- some more European characters
-     or greek_letters;
-
-   digit: constant WIDE_CHARACTER_SET :=
-     -- characters occuring in numeric literals
-     to_set("0123456789#aAbBcCdDeEfF");
-
-   identifier: constant WIDE_CHARACTER_SET :=
-      --  a span of characters making up either a number or an identfier
-      letters or digit or to_set("_");
-
-   -- NOTE: `delimiter_1` must include `operator_1`
-
-   operator_1: constant WIDE_CHARACTER_SET :=
-      -- single character operators
-      to_set("&*+/<=>-");
-
-   operator_2: constant array(1..4) of WIDE_STRING(1..2) :=
-      -- two-character operators
-      ("**", ">=", "<=", "/=");
-
-   delimiter_1: constant WIDE_CHARACTER_SET :=
-      -- single character delimiters
-      to_set("&'()*+,./:;<=>|!-");
-
-   delimiter_2:  constant array(1..10) of WIDE_STRING(1..2) :=
-      -- two-character delimiters
-     (">=", "..", "**", ":=",
-      "/=", ">=", "<=",
-      "<<", ">>", "<>");
-
-
-end Ada_Tok;
rmfile ./trunk/ada_tok.adb
hunk ./trunk/has.bdy 1
-with Ada.Text_IO;
-with binary_search;
-function binary_search_s(es: SORTED_LIST; item: ELEMENT) return BOOLEAN is
-      mid: constant INDEX := (es'first + es'last) / 2;
-   begin
-      if es'length = 0 then
-         return False;
-      elsif es'length = 1 then
---         Ada.Text_IO.put_line("return with value of es(es'last) = item:"
---            & BOOLEAN'image(es(es'last) = item)
---            & " at"
---            & INDEX'image(es'first));
-         return es(es'last) = item;
-      elsif es(mid) < item then
-         return binary_search_s(es(INDEX'succ(mid) .. es'last), item);
-      else
-         return binary_search_s(es(es'first .. mid), item);
-      end if;
-   end binary_search_s;
rmfile ./trunk/has.bdy
hunk ./trunk/has.spc 1
-generic
-   type INDEX is range <>;  -- for simplicity, include only integer types
-   type ELEMENT is private;
-   type SORTED_LIST is array(INDEX range <>) of ELEMENT;
-   with function "<"(a, b: ELEMENT) return BOOLEAN is <>;
-   with function "="(a, b: ELEMENT) return BOOLEAN is <>;
-function binary_search_s(es: SORTED_LIST; item: ELEMENT) return BOOLEAN;
-   -- ! post: `item` is present in `es`
-
-
rmfile ./trunk/has.spc
addfile ./trunk/test/asnip-test_kw_search.ada
addfile ./trunk/test/asnip-testing.bdy
addfile ./trunk/test/asnip-testing.spc
addfile ./trunk/test/driver.ada
addfile ./trunk/test/test_binsearch.ada
adddir ./trunk/test
addfile ./trunk/test/asnip-test_kw_search.ada
}
-------------- next part --------------
--      if container'length = 0 then
--         return False;
--      else
--         j := container'first;
--         k := container'last;
--         -- ! assert j <= k
--         mid := (j + k) / 2;
--         while j < k loop
--            if container(mid) < item then
--               j := INDEX'succ(mid);
--            else
--               k := mid;
--            end if;
--            mid := (j + k) / 2;
--         end loop;
--         -- ! assert: j = k
--         return container(k) = item;
--      end if;
--   end binary_search;



E:\work\src\ASnip>darcs whatsnew -s
 ./trunk/test_binsearch.ada -> ./trunk/test
R ./trunk/ada_tok.adb
M ./trunk/asnip-ada_language.bdy -14 +52
M ./trunk/asnip-ada_language.spc -15 +75
M ./trunk/asnip-support.ada -5 +25
M ./trunk/binary_search.bdy -6 +10
R ./trunk/test

E:\work\src\ASnip>dir trunk\ada_tok.adb
 Datenträger in Laufwerk E: ist windows work
 Datenträgernummer: 849E-5650

 Verzeichnis von E:\work\src\ASnip\trunk

Datei nicht gefunden

E:\work\src\ASnip>darcs remove trunk\ada_tok.adb

E:\work\src\ASnip>darcs whatsnew -s
 ./trunk/test_binsearch.ada -> ./trunk/test
R ./trunk/ada_tok.adb
M ./trunk/asnip-ada_language.bdy -14 +52
M ./trunk/asnip-ada_language.spc -15 +75
M ./trunk/asnip-support.ada -5 +25
M ./trunk/binary_search.bdy -6 +10
R ./trunk/test

E:\work\src\ASnip>darcs remove trunk\ada_tok.spc

darcs failed:  Can't remove trunk/ada_tok.spc

E:\work\src\ASnip>dir trunk
 Datenträger in Laufwerk E: ist windows work
 Datenträgernummer: 849E-5650

 Verzeichnis von E:\work\src\ASnip\trunk

25.02.2006  20:34       <DIR>          .
25.02.2006  20:34       <DIR>          ..
25.02.2006  20:18                1.465 asnip-ada_language.bdy
25.02.2006  20:34                5.793 asnip-ada_language.spc
20.02.2006  01:12                   98 asnip-config.spc
25.02.2006  20:23                  994 asnip-support.ada
25.02.2006  17:04                  629 asnip-tok.spc
24.02.2006  02:26                  530 asnip.ads
25.02.2006  20:41                2.579 binary_search.bdy
24.02.2006  14:40                  497 binary_search.spc
24.02.2006  11:23                  713 has.bdy
24.02.2006  11:22                  408 has.spc
25.02.2006  14:21       <DIR>          test
25.02.2006  20:30       <DIR>          _BK
              10 Datei(en)         13.706 Bytes
               4 Verzeichnis(se),  82.400.114.688 Bytes frei

E:\work\src\ASnip>darcs add trunk\*.bdy
The following files are already in the repository;
note that to ensure portability we don't allow
files that differ only in case. Use --case-ok to override this:
trunk/has.bdy
trunk/binary_search.bdy
trunk/asnip-ada_language.bdy

darcs failed:  No files were added

E:\work\src\ASnip>darcs whatsnew -s
 ./trunk/test_binsearch.ada -> ./trunk/test
R ./trunk/ada_tok.adb
M ./trunk/asnip-ada_language.bdy -14 +52
M ./trunk/asnip-ada_language.spc -15 +75
M ./trunk/asnip-support.ada -5 +25
M ./trunk/binary_search.bdy -6 +10
R ./trunk/test

E:\work\src\ASnip>darcs -n add trunk\*.spc

darcs failed:  Invalid command '-n'!

Usage: darcs COMMAND ...

Commands:
Changing and querying the working copy:
  add           Add one or more new files or directories.
  remove        Remove one or more files or directories from the repository.
  mv            Move/rename one or more files or directories.
  replace       Replace a token with a new value for that token.
  revert        Revert to the recorded version (safe the first time only).
  unrevert      Undo the last revert (may fail if changes after the revert).
  whatsnew      Display unrecorded changes in the working copy.
Copying changes between the working copy and the repository:
  record        Save changes in the working copy to the repository as a patch.
  unrecord      Remove recorded patches without changing the working copy.
  amend-record  Replace a recorded patch with a better version.
  resolve       Mark any conflicts to the working copy for manual resolution.
Direct modification of the repository:
  tag           Tag the contents of the repository with a version name.
  setpref       Set a value for a preference (test, predist, ...).
  rollback      Record an inverse patch without changing the working directory.
Querying the repository:
  diff          Create a diff between two versions of the repository.
  changes       Gives a changelog-style summary of the repo history.
  annotate      Display which patch last modified something.
  dist          Create a distribution tarball.
  trackdown     Locate the most recent version lacking an error.
  query         Query information which is stored by darcs.
Copying patches between repositories with working copy update:
  pull          Copy and apply patches from another repository to this one.
  unpull        Opposite of pull; unsafe if the patch is not in remote repo.
  obliterate    Delete selected patches from the repository. (UNSAFE!)
  push          Copy and apply patches from this repository to another one.
  send          Send by email a bundle of one or more patches.
  apply         Apply patches (from an email bundle) to the repository.
  get           Create a local copy of another repository.
  put           Makes a copy of the repository
Administrating repositories:
  initialize    Initialize a new source tree as a darcs repository.
  optimize      Optimize the repository.
  check         Check the repository for consistency.
  repair        Repair the corrupted repository.

Use 'darcs --extended-help' for more detailed help.
Use 'darcs COMMAND --help' for help on a single command.
Use 'darcs --version' to see the darcs version number.
Use 'darcs --exact-version' to get the exact version of this darcs instance.

Report bugs to bugs at darcs.net or via http://bugs.darcs.net/.


E:\work\src\ASnip>darcs  add trunk\*.spc
The following files are already in the repository;
note that to ensure portability we don't allow
files that differ only in case. Use --case-ok to override this:
trunk/has.spc
trunk/binary_search.spc
trunk/asnip-tok.spc
trunk/asnip-config.spc
trunk/asnip-ada_language.spc

darcs failed:  No files were added

E:\work\src\ASnip>dir trunk\*has*
 Datenträger in Laufwerk E: ist windows work
 Datenträgernummer: 849E-5650

 Verzeichnis von E:\work\src\ASnip\trunk

24.02.2006  11:23                  713 has.bdy
24.02.2006  11:22                  408 has.spc
               2 Datei(en)          1.121 Bytes
               0 Verzeichnis(se),  82.400.114.688 Bytes frei

E:\work\src\ASnip>darcs remove trunk\*has*

E:\work\src\ASnip>darcs whatsnew -s
 ./trunk/test_binsearch.ada -> ./trunk/test
R ./trunk/ada_tok.adb
M ./trunk/asnip-ada_language.bdy -14 +52
M ./trunk/asnip-ada_language.spc -15 +75
M ./trunk/asnip-support.ada -5 +25
M ./trunk/binary_search.bdy -6 +10
R ./trunk/has.bdy
R ./trunk/has.spc
R ./trunk/test

E:\work\src\ASnip>darcs add trunk\test\*.ada
The following directory is already in the repository;
note that to ensure portability we don't allow
files that differ only in case. Use --case-ok to override this:
trunk/test

E:\work\src\ASnip>darcs whatsnew -s
 ./trunk/test_binsearch.ada -> ./trunk/test
R ./trunk/ada_tok.adb
M ./trunk/asnip-ada_language.bdy -14 +52
M ./trunk/asnip-ada_language.spc -15 +75
M ./trunk/asnip-support.ada -5 +25
M ./trunk/binary_search.bdy -6 +10
R ./trunk/has.bdy
R ./trunk/has.spc
R ./trunk/test
A ./trunk/test/asnip-test_kw_search.ada
A ./trunk/test/driver.ada
A ./trunk/test/test_binsearch.ada

E:\work\src\ASnip>dir trunk\test
 Datenträger in Laufwerk E: ist windows work
 Datenträgernummer: 849E-5650

 Verzeichnis von E:\work\src\ASnip\trunk\test

25.02.2006  14:21       <DIR>          .
25.02.2006  14:21       <DIR>          ..
25.02.2006  14:46                1.343 asnip-testing.bdy
25.02.2006  14:20                  187 asnip-testing.spc
25.02.2006  14:18                1.157 asnip-test_kw_search.ada
25.02.2006  14:43                  230 driver.ada
24.02.2006  14:51                1.533 test_binsearch.ada
               5 Datei(en)          4.450 Bytes
               2 Verzeichnis(se),  82.400.114.688 Bytes frei

E:\work\src\ASnip>darcs add trunk\test\asnip-testing.*
The following directory is already in the repository;
note that to ensure portability we don't allow
files that differ only in case. Use --case-ok to override this:
trunk/test

E:\work\src\ASnip>darcs whatsnew -s
 ./trunk/test_binsearch.ada -> ./trunk/test
R ./trunk/ada_tok.adb
M ./trunk/asnip-ada_language.bdy -14 +52
M ./trunk/asnip-ada_language.spc -15 +75
M ./trunk/asnip-support.ada -5 +25
M ./trunk/binary_search.bdy -6 +10
R ./trunk/has.bdy
R ./trunk/has.spc
R ./trunk/test
A ./trunk/test/asnip-test_kw_search.ada
A ./trunk/test/asnip-testing.bdy
A ./trunk/test/asnip-testing.spc
A ./trunk/test/driver.ada
A ./trunk/test/test_binsearch.ada

E:\work\src\ASnip>darcs record
move ./trunk/test_binsearch.ada ./trunk/test
Shall I record this patch? (1/?) [ynWsfqadjkc], or ? for help:
What is the patch name? Ada language description and reserved word membership te
st
Do you want to add a long comment? [yn]
darcs: takeFile ./trunk/test/asnip-test_kw_search.ada-0 in E:/work/src/ASnip/_da
rcs/current: does not exist (No such file or directory)


E:\work\src\ASnip>dir darcs add trunk/test/asnip-test_kw*
Parameterformat nicht korrekt - "est".

E:\work\src\ASnip>dir darcs add trunk\test\asnip-test_kw*
 Datenträger in Laufwerk E: ist windows work
 Datenträgernummer: 849E-5650

 Verzeichnis von E:\work\src\ASnip


 Verzeichnis von E:\work\src\ASnip

Datei nicht gefunden

 Verzeichnis von E:\work\src\ASnip\trunk\test

25.02.2006  14:18                1.157 asnip-test_kw_search.ada
               1 Datei(en)          1.157 Bytes
               0 Verzeichnis(se),  82.400.112.640 Bytes frei

E:\work\src\ASnip>dir trunk\test
 Datenträger in Laufwerk E: ist windows work
 Datenträgernummer: 849E-5650

 Verzeichnis von E:\work\src\ASnip\trunk\test

25.02.2006  14:21       <DIR>          .
25.02.2006  14:21       <DIR>          ..
25.02.2006  14:46                1.343 asnip-testing.bdy
25.02.2006  14:20                  187 asnip-testing.spc
25.02.2006  14:18                1.157 asnip-test_kw_search.ada
25.02.2006  14:43                  230 driver.ada
24.02.2006  14:51                1.533 test_binsearch.ada
               5 Datei(en)          4.450 Bytes
               2 Verzeichnis(se),  82.400.112.640 Bytes frei

E:\work\src\ASnip>darcs add trunk/test/asnip-test_kw*
Yikes, pending has conflicts!
darcs: bug in darcs!
There was an attempt to write an invalid pending!
If possible, please send the contents of _darcs/patches/pending_buggy
along with a bug report.
Please report this to bugs at darcs.net
If possible include the output of 'darcs --exact-version'.

E:\work\src\ASnip>


More information about the darcs-devel mailing list