Forums

List concatenation

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Re: List concatenation

Postby Caligari » Sat Apr 18, 2009 4:02 pm

OK, all good now.

After getting your update I still needed to update my svn before the whole thing would run to completion, but that wasn't hard, and it all works now. And of course the test runs as well.

Just by-the-by, I noticed that when my svn was out of date the install process fell over after the new version had been copied into place (and I was able to use it etc.). It had trouble doing the "svn info" because my versions were out of date. It might be an idea to move that check to before the new material is copied into place, to prevent a partial install or an install which hasn't cleaned up after itself fully.

- Caligari
Caligari
 
Posts: 33

Re: List concatenation

Postby Charles » Sun Apr 19, 2009 11:41 am

Would you submit a patch for this?
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: List concatenation

Postby Caligari » Sun Apr 19, 2009 3:15 pm

Just to check: a patch for the string cat, or the svn "install falls over" issue?

And, how do I submit a patch, at the moment. I seem to recall that you had lost patience with Trac?

- Caligari
Caligari
 
Posts: 33

Re: List concatenation

Postby Charles » Sun Apr 19, 2009 4:30 pm

For "install falls over"

I can do the concated assuming you have now found it satisfactory.

I haven't gotten an official update on Trac, but it seems to be responsive now. Please give it a try with a new ticket and upload.

Thanks,
Chuck
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: List concatenation

Postby Caligari » Mon Apr 20, 2009 7:07 am

Created ticket:155, and uploaded patch. I think that covers it all. Let me know if I failed to do something I was meant to do as part of the trac process.

- Caligari
Caligari
 
Posts: 33

Re: List concatenation

Postby Charles » Mon Apr 20, 2009 6:23 pm

IList<of T>.concated has been checked in. The final version is:
extend IList<of T>

def concated(other as IList<of T>?) as IList<of T>
"""
Returns a new list with the contents of this list and the other.
Does not modify this list or the other.
The returned list is the same class as the receiver.
Assumes the receiving type has an initializer that takes a .
"""
ensure
result is not this and result is not other
result.count == .count + if(other, other.count, 0)
result.typeOf is .typeOf
body
type = .typeOf
capacity = .count + if(other, other.count, 0)
newList = type(capacity)
newList.addRange(this)
if other, newList.addRange(other)
return newList
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: List concatenation

Postby Charles » Mon Apr 20, 2009 6:45 pm

Caligari wrote:Created ticket:155, and uploaded patch. I think that covers it all. Let me know if I failed to do something I was meant to do as part of the trac process.

- Caligari

Done. Everything was good except next time leave the ticket open and assign to me (rather than marking it fixed).

Thanks for patching the installer. There are a variety of environments out there so I encourage people to patch it when they have problems that I haven't encountered.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: List concatenation

Postby agustech » Tue Apr 21, 2009 4:07 am

Here it is mine.

Index: InstallFromWorkspace.cobra
===================================================================
--- InstallFromWorkspace.cobra (revision 2028)
+++ InstallFromWorkspace.cobra (working copy)
@@ -486,14 +486,14 @@
process as Process?
versionOutput = .runCommand('svn', 'info', out process, false)
if process.exitCode
- print '"snv info" failed. Check your svn installation.'
+ print '"svn info" failed. Check your svn installation.'
print '[versionOutput]'
print
- .error('Cannot find version information, installation halted.')
+ .warning('Cannot find version information, svn command line version not installed or failed.')
catch ex as SystemException
# user could be on TortoiseSVN
print 'svn is not installed or it is not in the PATH. ', ex.message
- .error('Cannot find version information, installation halted.')
+ .warning('Cannot find version information, svn command line version not installed or failed.')
if versionOutput <> ''
fileName = '[versionDir][slash]Version.text'
print 'writing :', fileName
agustech
 
Posts: 37

Re: List concatenation

Postby Charles » Sat Apr 25, 2009 1:34 am

Applied. Thanks.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Previous

Return to Discussion

Who is online

Users browsing this forum: No registered users and 53 guests