Hi list, me again :P
I have a doubt regarding PundleModels: suppose I have a package loaded in an image that is not connected to any repository. Is there any way of finding out what repository that package came from? As far as I can see I can get the database information of all the databases where that package is published and I can also get dbIdentifier if I'm logged to one of those repositories. However what I need to know is where the loaded package came from. Something like: 1. Loaded the package P from repository A. 2. Published P in repository B. 3. Make changes and published as second version of P in repository B. 4. Disconnect from B. So, is there any way of knowing that the version of my image is from B, without actually connecting to B? Thanks in advance, Andrés _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
On Oct 24, 2008, at 12:52 PM, Andres Fortier wrote: > Hi list, me again :P > > I have a doubt regarding PundleModels: suppose I have a package loaded > in an image that is not connected to any repository. Is there any way > of finding out what repository that package came from? As far as I can > see I can get the database information of all the databases where that > package is published and I can also get dbIdentifier if I'm logged to > one of those repositories. However what I need to know is where the > loaded package came from. Something like: > > 1. Loaded the package P from repository A. > 2. Published P in repository B. > 3. Make changes and published as second version of P in repository B. > 4. Disconnect from B. Imaginary (5): Come back sometime later, desire the answer to the question "where did package B come from (go to, as in, most recently published)?" You can only infer what database the package in question came from (or went to) by asking that package for it's databaseInformations: (Registry packageNamed: 'SUnit') databaseInformations detect: [:each | each isChangeSetEmpty] ifNone: [ 'cannot tell'] which will give you back the database information for the last database from which or into which you have loaded or published. If other changes are made, say you published B then modified a method in B, then you can't tell for sure. If you only ever connect to one database, there is no problem, if you use multiple databases, you are limited in what you can discover as just explained. > > > So, is there any way of knowing that the version of my image is from > B, without actually connecting to B? > > Thanks in advance, > Andrés > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Great David, thanks for the tip! It never occurred to me that the
changes for that package should be empty. Cheers, Andrés David Caster escribió: > On Oct 24, 2008, at 12:52 PM, Andres Fortier wrote: > >> Hi list, me again :P >> >> I have a doubt regarding PundleModels: suppose I have a package loaded >> in an image that is not connected to any repository. Is there any way >> of finding out what repository that package came from? As far as I can >> see I can get the database information of all the databases where that >> package is published and I can also get dbIdentifier if I'm logged to >> one of those repositories. However what I need to know is where the >> loaded package came from. Something like: >> >> 1. Loaded the package P from repository A. >> 2. Published P in repository B. >> 3. Make changes and published as second version of P in repository B. >> 4. Disconnect from B. > > Imaginary (5): Come back sometime later, desire the answer to the > question "where did package B come from (go to, as in, most recently > published)?" > > You can only infer what database the package in question came from (or > went to) by asking that package for it's databaseInformations: > > (Registry packageNamed: 'SUnit') databaseInformations > detect: [:each | each isChangeSetEmpty] > ifNone: [ 'cannot tell'] > > which will give you back the database information for the last > database from which or into which you have loaded or published. > > If other changes are made, say you published B then modified a method > in B, then you can't tell for sure. If you only ever connect to one > database, there is no problem, if you use multiple databases, you are > limited in what you can discover as just explained. > >> >> So, is there any way of knowing that the version of my image is from >> B, without actually connecting to B? >> >> Thanks in advance, >> Andrés >> _______________________________________________ >> vwnc mailing list >> [hidden email] >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |