Re: [COMPRESS] Changeset design

2009-04-19 Thread Christian Grobmeier
Hi, I made several changes. - two files with the same name cannot added to the ChangeSet - An "add change" command can have a replace = true or replace = false flag. If true, the add will be added to the stream first. Equal entries from the stream will be skipped. If false, the stream entrie will

Re: [COMPRESS] Changeset design

2009-04-16 Thread Christian Grobmeier
>> I just added testDeletePlusAddSame() and found out that it works like >>  expected (removes file A and adds file B under the same name as file >>  A). > > However, it does not work exactly the same as Add then Delete, because > that removes all trace of the Add from the Set. Yes. If you make A

Re: [COMPRESS] Changeset design

2009-04-16 Thread sebb
On 16/04/2009, Christian Grobmeier wrote: > Hi, > > > >> Did you see ChangeSetTest.testDeletePlusAdd() ? > > > > Yes. > > > >> Is this what you want? > > > > No, because the delete and add are for different items. > > > I just added testDeletePlusAddSame() and found out that it works like

Re: [COMPRESS] Changeset design

2009-04-15 Thread Christian Grobmeier
Hi, >> Did you see ChangeSetTest.testDeletePlusAdd() ? > > Yes. > >>  Is this what you want? > > No, because the delete and add are for different items. I just added testDeletePlusAddSame() and found out that it works like expected (removes file A and adds file B under the same name as file A). H

Re: [COMPRESS] Changeset design

2009-04-15 Thread sebb
On 15/04/2009, Christian Grobmeier wrote: > > If there is a usecase for add then delete, then it seems to me that > > there is likely to be a use case for delete then add. The current code > > only supports the former. > > > Did you see ChangeSetTest.testDeletePlusAdd() ? Yes. > Is this what

Re: [COMPRESS] Changeset design

2009-04-15 Thread Christian Grobmeier
> If there is a usecase for add then delete, then it seems to me that > there is likely to be a use case for delete then add. The current code > only supports the former. Did you see ChangeSetTest.testDeletePlusAdd() ? Is this what you want? >>  Then there is the case, that you want to replace an

Re: [COMPRESS] Changeset design

2009-04-15 Thread sebb
On 15/04/2009, Christian Grobmeier wrote: > Usecase was: > - File A is added > - something else > - File A is deleted, cause the system has another state now. > > File A must noot be added at all, so delete it from the current > ChangeSet and leave it for deletions of an existing stream. I am

Re: [COMPRESS] Changeset design

2009-04-15 Thread Christian Grobmeier
Usecase was: - File A is added - something else - File A is deleted, cause the system has another state now. File A must noot be added at all, so delete it from the current ChangeSet and leave it for deletions of an existing stream. I am not sure if there is a Usecaase for this. Definitly it would

[COMPRESS] Changeset design

2009-04-15 Thread sebb
The Changeset design seems to me to be a bit assymetric at present. ADD changes are just added to the Set of changes; however if a DELETE is requested, then the existing set is scanned for matching additions and any such are deleted. I'm not sure that is very useful - why would an application wan