[darcs-devel] [issue1325] darcs does not forget an adddir if you delete the directory before recording it

Marco Túlio Gontijo e Silva bugs at darcs.net
Sun Aug 30 14:25:29 UTC 2009


Marco Túlio Gontijo e Silva <marcot at holoscopio.com> added the comment:

Hi Eric.

Em Ter, 2009-08-25 às 01:51 +0000, Eric Kow escreveu:
> Eric Kow <kowey at darcs.net> added the comment:
> 
> On Thu, Aug 20, 2009 at 15:54:35 +0000, Marco Túlio Gontijo e Silva wrote:
> > > Also, what happens when you simplify this test even more, for example,
> > > removing the 'a' directory and just adding a file instead?
> > 
> > I could not understand what you mean.  Can you give a shell script with the
> > idea?
> 
> Here it is:  The difference here is that we just create a file 'file'
> without putting it in a subdirectory
> 
> . ../tests/lib                  # Load some portability helpers.
> rm -rf R                        # Another script may have left a mess.
> darcs init   --repo=R
> 
> echo file > R/file             # we need a hunk to make this interesting
> darcs add    --repo=R file
> darcs record --repo=R -am ' file'
> 
> mkdir R/b
> darcs add    --repo=R b
> darcs mv     --repo=R file b
> 
> rm -r R/b
> darcs whatsnew --repo=R | not grep adddir

Ok, I got it now.

(...)
> So with the above test, you get this darcs whatsnew output:
> 
> adddir ./b
> move ./file ./b/file
> hunk ./b/file 1
> -file
> rmfile ./b/file
> rmdir ./b
> 
> Interestingly, if you change the 'echo file > R/file' to a touch, you
> get something much more expected:
> 
> rmfile ./file
> 
> So I guess what you would find much more reasonable in the above example
> is simply
> 
> hunk ./file 1
> -file
> rmfile ./file
> 
> Does it still sound like we're talking about the same test?

Yes, this is a smaller test case for the same thing.  I would expect this last
output to be generated by darcs.

> I have a nagging feeling that this may be impossible to fix if so,
> but let's see for now if we're still talking about the same thing.

Yes, I think we are.

Greetings.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1325>
__________________________________


More information about the darcs-devel mailing list