[Anthill-dev] Bug in ProfileRepositoryAdapter.revert()?

Chad Woolley chad_woolley at choicehotels.com
Mon May 5 16:00:56 CDT 2003


Hi,

I think I found a possible bug, but I am not sure because it seems like it
would have been caught by now.  I am using AH OS 1.6.3.67, and have just
migrated to CVS from VSS.

The bug I saw is that a change that I committed was not picked up in a
subsequent build.  When I looked into it, I saw that the working directory
contained the old version, and when I ran a new build, the new version was
not checked out.

When I looked at the ProfileRepositoryAdapter.revert() method, I see the
following code:


    public void revert() throws RepositoryException {
        // implementations will differ for each SCCS
        try {
            log.info("Cleaning up local files: ");
            if (!log.isDebugEnabled()) {
                File file = new File(getLocalProjectDirName());
                FileRemover.removeFile(file);
            }
        }
        catch (Exception e) {
            throw new RepositoryException("revert failed", e);
        }
    }


It looks to me that this logic will not be executed if Debug mode is
enabled, which doesn't seem correct - shouldn't it always be executed?  I'm
not really sure if this is my problem, because I'm not really sure how to
tell if I have Debug mode enabled (what log properties file would I be using
by default?)

Also, I'm not sure if the CVS checkout should get the new file version by
default, even if the directory is not cleaned.  If this is the case, why
didn't I get the new version?

Thanks in advance to anyone who can shed some light on this.

-- Chad




More information about the Anthill-dev mailing list