Package org.syncany.operations.down

Examples of org.syncany.operations.down.DatabaseReconciliator$DatabaseVersionHeaderComparator


      "C/(C1)/T=1376074225383",
      "C/(C2)/T=1376074225399",
      "C/(C3)/T=1376074225416",
    }));   
   
    DatabaseReconciliator databaseVersionUpdateDetector = new DatabaseReconciliator();
    DatabaseBranches actualStitchedRemoteBranches = databaseVersionUpdateDetector.stitchBranches(allBranches, "D", new DatabaseBranch());
   
    DatabaseBranches expectedStitchedBranches = new DatabaseBranches();
   
    expectedStitchedBranches.put("A", TestDatabaseUtil.createBranch(new String[] {
      "A/(A1)/T=1376074225169",
View Full Code Here


      "C/(A5,B1,C2)/T=8",
      // --> B
      "C/(A5,B2,C3)/T=10",
    }));   
   
    DatabaseReconciliator databaseVersionUpdateDetector = new DatabaseReconciliator();
    DatabaseBranches actualStitchedRemoteBranches = databaseVersionUpdateDetector.stitchBranches(allBranches, "D", new DatabaseBranch());
   
    DatabaseBranches expectedStitchedBranches = new DatabaseBranches();
   
    expectedStitchedBranches.put("A", TestDatabaseUtil.createBranch(new String[] {
        "A/(A1)/T=1",
View Full Code Here

    printBranches(allBranches);
     
 
    System.out.println("----------");
   
    DatabaseReconciliator databaseReconciliator = new DatabaseReconciliator();
    TestResult actualTestResult = new TestResult();
   
    // Get 'local' branch
    DatabaseBranch localBranch = allBranches.getBranch(localMachineName);
   
    // Get all the other ones (clone 'all', and remove local)
    DatabaseBranches unstitchedRemoteBranches = allBranches.clone();
    unstitchedRemoteBranches.remove(localMachineName);

    DatabaseBranches stitchedRemoteBranches = databaseReconciliator.stitchBranches(unstitchedRemoteBranches, localMachineName, localBranch);
   
    System.out.println("Before Orchestration : Remote");
    printBranches(unstitchedRemoteBranches);
    System.out.println("Before Orchestration : Local");
    printBranch(localBranch);
    System.out.println("BEGIN Branch Orchestration!! ----------");
    printBranches(stitchedRemoteBranches);       
    System.out.println("END Branch Orchestration ----------");
       
    actualTestResult.lastCommonHeader = databaseReconciliator.findLastCommonDatabaseVersionHeader(localBranch, stitchedRemoteBranches);
    actualTestResult.firstConflictingDatabaseVersionHeaders = databaseReconciliator.findFirstConflictingDatabaseVersionHeader(actualTestResult.lastCommonHeader, stitchedRemoteBranches);
    actualTestResult.winningFirstConflictingDatabaseVersionHeaders = databaseReconciliator.findWinningFirstConflictingDatabaseVersionHeaders(actualTestResult.firstConflictingDatabaseVersionHeaders);
    actualTestResult.winnersWinnersLastDatabaseVersionHeader = databaseReconciliator.findWinnersLastDatabaseVersionHeader(actualTestResult.winningFirstConflictingDatabaseVersionHeaders, stitchedRemoteBranches);
   
    System.out.println("Actual lastCommonDatabaseVersionHeader = " +actualTestResult.lastCommonHeader);
    System.out.println("Expect lastCommonDatabaseVersionHeader = " +expectedTestResult.lastCommonHeader);

    System.out.println("Actual firstConflictingDatabaseVersionHeaders = "); printMap(actualTestResult.firstConflictingDatabaseVersionHeaders);
View Full Code Here

TOP

Related Classes of org.syncany.operations.down.DatabaseReconciliator$DatabaseVersionHeaderComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.