com.aragost.javahg
Class Bundle

java.lang.Object
  extended by com.aragost.javahg.Bundle

public class Bundle
extends Object


Constructor Summary
Bundle(BaseRepository baseRepository, File file)
          Create a new bundle.
Bundle(BaseRepository baseRepository, File file, boolean manageFile)
          Create a new bundle.
 
Method Summary
 void close()
           
 BaseRepository getBaseRepository()
           
 List<Changeset> getChangesets()
          Return the changeset for this bundle.
 File getFile()
           
 com.aragost.javahg.OverlayRepository getOverlayRepository()
           
 void init(List<Changeset> changesets)
          Do the final initialization of the bundle.
 void pushToRepository()
          Push the changesets in the bundle to its base repository.
 void setManageFile(boolean manageFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bundle

public Bundle(BaseRepository baseRepository,
              File file)
Create a new bundle. The bundle file will not be deleted on close.

Parameters:
baseRepository - The base repository this bundle applies to
file - The bundle file.

Bundle

public Bundle(BaseRepository baseRepository,
              File file,
              boolean manageFile)
Create a new bundle.

Parameters:
baseRepository - The base repository this bundle applies to
file - The bundle file
manageFile - Whether to delete the bundle file when this bundle is closed.
Method Detail

getFile

public File getFile()
Returns:
the underlying file for the bundle

setManageFile

public void setManageFile(boolean manageFile)
Parameters:
manageFile - Whether close should delete the bundle file

init

public void init(List<Changeset> changesets)
Do the final initialization of the bundle.

This method is only public so it can be called from IncomingCommand

Parameters:
changesets - the changesets contained in this Bundle

getChangesets

public List<Changeset> getChangesets()
Return the changeset for this bundle. The are sorted from low revisions to high revisions.

Returns:
The changesets

close

public void close()

getBaseRepository

public BaseRepository getBaseRepository()

getOverlayRepository

public com.aragost.javahg.OverlayRepository getOverlayRepository()

pushToRepository

public void pushToRepository()
                      throws IOException
Push the changesets in the bundle to its base repository.

Throws:
IOException


Copyright © 2011-2013 aragost Trifork ag. All Rights Reserved.