Examples of base()


Examples of org.tmatesoft.hg.core.HgStatusCommand.base()

  public void testNewFileWithSameNameAsDeletedOld() throws Exception {
    // check branch !known, !ignored (=> unknown)
    repo = Configuration.get().find("status-1");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    StatusCollector sc = new StatusCollector();
    cmd.base(1);
    cmd.all().execute(sc);
    assertTrue(sc.getErrors().isEmpty());
    final Path file1 = Path.create("file1");
    assertTrue(sc.get(file1).contains(Unknown));
    assertTrue(sc.get(file1).contains(Removed));
View Full Code Here

Examples of org.tmatesoft.hg.core.HgStatusCommand.base()

    assertTrue(sc.get(file1).contains(Unknown));
    assertTrue(sc.get(file1).contains(Removed));
    assertTrue(sc.get(file1).size() == 2);
    //
    // no file1 in rev 2, shall be reported as unknown only
    cmd.base(2).execute(sc = new StatusCollector());
    assertTrue(sc.getErrors().isEmpty());
    assertTrue(sc.get(file1).contains(Unknown));
    assertTrue(sc.get(file1).size() == 1);
  }
View Full Code Here

Examples of org.tmatesoft.hg.core.HgStatusCommand.base()

  @Test
  public void testScopeInHistoricalStatus() throws Exception {
    repo = Configuration.get().find("status-1");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    cmd.base(3).revision(8).all();
    cmd.match(new PathGlobMatcher("dir/*"));
    StatusCollector sc = new StatusCollector();
    cmd.execute(sc);
    assertTrue(sc.getErrors().isEmpty());
    final Path file3 = Path.create("dir/file3");
View Full Code Here

Examples of org.tmatesoft.hg.core.HgStatusCommand.base()

      sr.report("hg status -C --change " + r, sc);
    }
    // a and d from r5 are missing in r3
    statusParser.reset();
    eh.run("hg", "status", "-C", "--rev", "3", "--rev", "5");
    cmd.base(3).revision(5).execute(sc = new StatusCollector());
    sr.report("hg status -C 3..5 ", sc);
    //
    // a is c which is initially b
    // d is b which is initially a
    Path fa = Path.create("a");
View Full Code Here

Examples of org.tmatesoft.hg.core.HgStatusCommand.base()

    Path fd = Path.create("d");
    // neither initial a nor b have isCopy(() == true
    assertFalse("[sanity]", repo.getFileNode(fa).isCopy());
    // check HgStatusCollector
    // originals (base revision) doesn't contain first copy origin (there's no b in r2)
    cmd.base(2).revision(5).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
    errorCollector.assertEquals(Collections.singletonList(Removed), sc.get(fc));
    // ensure same result with HgWorkingCopyStatusCollector
    cmd.base(2).revision(WORKING_COPY).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
View Full Code Here

Examples of org.tmatesoft.hg.core.HgStatusCommand.base()

    // originals (base revision) doesn't contain first copy origin (there's no b in r2)
    cmd.base(2).revision(5).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
    errorCollector.assertEquals(Collections.singletonList(Removed), sc.get(fc));
    // ensure same result with HgWorkingCopyStatusCollector
    cmd.base(2).revision(WORKING_COPY).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
    errorCollector.assertEquals(Collections.singletonList(Removed), sc.get(fc));
    // originals (base revision) does contain first copy origin (b is in r1)
    cmd.base(1).revision(5).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
View Full Code Here

Examples of org.tmatesoft.hg.core.HgStatusCommand.base()

    // ensure same result with HgWorkingCopyStatusCollector
    cmd.base(2).revision(WORKING_COPY).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
    errorCollector.assertEquals(Collections.singletonList(Removed), sc.get(fc));
    // originals (base revision) does contain first copy origin (b is in r1)
    cmd.base(1).revision(5).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
    errorCollector.assertEquals(Collections.singletonList(Removed), sc.get(fb));
  }

  /*
 
View Full Code Here

Examples of org.wikier.trioo.jtrioo.annotations.URI.base()

  @SuppressWarnings("rawtypes")
  public MetaURI(Class cls) throws IllegalArgumentException {
    this.cls = cls;
    URI uri = ((AnnotatedElement)cls).getAnnotation(URI.class);
    if (uri != null) {
      this.base = uri.base();
      this.parts = uri.parts();
      this.separator = uri.separator();
      this.validate();
    } else {
      throw new IllegalArgumentException("Class not annotated with any URI");
View Full Code Here

Examples of org.zeromq.ZMQ.Socket.base()

        //  Earliest offset
        sock.sendMore("OFFSET");
        sock.send(ByteBuffer.allocate(8).putLong(-2).array());

        Msg status = sock.base().recv(0);
        assertTrue(status.hasMore());
        assertEquals(100, status.data()[0]);

        Msg oldest = sock.base().recv(0);
        assertFalse(oldest.hasMore());
View Full Code Here

Examples of org.zeromq.ZMQ.Socket.base()

        Msg status = sock.base().recv(0);
        assertTrue(status.hasMore());
        assertEquals(100, status.data()[0]);

        Msg oldest = sock.base().recv(0);
        assertFalse(oldest.hasMore());
        assertEquals(infos[0].start(), oldest.buf().getLong());

        //  Latest offset
        sock.sendMore("OFFSET");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.