Is there a way to check out from CVS using Windows command line (cmd) given the branch, package, and destination dir?
cvs -q -d <CVSROOT> co -r <BRANCH> -d <DESTINATION> <PACKAGE>
CVS is a monolithic executable, which doesn't have an API as such.
So to execute a CVS command, you use std::system( "cvs command params" ) or similar, just as you would have done from the command line.
Related
When doing git status on the command line, git lists modifications:
and then I go to Eclipse and do Assume Unchanged via menu on one of the files listed above:
and then rerunning git status on the command line again, I'm seeing that the file has been (properly) removed from the listed modifications:
I'm wondering what does this Assume Unchanged menu command equates to in terms of Git commands? What about other choices from that menu (Untrack & Replace with HEAD Revision)?
Is it possible to see the Git commands running behinds the scene in Eclipse when executing those menus?
Eclipse does not delegate to the command line but uses JGit which is a pure Java implementation of Git directly accessing the files in the .git folder. You don't need to have the command line Git installed to use Git in Eclipse.
The Assume Unchanged Git command line equivalent is:
git update-index --assume-unchanged
See also:
Git documentation: git update-index
Because Eclipse uses the same terms, the Git command line equivalents are easy to find.
Git bash is closing automatically in a fraction of second after installation how to fix this?
check whether you've installed git properly, open your command prompt or git bash then type
git --version
C:\Users\07>git --version
git version 2.16.1.windows.1
if you're able to get git version something like this then git is installed in your system. If you're getting any errors or not able to open the command prompt or git bash just check whether you've added git path to your system if not add path and check it once again. Refer this for the installation process and check with the release notes as well.
I would like to use WSL (Bash on Windows) Git with VSCode instead of Git for Windows to avoid multiple Git installations.
I created a simple bat script to emulate git.exe comportment by redirecting git commands in WSL. It works nicely in CMD but not with VSCode. Also, WSL is my default terminal in VSCode.
VSCode settings.json:
{
"git.path": "D:\\tools\\git.bat",
"terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\bash.exe"
}
and git.bat:
#echo off
bash -c 'git %*'
Any idea to make VSCode working with WSL Git ?
Since VS Code 1.34 (April 2019) a remote extension has been introduced to develop into WSL: https://code.visualstudio.com/docs/remote/wsl.
Basically, a server instance of VS Code is started into WSL, allowing you to use all the WSL tools (e.g. git) from your client instance on Windows.
Thank you for pointing that out #Noornashriq Masnon!
I created a small tool to solve this for myself, and hosted it on GitHub.
Basic git functionality seems to work, like viewing changes and committing.
A ready-to-use binary can be downloaded from the Releases page.
One of the problems is that the input paths need to be translated from the Windows representation (C:\Foo\Bar) to the Linux paths in WSL (/mnt/c/Foo/Bar), and back again for paths in the output of git.
For example, the Git plugin in VSCode uses the command
git rev-parse --show-toplevel
to find the root directory of the git repository, but with WSL git this of course returns a Linux path that needs to be translated for VSCode on Windows.
Provide the full path for the bash exec :
git.bat :
#echo off
c:\windows\sysnative\bash.exe -c "git %*"
What you can do is to first try wslpath and if that fails you try a normal git command. It's not ideal but it works.
See: Use WSL git inside VS Code from Windows 10 17046
I'm trying to get sources from
:pserver:anonymous#dev.eclipse.org:/cvsroot/eclipse
using git csvserver. I've just read Best practices for using git with CVS and tried different commands including
git cvsimport -p xCW2quwz6OlRE -d anonymous#dev.eclipse.org:/cvsroot/eclipse /cvsroot/eclipse
but I don't get past the password prompt (the password in the above line is probably pure nonsense, but it doesn't matter). According to the eclipse CVS_Howto the password should be empty (I've tried leaving the -p option out as well).
cvs -d :pserver:anonymous#dev.eclipse.org:/cvsroot/eclipse login
git cvsimport -v -d :pserver:anonymous#dev.eclipse.org:/cvsroot/eclipse -C eclipse -r cvs -k <module_name>
Choose module_name from http://dev.eclipse.org/viewcvs/viewvc.cgi/ e.g platform
Cheers,
Max
As mentioned in the comments, there are mirrors of most of the CVS projects in a git mirror site.
There are also a number of eclipse projects in the process of moving from CVS to Git. See http://git.eclipse.org/ for a list of projects moving. SWT is in the process of moving now.
I just ran a perl script to replace all occurances of one word for another for my whole project.
ie:
perl -e "s/OLD/NEW/g;" -pi $(find ./ -type f)
I want to commit these changes to subversion, but when i run "svn status", none of the modified files appear on the list.
The same thing occurs in TortoiseSVN using the "Check for modifications".
Did this perl script bypass some method that SVN uses to check for changes somehow?
Your script operated on the local svn backup copies in the .svn folder. That's what svn uses to compare changes.
Update: the newer versions of subversion don't keep a local .svn folder.
You need to make that command:
perl -e "s/OLD/NEW/g;" -pi $(find ./ -type f | grep -v '/\.svn/' )
That grep command is so common on my commands that grep through subversion directories.
It could have happened that your perl script changed the subversion files...