congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
SVNCommitPacket
Code IndexAdd Tabnine to your IDE (free)

How to use
SVNCommitPacket
in
org.tmatesoft.svn.core.wc

Best Java code snippets using org.tmatesoft.svn.core.wc.SVNCommitPacket (Showing top 20 results out of 315)

origin: org.tmatesoft.svnkit/svnkit

public void disposeCommitPacket(Object lockingContext, boolean disposeParentContext) throws SVNException {
  if (lockingContext instanceof SVNCommitPacket[]) {
    SVNCommitPacket[] packets = (SVNCommitPacket[]) lockingContext;
    for (int i = 0; i < packets.length; i++) {
      try {
        packets[i].dispose();
      } catch (SVNException e) {
        //
      }
    }
  } else if (lockingContext instanceof SVNCommitPacket) {
    ((SVNCommitPacket) lockingContext).dispose();
  }
}
origin: org.tmatesoft.svnkit/svnkit

public SVNCommitPacket removeSkippedItems() {
  if (this == EMPTY) {
    return EMPTY;
  }
  Collection items = new ArrayList();
  Map lockTokens = getLockTokens() == null ? null : new SVNHashMap(getLockTokens());
  SVNCommitItem[] filteredItems = filterSkippedItemsAndLockTokens(items, lockTokens);
  return new SVNCommitPacket(null, filteredItems, lockTokens);
}
origin: org.tmatesoft/svn

/**
 * Determines if an item intended for a commit is set to 
 * be skipped - that is not to be committed.
 * 
 * @param  item  an item to check
 * @return       <span class="javakeyword">true</span> if the item
 *               is set to be skipped, otherwise <span class="javakeyword">false</span>
 * @see          #setCommitItemSkipped(SVNCommitItem, boolean)   
 */
public boolean isCommitItemSkipped(SVNCommitItem item) {
  int index = getItemIndex(item);
  if (index >= 0 && index < myIsSkipped.length) {
    return myIsSkipped[index];
  }
  return true;
}
 
origin: org.tmatesoft/svn

