I am using SVNKit 1.3.2 and trying to obtain working copy revision number.
Working copy is checkouted also with SVNKit, but when I'm trying to call
clientManager.getLookClient().doGetYoungestRevision(destination);
I got FileNotFoundException telling me that 'format' file is not found under destination path, ex /path/to/working/copy/format
I can see 2 troubles:
- It tries to access 'format' file right in working directory root, while this file supposed to be in .svn folder
There is not file in this .svn folder.
Any clues? Thank you!
Seems to be it should be done through SVNStatusClient:
clientManager.getStatusClient().doStatus(destination, false).getRevision().getNumber();
Though still don't understand what's the problem with doGetYoungestRevision(destination)...
It is not working because doGetYoungestRevision is for a repository, not for a working copy.
I was hoping to achieve the same things as you, and found out that when destination is pointing to a repository, it returns the last revision number of the repository.
The class in itself is for working with repository, you can look at the documentation here.
Related
FetchResult fr = git.fetch().setCredentialsProvider(credentials).setCheckFetchedObjects(true).Call();
git.checkout().setCreateBranch(true).setName("origin/" + branchName).setStartPoint("origin/" + branchName + "path/to/folder").call()
This is the code I'm using to check out a single folder from a remote repository.
Equivalent git commands are:
git fetch origin
git checkout origin/branch -- path/to/folder
But, the Java code doesn't work for me, I was only able to initialise the local repository and configure remote repository. The checkout didn't work and I couldn't find out what mistake I'm making.
Try making changes in the checkout part like this
"origin/"
and give it a try.
Otherwise you want to do is a sparse checkout
How do I implement sparse checkout in JGit?
In order to check out a particular folder with JGit (a sparse checkout), you need to tell the CheckoutCommand which folder to check out.
For example:
git.checkout().setName( "branch-to-check-out" ).addPath( "path/to/folder" ).call();
addPath() can be called multiple times to check out each of the given paths. The path is interpreted relative to the work directory.
Error:Failed to crunch file
C:\Users\Jaymin\Downloads\MyScriptCalculator_v1.2.2.479\MyScript_ATK-android-2.2\samples\SingleCharWidgetSample\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.0\res\drawable-xhdpi\abc_list_selector_disabled_holo_light.9.png
into
C:\Users\Jaymin\Downloads\MyScriptCalculator_v1.2.2.479\MyScript_ATK-android-2.2\samples\SingleCharWidgetSample\build\intermediates\res\merged\debug\drawable-xhdpi\abc_list_selector_disabled_holo_light.9.png
There may be 2 cases(As far as I know),
You have tried to convert image type just by changing their extensions.
Your project location is too deep.
We can discard 1st option as you have already said that you don't have these images.
For 2nd option, try to move you project in root folder (c:\project or d:\project) & manually delete your intermediate folder & then build your project again.
Hope it helps
I'm using OpenGrok and get an issue when I try to search on a project.
I get the error "Index database(s) not found..."
It's a bit weird, because there are other projects on this instance and they work perfectly. It's only with the last project in my list that I have this problem...
Does anyone have any idea?
You will see this error, when there is a problem with indexing of given repository. opengrok creates a "dirty" file in such cases under index folder eg. /home/opengrok/data/index/
Please follow the below steps to solve such errors.
Identify the repository on which this error is being appeared eg.
test
Login to opengrok server
cd /home/opengrok/data/index/
eg. /home/opengrok/data/index/test
Move the contents to a temp location
eg. mkdir /tmp/test; mv /home/opengrok/data/index/test/* /tmp/test
Start indexing again.
Finally I found how to resolve it.
It was because the indexes where to big.
So I went in the OpenGrok directory and clear them.
Then I launched OpenGrok again and everything went fine.
Hope this can help someone else!
I've been developing for android using processing but have come to a halt when I wanted to retrieve a list of files within a given directory. Below is a screenshot of the code I have been trying.
I have tried different variations of this (such as getbaseContext().getAssets();) and nothing seems to work. Whenever the code tries to execute the list() part it has an error and there is nothing in 'fileNames'.
Am I missing anything? Is this a problem with processing?
Thanks
EDIT: The direction I am trying to access is "assets/Levels/" which I can see from my project view in eclipse.
I experienced a similar issue because I used folder names with a trailing / character.
So for others experiencing this issue, you need to make sure the folder name you use are just the folder name with no trailing / (so "movies" instead of "movies/")
You do not need any additional permissions in order to run the code that you have. I just compiled it on my device and it works fine. You mention you are attempting to list the files in a given directory. What you are doing is listing the files in the Levels folder, which should be a sub folder of assets. What you will get back is an array of all file names in that folder.
If you are actually looking to get a list of files from a given directory, it has nothing to do with the assets folder and I suggest you check out a tutorial on Android external and internal storage. The information directly on the android page was very helpful to me.
http://developer.android.com/guide/topics/data/data-storage.html
If that's not what you are looking for though, I suggest rewording your question.
So I got it to work!
Turns out it was a problem with where I was placing the 'String[] fileNames;' code before trying to put data into it. The below code works fine:
Thanks for the help!
*Note : Individual folder should not empty.. It will return zero for folder with no files. *
void getFolderDetais(String folder_name)
{
// pass folder_name empty to get detail of root that means assets folder details
String[] filelistInSubfolder = assetManager.list(folder_name);
Log.v("Floder Details ----- >", " Length --- "
+ filelistInSubfolder.length);
}
I need to specify the location of some native libraries in my Android application. I was accomplishing this with a hard-coded string:
public static final String DLL_DIR_STR = "/data/data/my.application.package/lib";
but wanted to get the path from Android instead. Following posts like this, I used getDir() to find the lib directory, changing
superCollider = new SCAudio(DLL_DIR_STR);
to
superCollider = new SCAudio(container.$context().getDir("lib", 0).getAbsolutePath());
Oddly, the initial libraries seem to load correctly
Trying to load lib /data/data/my.application.package/lib/libsndfile.so 0x42718d80
Added shared lib /data/data/my.application.package/lib/libsndfile.so 0x42718d80
No JNI_OnLoad found in /data/data/my.application.package/lib/libsndfile.so 0x42718d80, skipping init
Trying to load lib /data/data/my.application.package/lib/libscsynth.so 0x42718d80
Added shared lib /data/data/my.application.package/lib/libscsynth.so 0x42718d80
But when libscsynth tries to load some additional code, it's using the wrong path:
OK, listing opendir(/data/data/my.application.package/app_lib)
Any ideas where the "app_" comes from? I thought I must be using getDir() wrong, but the initial files load fine. Could it be something in the native code? Thanks for your help.
I found the answer, quite by accident, in this post. ApplicationInfo.dataDir holds the location of the data directory, and "lib" is easily navigated to from there:
superCollider = new SCAudio(container.$context().getApplicationInfo().dataDir + "/lib");
Alternatively, nativeLibraryDir takes you directly to the lib directory, but requires API level 9.
Thanks for your help!
getDir will always prepend app_ to the directory name so it is very odd that it is working the first time. I would either just expect the app_ to be there or try using getFilesDir, at least you always know what it will return. Does SuperCollider have a restriction on what the directory name is?
I found another SuperCollider Project that seems to be doing the same thing you did initially with the comment "// TODO: not very extensible,".. I found that funny :)