How to use SVN with Emacs (psvn can't create tunnel) - windows

We just installed svn at my office. TortoiseSVN works (with putty to do the ssh thing--sorry if this doesn't totally make sense, I'm a total svn newbie, I always used cvs). I found psvn for emacs, which seems to be pretty standard. When I tried running it, it said it couldn't find svn. So I downloaded the client from tigris.org--which actually redirected me to a place called CollabNet which had me register a username and password just to download the svn client--still don't know what that was all about.
Anyway. Looong story short: now emacs tells me "Can't create tunnel: The system cannot find the file specified." when I try to show the revision log on a file.
Can anyone tell me how to setup svn with emacs? It doesn't have to follow the steps above, I can start again. I just want a client that'll work with emacs.

Found the following and it works:
Set the following environment variable
(by right-clicking on My Computer,
Properties, Advanced, Environment
Variables, New):-
Variable name: SVN_SSH
Variable value: C:\\Program Files\\TortoiseSVN\\bin\\TortoisePlink.exe
(The "\\" is very important, otherwise
it won't work. Equally, you cannot use
the plink.exe that comes with putty as
that fires up a command shell window
which is really annoying. The
TortoisePlink.exe is a windows
implementation of plink that doesn't
bring up any UI)
Source: http://www.woodwardweb.com/java/howto_configure.html

If TortoiseSVN already works for you, try using "tortoise-svn.el"
tortoise-svn.el
Emacs Wiki - Version Control Category

Related

How to see history of TortoiseSVN svn commands which have been run?

TortoiseSVN is very useful for simplifying the process of using subversion.
However if you switch to linux and just want to use the command line it would be useful to see the commands that you have run with TortoiseSVN to see how you would run the equivalent steps at the command line.
So is there a log or a setting in TortoiseSVN that allows you to see the svn commands that have been run?
You can not display the svn command line that you have run with TortoiseSVN for the simple and good reason that TortoiseSVN does not run any svn command.
However you have description of equivalence between TortoiseSVN actions and svn command lines here: "Command Line Interface Cross Reference". The important note is the following:
Even though there are CLI equivalents to what TortoiseSVN does, remember that TortoiseSVN does not call the CLI but uses the Subversion library directly.
For info, you have possibility to see the TortoiseProc command (not the svn command) just before you run them. In the settings window, select Advanced, find the setting called Debug and set it to true. Not useful if you switch to Linux.

What is the correct way to configure Qt Creator to use Git?

I'm trying to use Git for Windows together with QT Creator 2.8, and failing miserably. I created a repository on bitbucket, following the bitbucket 101 tutorial and everything runs smoothly when I use Git Bash, or even Git GUI. The PATH variable is set properly, everything works outside Qt. However, when trying to configure Qt Creator, I cannot access the remote repository. The error given is:
16:25 Executing in C:\Users(...): C:\Program Files
(x86)\Git\cmd\git.exe pull The command 'C:\Program Files
(x86)\Git\cmd\git.exe' did not respond within the timeout limit (60000
ms).
Almost everything I have found tells me to configure PATH, and that should cause everything to run ok, but my PATH is set correctly (I can type ssh from the windows command prompt and it works). The Qt Creator documentation (http://qt-project.org/doc/qtcreator-2.8/creator-version-control.html) tells me that I should
"Select Tools > Options > Version Control > Git. Select the
Environment Variables and the Set "HOME" environment variable check
boxes."
The set "HOME"(...) box is checked, but there is no "Environment Variables" box. The SSH prompt command is set to C:\Program Files (x86)\Git\bin\ssh.exe, but I have tried setting it to almost every program on \git\bin and git\cmdwithout success. I have found answers here that tell me to use some version of win-ssh-askpass or win-ssh-agent, but those either require Cygwin or come from dubious sources.
What I have always done:
Install Windows (msys)git: select "only add git to PATH". This adds the Git\cmd directory to system/user-wide PATH, which is safe and very useful.
Don't enter anything in Qt Creator for git. It's in PATH, so it "just works".
Probably the most important due to the limited interactivity between git and Qt Creator: make sure your remote host is aware of your SSH key (so you don't need to enter a password, I don't think Qt Creator can handle that, and I believe this is what's going wrong in your case), and make sure your SSH config file contains the IP of the host as trusted (you can check this by running a git clone or git push from the commandline (not "git bash", just a plain cmd. This ensures your environment is similar to what Qt Creator sees.
I stress that nothing else needs setting up, so if you did, you might have broken something that should work with the above steps.
Well, maybe I have a process that seems to work.
If you use a passphrase during the generation of the keys, you'll have to type this passphrase after loading an ssh-agent and add the key to the agent.
Basically, the solution is: follow the instructions on this page:
https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html
BUT, during the generation of the keys DO NOT TYPE A PASSPHRASE.
Obviously, it's 'weaker' from a security point of view.
But, the .bashrc script will work as expected (loading the identity on git bash startup).
It's necessary to setup git\bin , git\cmd and git\usr\bin folders on the PATH environment variables, so the commands "ssh-agent", "ssh-add" will be executed.
After this, the Qt Creator should work fine for remote repository access (fetch, pull and push).

How to install Git Shell

Windows 7 Ultimate
I used to have Git Shell installed. The icon is grey with a cat face. It was either installed by the Git or by GitHub for Windows.
Somehow I've lost it.
I've tried re-installing both Git and GitHub for Windows, but I can't get it back.
If you have GitHub for Windows (installed, it should come with your shortcut.
It is a shortcut to:
C:\Users\Username\AppData\Local\GitHub\GitHub.appref-ms --open-shell
More recent versions of G4W (see answer below) could have it at:
%LOCALAPPDATA%\Apps\2.0\...\...\
C:\Users\Username\AppData\Local\Apps\2.0\GitHub\GitHub.appref-ms --open-shell
If that shell complains about the absence of git, launch "G4W" itself, which will extract git.
See "Where is git.exe located?".
As mentioned below, to restore the shortcut, after having run the first command, execute in the Git shell:
github --reinstall-shortcuts
Try running the following command:
github --reinstall-shortcuts
That repaired the Git Shell shortcut for me, and also put the proper icon back.
I found out that the answer that you specifically wanted involves a combination of the previous answers:
1. Running the Git Shell via the command line (Since you lost the shortcut)
C:\Users\Username\AppData\Local\GitHub\GitHub.appref-ms --open-shell
2. Once youre in the Git Shell run the command in the previous answer
github --reinstall-shortcuts
You'll find the Git Shell with the grey cat icon that originally came with the GitHub setup in the desktop.
Windows 10
Git-2.19.0-64
The Git Shell is installed by default in:
C:\Program Files\Git\git-bash.exe
Try create a shortcut to your desktop, not sure if this answer your question.
The direct link for Git Shell is now:
https://git-scm.com/downloads
I ran into this same issue today, and since this is the first Google result for my query trying to find a solution, I'll post what I sorted here.
It looks like GitHub for Windows installs some or all of itself into %LOCALAPPDATA%\Apps\2.0\...\...\* and this reference was broken on Git Shell .lnk shortcut on the desktop. The GitHub.exe file pointed to did not exist; the entire path was missing.
I viewed properties on the .lnk file (select Properties from context menu or ALT+ENTER on keyboard with .lnk selected) and clicked the Change Icon button. A message box appeared noting that the path to the old icon file was missing and what the bad path was.
I found the "current" path by poking about in the above noted directory and finding GitHub.exe again. The icon is one of three available in GitHub.exe; I expect this is what some of the other answers (like the reinstall-shortcuts suggestion) accomplish.
Hope this helps someone!
(Which seems to be normal for .NET ClickOnce applications; those ... are randomized/obfuscated/generated so they will look like gibberish. My specific working path, as an example, ended up being: C:\Users\anshou\AppData\Local\Apps\2.0\RZ33EP02.2J7\5OMOZAGM.89T\gith..tion_317444273a93ac29_0001.0003_e68db37a99107794 -- note that this path is not truncated, that is the exact path, double period and all.)

git without bash/cygwin

I'm on a vista laptop, trying out git for the first time.
I installed the msysgit version, and it installed a "git bash" shortcut on the desktop. When I run it, it seems to run in a cygwin kind of box, where C:\ is /c/
Is it safe to use git from the windows command line where /c/ is C:\? does that create any conflict with the way git expects the pathes to be like?
What about, if I init from the bash/cygwin console, then commit from the windows console? Does that create any trouble?
Note: Keep in mind that git does not track where the repository is at -- just references. In other words you can cleanly move an entire git directory (.git + working tree) and it still works fine.
It should work in either case assuming your environment variables allow you to run git from the windows command line.
Both point to the same actual directories (although referenced differently), and use the same executable to modify the repository.
When you install MSYS Git, it will give you 3 options related to system paths. Which one you choose will determine how you can use it. It sounds like you want the 3rd option, "Run Git and included tools from the windows command prompt". This will put all of the git-related binaries in the system path, allowing you to use git from a normal command prompt. Be aware that it also overrides a few built-in windows tools, as the warning in the installer says.
After installing msysgit, you should be able to right click on an empty folder and see options "Git GUI here" and "Git BASH here". If you click Git GUI here it will open a GUI. Have fun!

Emacs in Windows

How do you run Emacs in Windows?
What is the best flavor of Emacs to use in Windows, and where can I download it? And where is the .emacs file located?
I use EmacsW32, it works great. EDIT: I now use regular GNU Emacs 24, see below.
See its EmacsWiki page for details.
To me, the biggest advantage is that:
it has a version of emacsclient that starts the Emacs server if no server is running (open all your files in the same Emacs window)
it includes several useful packages such as Nxml
it has a Windows installer or you can build it from sources
And concerning XEmacs, according to this post by Steve Yegge:
To summarize, I've argued that XEmacs has a much lower market share, poorer performance, more bugs, much lower stability, and at this point probably fewer features than GNU Emacs. When you add it all up, it's the weaker candidate by a large margin.
EDIT: I now use regular GNU Emacs 24. It also contains Nxml, can be installed or built from sources, and with this wrapper, the Emacs server starts if no server is running. Cheers!
Note that GNU Emacs for Windows comes with two executables to start Emacs: "emacs.exe" and "runemacs.exe". The former keeps a DOS-Prompt window in the background, while the latter does not, so when if you choose that distribution and want to create a shortcut, be sure to launch "runemacs.exe".
Carl
Easiest way to find where the user init file is:
C-h v user-init-file
Easiest way to open it is (in the scratch buffer):
(find-file user-init-file)
and hit C-j to eval
Well, I personally really like what I have been using since I started with Emacs, which is GNU Emacs. It looks like it is built for windows too. That link also answers your .emacs file question. Here is a place you can download it. You should probably get version 22.2 (the latest).
If this is your first time, I hope you enjoy it! I know I absolutely love emacs!
I run it under cygwin. That also gives me a Unix-ish environment for shelling out commands with meta-!
I use a vanilla version of emacs. In my experience, this is very stable, simple, does everything I need, and doesn't add a bunch of bloat that I don't need. The .emacs file can be placed in C:\Users\YourName if the HOME environment variable is set. This is a great way to handle it because it works on a user basis and mimics emacs behavior on Linux. You can download the zip from any gnu software repository mirror in the emacs/windows folder. You want the file that is named emacs-xx.x-bin-i686-pc-mingw32.zip.
There are some great instructions for configuring emacs for windows here. Basically, "installation" boils down to:
Download emacs from a gnu mirror at emacs/windows/emacs-version-bin-i686-pc-mingw32.zip, and extract the zip to an appropriate folder. Preferably C:\emacs to avoid spaces in the filename.
Set the HOME environment variable to C:\Users\username (or whatever you want). Make it a user-only variable (if it is username-specific). This is where your .emacs file goes.
If you want a start menu or desktop shortcut, create a shortcut to bin/runemacs.exe.
Add c:\emacs\emacs-xx.x\bin\ to your path (user or system), so that you can run it from the command line.
Also, you can consider emacs-w64 for 64bit windows systems:
emacs-w64: http://sourceforge.net/projects/emacsbinw64/
See http://www.gnu.org/software/emacs/windows/ntemacs.html. Section 2.1 describes where to get it, and section 3.5 describes where the .emacs file goes (by default, in your home directory, as specified by the HOME environment variable).
I've run both GNU emacs and Xemacs on windows. I used to use it as my primary editor, email client etc, but not it's "just" an editor.
When I recently reinstalled to Vista I installed the latest GNU version. It works fine. So does Xemacs, but it does look like GNU have got their sh*t together so Xemacs isn't as compelling anymore.
I suggest you to use development version of GNU Emacs 23, which is pretty stable and to be released relatively soon. You can get weekly binary builds from the link below.
Latest GNU Emacs as a zip archive
I have a portable version with .emacs configure ready, which setup org mode, I-do, etc. It also included org sample file. I think that is a better start point for new comers.
Basically run with runemacs.bat and everything is ready.
http://nd.edu/~gsong/portable_emacs.html
I've encountered this problem, and discovered the fault (at least in my case) to be the existence of c:\site-lisp\site-start.el, a file that was created when EmacsW32 was installed, and which was not removed when I uninstalled it. (Vanilla GNU Emacs for Windows has c:\site-lisp in its load-path, and will try to load this file, which somehow winds up triggering that error.)
Solution: removing that whole directory (c:\site-lisp) worked for me, but you should just be able to remove the site-start.el file.
The best place to start, to get an MS Windows binary for GNU Emacs is ... GNU Emacs:
http://www.gnu.org/software/emacs/
(Oh, and how did I find that URL? From the Emacs manual, node Distribution. If you have access to Emacs anywhere, that's the place to go for such information.)
On that page you will see everything you need to know about obtaining Emacs. In particular, you will find a section called Obtaining/Downloading GNU Emacs, which links to a nearby GNU mirror. Clicking that link takes you to a page of links that download all Emacs releases since release 21.
More imporantly here, on that page of links you will also see a directory link named windows. Click that to get a page of links to Emacs binaries (executables) for MS Windows. That is the page you want.
Knowing the above information can help when you need to find the page again, if you haven't bookmarked it. But here is the final URL, directly: http://mirror.anl.gov/pub/gnu/emacs/windows/
When forced to use Windows, I ...
Download "Emacs for windows", and save it in some directory (henceforth referred to as EMACS_SOMEWHERE)
Drop a .cmd file in "Startup" to map, "My Documents" to H: drive with subst, or if "My Documents" resides on a remote server, I use the "Map Network Drive" thing in Explorer to have "My Documents" named H:. Then I create an environment variable named HOME in Windows and give it the name of "H:\". Now I can drop my .emacs file in "My Documents" and it will be read by emacs when it launches.
Then I create the H:\bin directory. Then I add "H:\bin" to my Windows "Path" environment variable.
Then I create a H:\bin\emacs.cmd file. It contains one line:
#call drive:\EMACS_SOMEWHERE\emacs-23.2\bin\emacsclientw.exe --alternate-editor=c:\programs\emacs-23.2\bin\runemacs.exe -n -c %*
This is a fair bit of work, but it will enable me to run the one and same emacs from either a windows command prompt or from a cygwin command prompt, provided that /cygdrive/h/bin is added to my cygwin PATH variable. Haven't used this setup for a while but as I recall, when I call the emacs.cmd with a new file over and over, they all end up being buffers in the one and same emacs session.
There was https://bitbucket.org/Haroogan/emacs-for-windows with the latest Emacs 25, but the whole page has been removed.
The benefit of this build and the emacs-w64 above is that they come with jpg, png, tiff DLLs as well as lxml DLL, which is needed for the new eww web browser.
I prefer to run Windows 10 + VcXsrv + Emacs 25 client in WSL. Emacs is my shell.
To access the .emacs file for your profile the easiest way is to open up emacs. Then do C-x C-, type in ~USERNAME/.emacs (or you can use init.el or one of the other flavours). Type your stuff into the file and C-x C-s (I think) to save it.
The actual file is located (in Windows XP) in c:\Documents and Settings\USERNAME.emacs.d(whatever you named the file), or the equivalent spelling/location on your system.
You can download GNU Emacs NT from here direct. It works fine in windows, make sure you create a shortcut to the runemacs.exe file rather than the emacs.exe file so it doesn't show a command prompt before opening!
XEmacs is less stable than GNU Emacs, and a lot of extensions are specifically written for GNU. I would recommend GNU > X.
You can place the .emacs file in the root of the drive it's installed on. Not sure whether you can add it elsewhere too...
Im using emacs32, I only have one problem with it really:
https://stackoverflow.com/questions/3625738/comint-previous-matching-input-in-emacsw32-is-not-interactive
If You Mean Emacs as Latex Editor for Windows 7.
Emacs4LS (Emacs 4 Latex Support under Windows 7) for newcomer for Emacs.
http://chunqishi.github.io/emacs4ls/
Easy Steps to Install.
Plugins Built-In.

Resources