boolean needsSleepForTimeStamp = false;
for (int p = 0; p < commitPackets.length; p++) {
  SVNCommitPacket commitPacket = commitPackets[p].removeSkippedItems();
  if (commitPacket.getCommitItems().length == 0) {
    continue;
    commitMessage = getCommitHandler().getCommitMessage(commitMessage, commitPacket.getCommitItems());                
    if (commitMessage == null) {
      infos.add(SVNCommitInfo.NULL);
    String baseURL = SVNCommitUtil.translateCommitables(commitPacket.getCommitItems(), commitables);
    Map lockTokens = SVNCommitUtil.translateLockTokens(commitPacket.getLockTokens(), baseURL);
    for (int i = 0; i < commitPacket.getCommitItems().length; i++) {
      commitPacket.getCommitItems()[i].getWCAccess().setEventHandler(getEventDispatcher());
      commitPacket.dispose();
origin: org.tmatesoft/svn

    continue;
  packets.add(new SVNCommitPacket(wcAccess, commitItems, lockTokens));
} catch (SVNException e) {
  for (int j = 0; j < wcAccesses.length; j++) {
  checkCancelled();
  SVNCommitPacket packet = packetsArray[i];
  File wcRoot = SVNWCUtil.getWorkingCopyRoot(packet.getCommitItems()[0].getWCAccess().getAnchor(), true);
  SVNWCAccess rootWCAccess = createWCAccess();
  String uuid = null;
  for (int j = 0; j < packet.getCommitItems().length; j++) {
    items.add(packet.getCommitItems()[j]);
  if (packet.getLockTokens() != null) {
    lockTokens.putAll(packet.getLockTokens());
  Map lockTokens = (Map) locktokensMap.get(uuid);
  SVNCommitItem[] itemsArray = (SVNCommitItem[]) items.toArray(new SVNCommitItem[items.size()]);
  packetsArray[index++] = new SVNCommitPacket(null, itemsArray, lockTokens);
origin: org.tmatesoft/svn

SVNCommitPacket packet = doCollectCommitItems(paths, keepLocks, force, recursive);
try {
  packet = packet.removeSkippedItems();
  return doCommit(packet, keepLocks, commitMessage);
} finally {
  if (packet != null) {
    packet.dispose();
origin: org.tmatesoft/svn

SVNCommitPacket removeSkippedItems() {
  if (this == EMPTY) {
    return EMPTY;
  }
  Collection items = new ArrayList();
  Map lockTokens = myLockTokens == null ? null : new HashMap(myLockTokens);
  for (int i = 0; myCommitItems != null && i < myCommitItems.length; i++) {
    SVNCommitItem commitItem = myCommitItems[i];
    if (!myIsSkipped[i]) {
      items.add(commitItem);
    } else if (lockTokens != null) {
      lockTokens.remove(commitItem.getURL().toString());
    }
  }
  SVNCommitItem[] filteredItems = (SVNCommitItem[]) items.toArray(new SVNCommitItem[items.size()]);
  return new SVNCommitPacket(null, filteredItems, lockTokens);
}
 
origin: org.tmatesoft.svnkit/svnkit

packet.setLockingContext(runner, oldPacket);
Map<SVNURL, String> lockTokens = new HashMap<SVNURL, String>();
SVNCommitItem[] items = oldPacket.getCommitItems();
@SuppressWarnings("unchecked")
Map<String, String> locks = oldPacket.getLockTokens();
if (locks != null) {
  for (String url : locks.keySet()) {
        item.getCopyFromRevision() != null ? item.getCopyFromRevision().getNumber() : -1,
        flags);
    if (oldPacket.isCommitItemSkipped(item)) {
      packet.setItemSkipped(newItem.getPath(), true);
origin: org.tmatesoft.svnkit/svnkit

public void setItemSkipped(File file, boolean skipped) {
  final String path = SVNFileUtil.getFilePath(file);
  if (skipped) {
    skippedPaths.add(path);
  } else {
    skippedPaths.remove(path);
  }
  if (lockingContext != null && lockingContext instanceof SVNCommitPacket && !(lockingContext instanceof SvnCodec.SVNCommitPacketWrapper)) {
    final SvnCommitItem commitItem = itemsByPath.get(path);
    if (commitItem != null) {
      final SVNCommitPacket oldPacket = (SVNCommitPacket) lockingContext;
      final SVNCommitItem[] oldItems = oldPacket.getCommitItems();
      for (SVNCommitItem oldItem : oldItems) {
        if (SVNFileUtil.getFilePath(oldItem.getFile()).equals(path)) {
          oldPacket.setCommitItemSkipped(oldItem, true);
          break;
        }
      }
    }
  }
}
origin: indeedeng/proctor

elapsed += System.currentTimeMillis();
if (logger.isDebugEnabled()) {
  final StringBuilder changes = new StringBuilder("Committed " + commit.getCommitItems().length + " changes: ");
  for (final SVNCommitItem item : commit.getCommitItems()) {
    changes.append(item.getKind() + " - " + item.getPath() + ", ");
origin: org.tmatesoft.svnkit/svnkit

boolean needsSleepForTimeStamp = false;
for (int p = 0; p < commitPackets.length; p++) {
  SVNCommitPacket commitPacket = commitPackets[p].removeSkippedItems();
  if (commitPacket.getCommitItems().length == 0) {
    continue;
    commitMessage = getCommitHandler().getCommitMessage(commitMessage, commitPacket.getCommitItems());
    if (commitMessage == null) {
      infos.add(SVNCommitInfo.NULL);
    SVNURL baseURL = SVNCommitUtil.translateCommitables(commitPacket.getCommitItems(), commitables);
    Map lockTokens = SVNCommitUtil.translateLockTokens(commitPacket.getLockTokens(), baseURL.toString());
    SVNCommitItem firstItem = commitPacket.getCommitItems()[0];
    SVNRepository repository = createRepository(baseURL, firstItem.getFile(), firstItem.getWCAccess(), true);
    SVNCommitMediator mediator = new SVNCommitMediator(commitables);
    SVNPropertiesManager.validateRevisionProperties(revisionProperties);
    commitEditor = repository.getCommitEditor(commitMessage, lockTokens, keepLocks, revisionProperties, mediator);
    for (int i = 0; i < commitPacket.getCommitItems().length; i++) {
      commitPacket.getCommitItems()[i].getWCAccess().setEventHandler(getEventDispatcher());
      commitPacket.dispose();
origin: org.codehaus.jtstand/jtstand-svnkit

    continue;
  packets.add(new SVNCommitPacket(wcAccess, commitItems, lockTokens));
} catch (SVNException e) {
  for (int j = 0; j < wcAccesses.length; j++) {
  checkCancelled();
  SVNCommitPacket packet = packetsArray[i];
  File wcRoot = SVNWCUtil.getWorkingCopyRoot(packet.getCommitItems()[0].getWCAccess().getAnchor(), true);
  SVNWCAccess rootWCAccess = createWCAccess();
  String uuid = null;
  for (int j = 0; j < packet.getCommitItems().length; j++) {
    items.add(packet.getCommitItems()[j]);
  if (packet.getLockTokens() != null) {
    lockTokens.putAll(packet.getLockTokens());
  Map lockTokens = (Map) locktokensMap.get(uuid);
  SVNCommitItem[] itemsArray = (SVNCommitItem[]) items.toArray(new SVNCommitItem[items.size()]);
  packetsArray[index++] = new SVNCommitPacket(null, itemsArray, lockTokens);
origin: org.tmatesoft.svnkit/svnkit

SVNCommitPacket packet = doCollectCommitItems(paths, keepLocks, force, depth, changelists);
try {
  packet = packet.removeSkippedItems();
  return doCommit(packet, keepLocks, keepChangelist, commitMessage, revisionProperties);
} finally {
  if (packet != null) {
    packet.dispose();
origin: org.codehaus.jtstand/jtstand-svnkit

SVNCommitPacket removeSkippedItems() {
  if (this == EMPTY) {
    return EMPTY;
  }
  Collection items = new ArrayList();
  Map lockTokens = myLockTokens == null ? null : new SVNHashMap(myLockTokens);
  for (int i = 0; myCommitItems != null && i < myCommitItems.length; i++) {
    SVNCommitItem commitItem = myCommitItems[i];
    if (!myIsSkipped[i]) {
      items.add(commitItem);
    } else if (lockTokens != null) {
      lockTokens.remove(commitItem.getURL().toString());
    }
  }
  SVNCommitItem[] filteredItems = (SVNCommitItem[]) items.toArray(new SVNCommitItem[items.size()]);
  return new SVNCommitPacket(null, filteredItems, lockTokens);
}

origin: com.indeed/proctor-store-svn

elapsed += System.currentTimeMillis();
if (logger.isDebugEnabled()) {
  final StringBuilder changes = new StringBuilder("Committed " + commit.getCommitItems().length + " changes: ");
  for (final SVNCommitItem item : commit.getCommitItems()) {
    changes.append(item.getKind() + " - " + item.getPath() + ", ");
origin: org.codehaus.jtstand/jtstand-svnkit

boolean needsSleepForTimeStamp = false;
for (int p = 0; p < commitPackets.length; p++) {
  SVNCommitPacket commitPacket = commitPackets[p].removeSkippedItems();
  if (commitPacket.getCommitItems().length == 0) {
    continue;
    commitMessage = getCommitHandler().getCommitMessage(commitMessage, commitPacket.getCommitItems());                
    if (commitMessage == null) {
      infos.add(SVNCommitInfo.NULL);
    SVNURL baseURL = SVNCommitUtil.translateCommitables(commitPacket.getCommitItems(), commitables);
    Map lockTokens = SVNCommitUtil.translateLockTokens(commitPacket.getLockTokens(), baseURL.toString());
    SVNCommitItem firstItem = commitPacket.getCommitItems()[0];
    SVNRepository repository = createRepository(baseURL, firstItem.getFile(), 
        firstItem.getWCAccess(), true);
    for (int i = 0; i < commitPacket.getCommitItems().length; i++) {
      commitPacket.getCommitItems()[i].getWCAccess().setEventHandler(getEventDispatcher());
      commitPacket.dispose();
origin: org.tmatesoft.svnkit/svnkit

    continue;
  packets.add(new SVNCommitPacket(wcAccess, commitItems, lockTokens));
} catch (SVNException e) {
  for (int j = 0; j < wcAccesses.length; j++) {
  checkCancelled();
  SVNCommitPacket packet = packetsArray[i];
  File wcRoot = SVNWCUtil.getWorkingCopyRoot(packet.getCommitItems()[0].getWCAccess().getAnchor(), true);
  SVNWCAccess rootWCAccess = createWCAccess();
  String uuid = null;
  for (int j = 0; j < packet.getCommitItems().length; j++) {
    items.add(packet.getCommitItems()[j]);
  if (packet.getLockTokens() != null) {
    lockTokens.putAll(packet.getLockTokens());
  Map lockTokens = (Map) locktokensMap.get(uuid);
  SVNCommitItem[] itemsArray = (SVNCommitItem[]) items.toArray(new SVNCommitItem[items.size()]);
  packetsArray[index++] = new SVNCommitPacket((SVNWCAccess)null, itemsArray, lockTokens);
origin: org.jvnet.hudson.svnkit/svnkit

SVNCommitPacket packet = doCollectCommitItems(paths, keepLocks, force, depth, changelists);
try {
  packet = packet.removeSkippedItems();
  return doCommit(packet, keepLocks, keepChangelist, commitMessage, revisionProperties);
} finally {
  if (packet != null) {
    packet.dispose();
origin: org.tmatesoft.svnkit/svnkit

/**
 * Determines if an item intended for a commit is set to
 * be skipped - that is not to be committed.
 *
 * @param  item  an item to check
 * @return       <span class="javakeyword">true</span> if the item
 *               is set to be skipped, otherwise <span class="javakeyword">false</span>
 * @see          #setCommitItemSkipped(SVNCommitItem, boolean)
 */
public boolean isCommitItemSkipped(SVNCommitItem item) {
  int index = getItemIndex(item);
  if (index >= 0 && index < myIsSkipped.length) {
    return myIsSkipped[index];
  }
  return true;
}
origin: org.jvnet.hudson.svnkit/svnkit

SVNCommitPacket removeSkippedItems() {
  if (this == EMPTY) {
    return EMPTY;
  }
  Collection items = new ArrayList();
  Map lockTokens = myLockTokens == null ? null : new SVNHashMap(myLockTokens);
  for (int i = 0; myCommitItems != null && i < myCommitItems.length; i++) {
    SVNCommitItem commitItem = myCommitItems[i];
    if (!myIsSkipped[i]) {
      items.add(commitItem);
    } else if (lockTokens != null) {
      lockTokens.remove(commitItem.getURL().toString());
    }
  }
  SVNCommitItem[] filteredItems = (SVNCommitItem[]) items.toArray(new SVNCommitItem[items.size()]);
  return new SVNCommitPacket(null, filteredItems, lockTokens);
}

org.tmatesoft.svn.core.wcSVNCommitPacket

Javadoc

The SVNCommitPacket is a storage for SVNCommitItem objects which represent information on versioned items intended for being committed to a repository.

Used by SVNCommitClient to collect and hold information on paths that are to be committed. Each SVNCommitPacket is committed in a single transaction.

Most used methods

  • dispose
    Disposes the current object.
  • getCommitItems
    Gets an array of SVNCommitItem objects stored in this object.
  • <init>
  • getItemIndex
  • getLockTokens
  • removeSkippedItems
  • filterSkippedItemsAndLockTokens
  • isCommitItemSkipped
    Determines if an item intended for a commit is set to be skipped - that is not to be committed.
  • setCommitItemSkipped
    Sets or unsets a versioned item to be skipped - whether or not it should be committed.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Permission (java.security)
    Legacy security code; do not use.
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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