commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Grobmeier" <grobme...@gmail.com>
Subject Re: [compress] First version of ChangeSet design
Date Mon, 12 Jan 2009 06:35:06 GMT
Well. Looks like archivers can handle empty files. But this just
modifies slightly the testcases below, just wanted to tell

Christian

On Mon, Jan 12, 2009 at 7:32 AM, Christian Grobmeier
<grobmeier@gmail.com> wrote:
> On Sun, Jan 11, 2009 at 6:36 PM, Torsten Curdt <tcurdt@apache.org> wrote:
>>> OK, please feel free to give me your ideas here. I gladly refactor the
>>> code now, before it becomes to big.
>>
>> I've already removed the worker  :)
>
> Yes, just checked it. I'll sound like the guys at "who want to be a
> millionaire", but this came to my mind after you said you didn't like
> the worker. :-)
>
> About the testcases. I think, that
>
> "Also the question whether we should simplify changes before we apply them
> add test.txt
> mv test.txt test2.txt
> What will that it be? It's obvious it's the same as just
> add test2.txt
> but we would have to merge this in the changeset."
>
> We currently have no mv in the ChangeSet and I would propose that we
> start with delete and add operations (testcases below) for version
> 0.1.
>
> "Also how do we deal with directories?
> delete dir1
> add dir1/test.txt
>
> mv dir1/test.text dir2/test.txt
> delete dir1"
>
> In a TAR file, you have to delete all files with dir1 in name, if you
> do a delete dir1. Means, you do a "dir1/*".  If I remember right, I
> don't know a single archiver who can handle empty folders. ZIP can't
> and TAR can't too. I am unsure about AR and CPIO, but I guess it's the
> same here cause it's similar to tar.
>
> OK. Some testcases:
>
> 1) delete dir1
> Should result in delete dir1/*
>
> 2) delete dir1 + add dir1/test.txt
> Should delete dir1/* and add dir1/test.txt at the end
>
> 3) add dir1/test.txt + delete dir1
> Should add dir1/test.txt and delete it afterwards. However, here we
> need some merger stuff. I think we can surpress the add operation if
> there is a delete operation for this dir.
>
> 4) mv dir1/test.text dir2/test.txt + delete dir1"
> Moves the file to dir2 and deletes everything in dir1
>
> 5) add dir1/bla.txt + mv dir1/test.text dir2/test.txt + delete dir1"
> Add dir1/bla.txt should be surpressed. All other dir1 files will be
> deleted, except dir1/test.text will be moved
>
> 6) delete dir1 + add dir1/bla.txt
> Like in every shell, I would think that this would delete all dir1/*
> files first, and then adds a new file bla.txt in dir1.
>
> 7) delete dir1 + add dir1/bla.txt + delete dir1
> Deletes dir1/* first, then surpresses the add of bla.txt cause there
> is a delete operation later.
>
> All for now :-)
> Cheers
> Chris.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message