|  | 
 | 
Created on 2006-08-05.17:23:51 by ppessi, last changed 2009-08-27.13:49:28 by admin. 
 |
 
  | File name | Uploaded | Type | Edit | Remove |  
  | darcs-bug-replace | ppessi,
   2006-08-05.17:23:49 | application/octet-stream |  |  |  
 
  
   | msg855 (view) | Author: ppessi | Date: 2006-08-05.17:23:49 |  |  
   | It looks like there is some problems with darcs replace when
token-chars contains odd characters. darcs replace exits with 0 but
nothing is shown with whatis. The previous replace changes are lost,
too. The darcs versions tested are home-brewn darcs-1.0.7 and
statically linked 1.0.8 downloaded from the net.
A shell script demonstrating problem is attached.   Here is an example run:
$ ./darcs-bug-replace
+ darcs add foo.c foo.xml
+ darcs record --all -mAdded foo.c foo.xml
Recording changes in "foo.c" "foo.xml":
Finished recording patch 'Added'
+ darcs replace foo fuu foo.c
+ darcs w
{
replace ./foo.c [A-Za-z_0-9] foo fuu
}
+ darcs replace X XX foo.xml --token-chars '[a-zA-Z_0-9$]'
+ darcs w
{
replace ./foo.c [A-Za-z_0-9] foo fuu
replace ./foo.xml [a-zA-Z_0-9$] X XX
}
+ darcs replace ' X ' ' XX ' --token-chars '[ X]' foo.xml
+ darcs w
No changes!
Exit 1
The expected results would be that the third darcs either adds the
replace change or complains about weird token-chars then exits with
non-zero value. Previous replaces should not be lost.Attachments |  
   | msg856 (view) | Author: tommy | Date: 2006-08-05.19:31:54 |  |  
   | On Sat, Aug 05, 2006 at 05:23:52PM +0000, Pekka Pessi wrote:
> The expected results would be that the third darcs either adds the
> replace change or complains about weird token-chars then exits with
> non-zero value. Previous replaces should not be lost.
Replace does not work if one of the tokens contains a space. Hm,
I thought this bug was fixed long ago, but maybe it's not. Darcs
would create a wrongly formated patch in pending when tokens
contain spaces, but I think it only made the replace show up as
hunks instead. Well, I'm familiar with this piece of code and
can take a look at it tomorrow, unless anyone beats me to it.  :-) |  
   | msg1778 (view) | Author: tommy | Date: 2007-06-29.19:48:56 |  |  
   | fixed in 1.0.9 |  |
 
| Date | User | Action | Args |  | 2006-08-05 17:23:51 | ppessi | create |  |  | 2006-08-05 19:31:59 | tommy | set | status: unread -> unknown nosy:
  droundy, tommy, ppessi
 messages:
  + msg856
 |  | 2006-11-17 13:05:20 | tommy | set | status: unknown -> resolved-in-unstable nosy:
  + kowey
 |  | 2007-06-29 19:48:56 | tommy | set | status: resolved-in-unstable -> resolved nosy:
  + beschmi
 messages:
  + msg1778
 |  | 2009-08-06 17:48:30 | admin | set | nosy:
  + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, dagit, mornfall, simon, thorkilnaur, - droundy, ppessi |  | 2009-08-06 20:51:12 | admin | set | nosy:
  - beschmi |  | 2009-08-10 21:54:06 | admin | set | nosy:
  + ppessi, - markstos, darcs-devel, zooko, jast, dagit, Serware, mornfall |  | 2009-08-25 18:00:21 | admin | set | nosy:
  + darcs-devel, - simon |  | 2009-08-27 13:49:28 | admin | set | nosy:
  tommy, kowey, darcs-devel, ppessi, thorkilnaur, dmitry.kurochkin | 
 |