congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SCMFileSystem.getRoot
Code IndexAdd Tabnine to your IDE (free)

How to use
getRoot
method
in
jenkins.scm.api.SCMFileSystem

Best Java code snippets using jenkins.scm.api.SCMFileSystem.getRoot (Showing top 5 results out of 315)

origin: jenkinsci/subversion-plugin

try (SCMFileSystem fs = SCMFileSystem.of(source, new SCMHead("branches/dev"))) {
  assertThat(fs, notNullValue());
  assertThat(fs.getRoot(), notNullValue());
  Iterable<SCMFile> children = fs.getRoot().children();
  Iterator<SCMFile> iterator = children.iterator();
  assertThat(iterator.hasNext(), is(true));
origin: jenkinsci/subversion-plugin

@Test
public void ofSourceRevision() throws Exception {
  sampleRepo.init();
  sampleRepo.svnkit("copy", "--message=branching", sampleRepo.trunkUrl(), sampleRepo.branchesUrl() + "/dev");
  sampleRepo.svnkit("switch", sampleRepo.branchesUrl() + "/dev", sampleRepo.wc());
  SCMSource source = new SubversionSCMSource(null, sampleRepo.prjUrl());
  SCMRevision revision = source.fetch(new SCMHead("branches/dev"), null);
  sampleRepo.write("file", "modified");
  sampleRepo.svnkit("commit", "--message=dev1", sampleRepo.wc());
  try (SCMFileSystem fs = SCMFileSystem.of(source, new SCMHead("branches/dev"), revision)) {
    assertThat(fs, notNullValue());
    SCMFile root = fs.getRoot();
    assertThat(root, notNullValue());
    Iterable<SCMFile> children = root.children();
    Iterator<SCMFile> iterator = children.iterator();
    assertThat(iterator.hasNext(), is(true));
    SCMFile file = iterator.next();
    assertThat(iterator.hasNext(), is(false));
    assertThat(file.getName(), is("file"));
    assertThat(file.contentAsString(), is(""));
  }
}
origin: jenkinsci/subversion-plugin

try (SCMFileSystem fs = SCMFileSystem.of(source, new SCMHead("branches/dev"));) {
  assertThat(fs, notNullValue());
  assertThat(fs.getRoot(), notNullValue());
  Iterable<SCMFile> children = fs.getRoot().children();
  Set<String> names = new TreeSet<String>();
  SCMFile file = null;
origin: jenkinsci/subversion-plugin

try (SCMFileSystem fs = SCMFileSystem.of(source, new SCMHead("trunk"))) {
  assertThat(fs, notNullValue());
  SCMFile root = fs.getRoot();
  assertThat(root, notNullValue());
  assertTrue(root.isRoot());
origin: jenkinsci/subversion-plugin

@Test
public void lastModified_Smokes() throws Exception {
  long currentTime = isWindows() ? System.currentTimeMillis() / 1000L * 1000L : System.currentTimeMillis();
  sampleRepo.init();
  sampleRepo.svnkit("copy", "--message=branching", sampleRepo.trunkUrl(), sampleRepo.branchesUrl() + "/dev");
  sampleRepo.svnkit("switch", sampleRepo.branchesUrl() + "/dev", sampleRepo.wc());
  SCMSource source = new SubversionSCMSource(null, sampleRepo.prjUrl());
  SCMRevision revision = source.fetch(new SCMHead("branches/dev"), null);
  long oneMinute = 60*1000;
  sampleRepo.write("file", "modified");
  sampleRepo.svnkit("commit", "--message=dev1", sampleRepo.wc());
  try (SCMFileSystem fs = SCMFileSystem.of(source, new SCMHead("branches/dev"), revision);) {			
    long lastModified = fs.lastModified();
    //ensure the timestamp is from after we started but not in the distant future
    assertThat(lastModified, greaterThanOrEqualTo(currentTime));
    assertThat(lastModified, lessThanOrEqualTo(currentTime + oneMinute));
    SCMFile file = fs.getRoot().child("file");
    lastModified = file.lastModified();
    assertThat(lastModified, greaterThanOrEqualTo(currentTime));
    assertThat(lastModified, lessThanOrEqualTo(currentTime + oneMinute));
  }
}
jenkins.scm.apiSCMFileSystemgetRoot

Popular methods of SCMFileSystem

  • of
  • child
  • getRevision
  • lastModified

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Option (scala)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now