Mercurial > hg4j
diff src/org/tmatesoft/hg/repo/HgInternals.java @ 673:545b1d4cc11d
Refactor HgBundle.GroupElement (clear experimental mark), resolve few technical debt issues
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 12 Jul 2013 20:14:24 +0200 |
parents | e1b29756f901 |
children |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgInternals.java Fri Jul 12 16:29:06 2013 +0200 +++ b/src/org/tmatesoft/hg/repo/HgInternals.java Fri Jul 12 20:14:24 2013 +0200 @@ -28,8 +28,10 @@ import org.tmatesoft.hg.core.Nodeid; import org.tmatesoft.hg.internal.Experimental; import org.tmatesoft.hg.internal.Internals; +import org.tmatesoft.hg.internal.Patch; import org.tmatesoft.hg.internal.RelativePathRewrite; import org.tmatesoft.hg.internal.WinToNixPathRewrite; +import org.tmatesoft.hg.repo.HgBundle.GroupElement; import org.tmatesoft.hg.repo.HgSubrepoLocation.Kind; import org.tmatesoft.hg.util.FileIterator; import org.tmatesoft.hg.util.FileWalker; @@ -114,8 +116,19 @@ br.close(); return hgIgnore; } + + // XXX just to access package local method. Perhaps, GroupElement shall be redesigned + // to allow classes from .internal to access its details? + // or Patch may become public? + public static Patch patchFromData(GroupElement ge) throws IOException { + return ge.patch(); + } - // in fact, need a setter for this anyway, shall move to internal.Internals perhaps? + public static File getBundleFile(HgBundle bundle) { + return bundle.bundleFile; + } + + // TODO in fact, need a setter for this anyway, shall move to internal.Internals perhaps? public String getNextCommitUsername() { String hgUser = System.getenv("HGUSER"); if (hgUser != null && hgUser.trim().length() > 0) {