How to version control a directory in a Mercurial repository using CVS? - version-control

I have a Mercurial repository hg-repo which has a directory cvs-dir that I want to simultaneously version control in CVS, and commit to a CVS repository:
$ ls hg-repo
cvs-dir other
The rest of the Mercurial repository such as other should not be bothered by CVS any how. How to set this up?
Edit
If I simply create a symbolic link (ln -s) to cvs-dir in a different CVS working copy directory cvs-repo
$ pwd
/home/foo
$ ls
hg-repo cvs-repo
$ ls -a cvs-repo
cvs-dir -> /home/foo/hg-repo/cvs-dir
then
do any CVS work from within /home/foo/cvs-repo such as committing the working copy to CVS repository;
write .cvsignore to ignore Mercurial meta data, and vice versa,
will this method have some potential problems?

This can help and is how I do this
First: Get the CVS repository locally.
Second: Create a mercurial repositories locally over this CVS repository. This will be used as your remote mercurial server.
Third: Clone this mercurial repository and do you work here.
Mercurial provides better merge support than cvs and will make your work easier. Commit back to CVS needs an extra step. Here is how this works, step-by-step. The workflow looks complicated, but is actually easy. Keep the flow-charts close.
Detailed step-by-step explanaition with flowchart

Related

eclipse github desktop ignore error

error: Your local changes to the following files would be overwritten by merge:
adminpage/.metadata/.log
adminpage/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
adminpage/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs
adminpage/.metadata/.plugins/org.eclipse.datatools.sqltools.result/results
adminpage/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
adminpage/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/server-config.json
adminpage/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/server-config.json
Please commit your changes or stash them before you merge.
Aborting
Use the git hub desktop.
The team members share their performance with a git, and every time they commit it, they are outweighed by the difficulty of printing.
I've tried everything on the Internet, and I've tried to do this, and I've tried to do this, and I've tried to change this, and I'm not going to go through this.
I'm creating a jsp based web source with Eclipse, but I don't know what's wrong with it.
I'd like to get the help of millions of experts here.
If you can, it would be easier to ignore the .metadata/ folder entirely:
git rm --cached -r adminpage/.metadata
echo "adminpage/.metadata/" >> .gitginore
git add .gitignore
git commit -m "remote and ignore adminpage/.metadata"
git push
Repeat that in every branch where that folder is still tracked, and the error should not be seen again.

How to ignore eclipse metadata but preserve the template?

I've got an ARM project in Eclipse...Actually, I'm using the STM Workbench packaging of Base-CDT-Eclipse.
I'm working with a few other guys and we're using a git server to push and pull from.
However, everyone has a little bit different setup as far as where their toolchains are, OS's, etc.
This is causing trouble, because we're git dummies, and when we push changes after working locally, we do
git add .
git commit -m "some message"
git push origin master
And when we pull changes, we just do
git pull origin master
And pray that there no one else did anything in the meantime, because we're afraid of merging differences, but that's a different story.
Anyway, this whole project has a few sub directories that include things like datasheets, Word documents, and what-not...but, it also includes the metadata for the Eclipse project. So, the last person to commit also pushes their unique settings for things like tool-chain path, preferred builder, etc. This breaks the other guys' setup and after each pull, everyone else has to manually update their project settings to fix this.
So, what files are special to Eclipse for project settings and how can I tell git to ignore these files if they already exist? They need to be available for, say, a git clone but they need to be ignored for subsequent git push's and git pull's.
If you need the setting file and not rename it and it's ok forsetting file need not to do version control, so there is a way by .gitignore with below steps:
Create a .gitignore file. touch .gitignore
Edit and save the .gitignore file
.gitignore
filename
Remove the caches from version control. git rm --cached filename
Commit and push
You can ignore those files changes locally with:
git update-index --skip-worktree -- .project
git update-index --skip-worktree -- .classpath
See: "Difference Between 'assume-unchanged' and 'skip-worktree'", it should better resist to git pull.
Another option would be to a content filter driver which generates (automatically on git checkout) a .classpath if it does not yet exist.
That allows you to version a .classpath.tpl template, and you can keep your actual .classpath completely private (and in your .gitignore)
See this answer for more.

