darcs

Issue 2403 darcs rebase pull --reorder crashes in src/Darcs/Patch/Depends.hs:275

Title darcs rebase pull --reorder crashes in src/Darcs/Patch/Depends.hs:275
Priority bug Status resolved
Milestone Resolved in 2.10.0
Superseder Nosy List alex.aegf, ganesh, gh
Assigned To alex.aegf
Topics

Created on 2014-07-09.00:28:44 by alex.aegf, last changed 2014-11-03.19:38:57 by noreply.

Messages
msg17594 (view) Author: alex.aegf Date: 2014-07-09.00:28:43
1. Summarise the issue (what were doing, what went wrong?)
Doing "darcs rebase pull --reorder" fails with the following message:

"
Rebase finished!
darcs: bug at src/Darcs/Patch/Depends.hs:275 compiled Jul  8 2014 21:04:39
Impossible case at src/Darcs/Patch/Depends.hs:275 compiled Jul  8 2014 21:04:39
See http://wiki.darcs.net/BugTracker/Reporting for help on bug reporting.
"

As the error report says, it seems that the impossible happend
in the function commuteToEnd. But before to comment more about
that I have a questions;

- Can the unique identifier of a path change? (respecting the uniqueness, of course)

Because after thinking a while and make some tests I realized that
the pattern matching that should be successful in commuteToEnd it
isn't;

| commuteToEnd (p :<: ps) (PatchSet xs ts) | info p `elem` mapRL info xs = ...

because it seems that when checking that a patch p is in the patchset xs,
p effectively is in xs but with a different unique identifier, so as we
are comparing info's;

info p `elem` mapRL info xs == False

This happend when p is the: 

DO NOT TOUCH: Rebase patch
.
.
.

2. What behaviour were you expecting instead?
The expected behavior should be, make rebase pull and moves to the top
the uncommon set of patches between the current repository and remote
repository.

3. What darcs version are you using? (Try: darcs --exact-version)
darcs-2.9.9 (+ 70 patches)

4. What operating system are you running?
Ubuntu 14.04 LTS 64bits
msg17735 (view) Author: noreply Date: 2014-11-03.19:38:55
The following patch sent by Ganesh Sittampalam <ganesh@earth.li> updated issue issue2403 with
status=resolved;resolvedin=2.10.0 HEAD

* resolve issue2403: need to avoid moving the rebase patch to the end 
Ignore-this: ba2cab618173357056ef8ef071409137

This bug is a pretty good example of why the "rebase internal patch" is a rather
nasty hack - see 'Note [Rebase representation]' in src/Darcs/Patch/Rebase.hs
History
Date User Action Args
2014-07-09 00:28:44alex.aegfcreate
2014-11-03 19:38:57noreplysetstatus: unknown -> resolved
messages: + msg17735
resolvedin: 2.10.0