How do I get a file off google-api-java-client? - mercurial

OK i want download the the following open source code: http://code.google.com/p/google-api-java-client/source/browse/calendar-v2-atom-android-sample/?repo=samples
I am lead to believe you need to use mercurial for this but have yet to find a tutorial on how. Why is there not a download zip file type thing for this?
I am using eclipse.
How do I get this example?

You can get each file individually by clicking it then right-click "View raw file" in the right column and choose "Save" (which may say something slightly different depending on your browser.)
I don't know about this project, but usually you can download the samples in the zips on the downloads tab
If you want to do it faster than that, you can find a Mercurial client for most operating systems at https://www.mercurial-scm.org/downloads.
Once you have Mercurial installed, running the command
hg clone https://code.google.com/p/google-api-java-client.samples/ google-api-java-client-samples
will give you a full copy of the current version in the current directory.

Related

Is there any way to recover source code from a deleted revision history?

I want to restore the source code that I accidentally deleted, but I can't find it in the revision history.
Is it possible to revert to a version that is not in the history?
Every change saved in your project should appear in the version history
By using the legacy editor if you click on your file.gs and then click File > See version history you'll be able to Restore this version in the editor. Otherwise it means that you haven't saved a change made in your code.
If you accidentally deleted a file not only the code as per the documentation says this file can't be recovered despite of using clasp.
In order to avoid accidentally deleted files
I'd recommend you to use a system version control such as Git in conjunction with Clasp as you already used, in doing so you can keep the code up to date either in Git or your Script Project.

Files not under caret on new computer

I opened my project on another computer, and the files where I'd been using a file watcher were expanded, like before they used to be nested like home.scss is now after I run the watcher once on that file.
Is there a way to automatically make all the files be nested?
Because when adding new files and folder with git, it would be quite troublesome to go into each and every file in order to make them become nested.
Like I have some minified JavaScript files that used to be nested, but now is expanded for some reason.
Hope you understand. Thank you.
Edit: Nested***
Is there a way to automatically make all the files go under a caret like that?
Unfortunately not. Such nesting information (to "go under a caret" as you are saying) is taken from "Output path to refresh" field of the corresponding File Watcher.
You have to run file watcher for such files at least once in order to see files nested like you have it on your another computer.
Here is how you can run File Watchers manually without the need to modify those files (so no extra history will appear in your git (or whatever VCS you may be using there)).
https://stackoverflow.com/a/20012655/783119
P.S.
In PhpStorm 2016.3 (the next version that will be released in 1.5-2 months or so) such nesting will be done automatically (the most common combinations) so there will be no need to have File Watchers for providing such info.
If you wish -- you can try EAP build right now (EAP means Early Access Program .. which is sort of Alpha/Beta builds (simply speaking).. and therefore some bugs for new functionality might be present and performance may not be optimal).

How do you reopen messages.json in Sublime Text (3)?

I read packagecontrol.io's doc
regarding messages.json, but what I'm referring to is the file tab that sublime text typically displays upon a new package install. It appears as a continuous roll of installation notes throughout multiple installations. It appears that this is a feed of the individual messages.json files displayed when the packages are downloaded. Is there a way to open the unified file that displays messages from multiple packages? Or is there a more common way to access these package files?
What you are asking about are the install and release messages pointed to by those keys inside messages.json. For example, from one of my packages,
{
"install": "messages/install.txt",
"1.2.1": "messages/1.2.1.txt",
"1.3.0": "messages/1.3.0.txt",
"1.3.1": "messages/1.3.1.txt",
"1.4.2": "messages/1.4.2.txt",
"2.0.1": "messages/2.0.0.txt",
"2.1.1": "messages/2.1.0.txt",
"2.2.0": "messages/2.2.0.txt",
"2.2.1": "messages/2.2.1.txt"
}
Whenever someone installs the package for the first time, Package Control prints the contents of messages/install.txt to that new view you mentioned. It will also print the file corresponding to the current release, which is a "release" tagged on Github. If I were to go and release 2.3.0, for example, and not update messages.json, no update message would be printed telling users I'd pushed out a new version. In some cases this is desirable, in case I had to quickly push out a point release to fix some stupid mistake I made in a major (or minor) release, not that I've ever done that before :) But, in most cases, I want to keep users up to date on development, so I'll write a message for them in a new file, and add an appropriate key and value to messages.json.
Is there a way to open the unified file that displays messages from multiple packages? Or is there a more common way to access these package files?
The view that opens and shows you the messages from all the newly-installed and -upgraded packages is unique to you and your particular situation - there is no way to recover it once you close the tab. However, if you're interested in a particular package's message(s), just use PackageResourceViewer (in ST3) to open the package, view the messages.json file to see which is the most recent file you want to view, then find and read that file. In ST2 all packages are already unpacked in your Packages folder.

How to you pull all files in project per version or label in Vault?

I'm new to vault and not a huge fan so far, but I need to do something which would be easy in SVN or Mercurial but I can't figure out how to in Vault.
I need to Get a copy of the repository files as they were at a specific version. I've tried listing thei history and doing a get on a version, but that seems to only get the files that were checked in at that version.
How do I get the whole repository as it was at that version?
You can use labels on folders and files to set a "version", then in vault right-click on the folder/files, choose "show labels", and "check out" this label. For more reading, see the vault documentation on labels at http://download.sourcegear.com/misc/vaultpro/help/client/vaultprohelp.html
Within the Vault client:
Right-click on the directory you wish to have in its entirety at a given point in time
"Show History"
Select radio button "View folder history by version"
Make other settings, such as how far back you wish to go, hit "OK"
Mark "Version" you want, select "Get Tree"
The only feasible option will be to overwrite in place, so you may want to change the working directory at this point.

how to get changed files from TFS using nant

It is really painfull to get all code form TFS whenever you make a build using NANT.
Is there any settings in ccnet.config which will only take the files which are changed form last time which can speed up the process.
The "get" process will only actually download files that are different than the version in the workspace, unless you are specifying a /force which will force it to get the specified version even if TFS thinks it has that version in the workspace.