Creating a new repo from a directory of old repo

I am very new to bazaar and I am exploring the features of it (and of version control system)
I have a bazaar repo, lets call it 'foo'. Under foo repo I have a directory, lets call it 'projects'.
so, I want to create a separate bazaar repo with only projects directory & I want to retain the log too. I mean to say, everything that is related to project folder present in log file, should be available with this new repo.
I tried export command, but I just got the directory without any log.
Any pointers where I should look ?
You can do this using the fastimport plugin:
bzr fast-export /path/to/orig/project | \
bzr fast-import-filter -i project1/ | \
bzr fast-import - /path/to/new/project1
(I broke the line for readability)
The first command dumps the revisions of the branch at the specified path to standard output
The second command filters the revisions, selecting only the ones that affect the project1/ directory. The trailing / is important.
The third command imports the revisions from the standard input to the specified branch. If the branch does not exist, bzr will create a shared repository with a branch named trunk in it.
For more details, see the help pages:
bzr help fast-export
bzr help fast-import-filter
bzr help fast-import
The fastimport plugin is included in the default installation on Windows and Mac OS X. If you have a more exotic setup, I recommend installing it with pip. I don't remember 100% the package name, maybe bzr-fastimport. You will also need the fastimport python library.

Directories of Java class files found in Git repository cloned from BitBucket, but I can't figure out how to remove them

I created a BitBucket repository of several Eclipse projects, and then used Eclipse with EGit to clone that repository to a new Eclipse workspace to check whether I had put all of the files into BitBucket right.
The projects in the new workspace contained *.class files in their bin directories, and I realized that I had neglected to delete those files from the Eclipse project directories in the original workspace before adding the projects to the repository.
However, the BitBucket web page for my repository doesn't display any bin directories in the various Eclipse project directories, and when I try to remove the *.class files from the repository that I cloned, I get an error message that says, for example, "fatal: pathspec 'EclipseProjects/IndexerUtils/build/uw_solr/CmdLineOption.class' did not match any files".
I assume this means that the class files are not being tracked, but I'm not sure. I don't know Git well enough to figure out how to find out whether they are tracked or not. Their presence does not cause "git status" to say that untracked files were found, but if I try to remove any of them, Git says it doesn't know about them. In the meantime, BitBucket doesn't display any of the class files in its repository, but when I clone its repository, all of the class files are included in the new repository that is created.
Is there a Git command that can tell you whether a specific file is being tracked or not? If the *.class files are being tracked, how do I remove them, since apparently "git rm " doesn't work? If they aren't being tracked, why do they show up when I clone my BitBucket repository? What kinds of basic diagnostic commands does Git have that could help me figure out what state my repository is in?
Thanks,
Mike
do you have a case collision; try setting following and see if you can see and remove file using git rm command.
git config --global core.ignorecase true
Please note this "git rm" removes file from that commit onwards. If you want to remove file thoroughly please consider filter-branch
example: git filter-branch --tree-filter 'rm filename' HEAD

What's a good version control system to use to version my whole local filesystem?

I'm in the specific use case of wanting to methodologically document everything significant I do while setting up my new workstation (running Mac OS X Lion).
I would like to version control, in the same repository, files that are at totally different places on my file system, for instance files in /etc, ~/, /Libraries, etc.
Some thoughts/details on my requirements:
This repo will be for personal use only. I'll use a GUI client to browse my settings history.
I initially wanted to use Git, hosted in one large Github private repository, but as you can't clone subfolders the way you would do it with SVN, I'd have to create symlinks everywhere, which does not seem convenient.
So, would I be better off setting up a local SVN server and just checking in the files I want, when I want to version them?
You can use Mercurial, Git, ..., and then simply ignore all the files you don't want to version. Create the repository in the root and track the rest. Like (for Mercurial):
$ cd /
$ hg init
$ echo ".*" > .hgignore
$ echo '^(?!(etc|Libraries))' > .hgignore
$ hg add
$ hg commit -m "initial checkin"
An alternative is to use more specialized tools such as etckeeper that are made for tracking configuration data.