Package org.eclipse.jgit.dircache

Examples of org.eclipse.jgit.dircache.DirCacheEditor.commit()


          public void apply(final DirCacheEntry dEnt) {
            dEnt.copyMetaData(se);
          }
        });
      }
      if (sEdit.commit())
        return MoveResult.SUCCESS;
      else
        return MoveResult.FAILED;
    } finally {
      if (sCache != null)
View Full Code Here


      for (Map.Entry<Repository, DirCacheEditor> e : edits.entrySet()) {
        final Repository db = e.getKey();
        final DirCacheEditor editor = e.getValue();
        monitor.setTaskName(NLS.bind(CoreText.UntrackOperation_writingIndex, db.getDirectory()));
        editor.commit();
      }
    } catch (RuntimeException e) {
      throw new CoreException(Activator.error(CoreText.UntrackOperation_failed, e));
    } catch (IOException e) {
      throw new CoreException(Activator.error(CoreText.UntrackOperation_failed, e));
View Full Code Here

                        ent.getPathString()), e);
              }
            }
          });
        }
        editor.commit();
      } finally {
        startWalk.release();
        r.release();
      }
    } finally {
View Full Code Here

            }
          });
        }
      }

      edit.commit();
    } catch (IOException e) {
      throw new RuntimeException(e);
    } finally {
      if (dc != null)
        dc.unlock();
View Full Code Here

            ent.copyMetaData(entry);
          }
        });
      }

      editor.commit();
    } finally {
      dc.unlock();
      if (walk != null)
        walk.release();
    }
View Full Code Here

    // there must be at least one change
    if (emptyCommit)
      throw new JGitInternalException(JGitText.get().emptyCommit);

    // update index
    dcEditor.commit();
    // finish temporary in-core index used for this commit
    dcBuilder.finish();
    return inCoreIndex;
  }
View Full Code Here

            checkoutPath(ent, r);
          }
        }
      });
    }
    editor.commit();
  }

  private void checkoutPathsFromCommit(TreeWalk treeWalk, DirCache dc,
      RevCommit commit) throws IOException {
    treeWalk.addTree(commit.getTree());
View Full Code Here

          ent.setFileMode(mode);
          checkoutPath(ent, r);
        }
      });
    }
    editor.commit();
  }

  private void checkoutPath(DirCacheEntry entry, ObjectReader reader) {
    File file = new File(repo.getWorkTree(), entry.getPathString());
    File parentDir = file.getParentFile();
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.