code: public void update(Repository repository) throws GreenPepperServerException
  	{
  		Repository repositoryToUpdate = getByUID(repository.getUid());
          if(repositoryToUpdate == null)
              throw new GreenPepperServerException(GreenPepperServerErrorKey.REPOSITORY_NOT_FOUND, "Repository not found");
          
          if(!repository.getProject().getName().equals(repositoryToUpdate.getProject().getName()))
  		{
              if(!repositoryToUpdate.getSpecifications().isEmpty() || !repositoryToUpdate.getRequirements().isEmpty())
                  throw new GreenPepperServerException(GreenPepperServerErrorKey.REPOSITORY_DOC_ASSOCIATED, "Doc associated");
  
              Project newProject = projectDao.getByName(repository.getProject().getName());
              if(newProject == null)
                  throw new GreenPepperServerException(GreenPepperServerErrorKey.PROJECT_NOT_FOUND, "project not found");
  
              Project oldProject = repositoryToUpdate.getProject();
              oldProject.removeRepository(repositoryToUpdate);
              
              if(oldProject.getRepositories().isEmpty())
              {
              	sessionService.getSession().delete(oldProject);
              }
              else
              {
              	sessionService.getSession().update(oldProject);
              }
              
              newProject.addRepository(repositoryToUpdate);
              sessionService.getSession().update(newProject);
  		}
  
          repositoryToUpdate.setBaseRepositoryUrl(repository.getBaseRepositoryUrl());
          repositoryToUpdate.setBaseTestUrl(repository.getBaseTestUrl());
          repositoryToUpdate.setBaseUrl(repository.getBaseUrl());
          repositoryToUpdate.setContentType(repository.getContentType());
          repositoryToUpdate.setName(repository.getName());
          repositoryToUpdate.setUsername(repository.getUsername());
          repositoryToUpdate.setPassword(repository.getPassword());
  
          sessionService.getSession().update(repositoryToUpdate);
  	}
docs: {@inheritDoc}