Re: Usher pattern matching (was Re: [Monotone-devel] Usher crashes)

2006-05-14 Thread Jeronimo Pellegrini
On Sat, May 13, 2006 at 11:19:19PM -0500, Timothy Brownawell wrote:
 On Sat, 2006-05-13 at 23:29 -0300, Jeronimo Pellegrini wrote:
  And even if I try to make it match against pattern, it fails,
  because of the way operator== works for struct prefix. Is this
  intentional? Shouldn't it also do partial matches?
 
 It should, and I think now it does.

Yes! It works now. :-)

 As you can probably tell, this hasn't exactly had extensive testing
 since being reorganized. ;-p

That's OK -- we're testing it.
Thanks for writing usher -- it's very useful!

J.


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Re: Usher pattern matching (was Re: [Monotone-devel] Usher crashes)

2006-05-13 Thread Timothy Brownawell
On Sat, 2006-05-13 at 23:29 -0300, Jeronimo Pellegrini wrote:
 OK, I'll compile the problems I found before:
 
  If I use:
 
  server main
  host localhost
  pattern info.aleph0
  local -d /home/jeronimo/monotone/main.db *
 
  And try to sync brahch   info.aleph0.my_branch
 
 It won't work.
 
  Neither if I try:
  pattern info.aleph0.*
 
  But if I use:
  pattern info.aleph0.my_branch
 
 It works, but only if I fix line 185 of server_manager::connect_to_server
 where it  matches pattern against host:
 
 if (!srv  !pattern.empty()  !by_pattern.empty())
 {
   i = by_pattern.lower_bound(pattern);
   if (i != by_pattern.end()  i-first == prefix(host))
   

Um, that should be fixed now.

 And even if I try to make it match against pattern, it fails,
 because of the way operator== works for struct prefix. Is this
 intentional? Shouldn't it also do partial matches?

It should, and I think now it does.

As you can probably tell, this hasn't exactly had extensive testing
since being reorganized. ;-p

Tim




___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel