Svn Externals Check-out Of Bzr Repo? - bazaar

Is it possible to check-out a Bzr repo via Svn externals using an Svn client?
If Bzr is being served over Web-DAV (it is in my case) it seems like it should be possible, unless Svn needs all the ".svn" folders.

You can use the bzr-svn plugin to push the bzr branch into you svn repository, then you can use that as an external.

No. Cause Bzr is working different than subversion and the SVN client does not know how to handle a bzr repository.

Related

Forbid git svn local branch from committing to the remote svn repository

I'm using git-svn to handle and commit to a svn repository.
I also have created a local branch with commits that I don't want to be committed to the repository.
For safety, I want that branch to be able to do "git svn rebase" but "git svn dcommit" should fail (it doesn't have to be a pretty solution, I just want to make sure that the commits in that branch do not get committed by mistake).
Is there a way to setup the local branch like this ?

How can I tell what svn version my git-svn repository is based on?

I've cloned an SVN repository into git using git-svn, but I'm having trouble rebasing and I thought to work around it by using svn to generate a patch between the old SVN revision I'd used to clone my git repo in the first place and the current version. That way I could just apply the patch and call it rebased.
Any idea how I can find the SVN revision number my current git-svn clone is based on?
git svn find-rev git-svn will print what you want.
If you do git log you should be able to see a history of all commits in your repository. The first of these will correspond to the SVN revision that your git repository was cloned from.
So, you might see something like this:
commit e3223a9f72fa80b16dbe1a471c73657a4cacee3d
Author: joe <joe#31875c6e-e9e7-0310-b337-c57ebf30f660>
Date: Tue Feb 22 14:30:26 2011 +0000
PO-310: Commit message here
git-svn-id: https://svn.myrepo.com/development/trunk#51174 31875c6e-e9e7-0310-b337-c57ebf30f660
In this instance, you can see that I have cloned from revision 51174 of the remote SVN repo (fake paths and names used here)
You can simplify the output from git log by using the --skip=<number> option (e.g. git log --skip=100, though this requires you to have some idea of the number of commits since you initially cloned the repository.

Commit git-svn changes to SVN repo

we have a central SVN repo in our company. I use git-svn on my laptop to be able to use a repo, when I'm not connected to the company network.
Now I was 3 weeks on a business trip and committed a lot to my local Git repo. There were also many commits to the SVN repo.
When I try "SVN Rebase" I have to edit conflicts in each of my Git changesets. What I would like to do is just to commit all of my local changes at once and then edit conflicts only once.
I'm fairly new to Git, so I don't know how this is done properly and if this is the best way.
I use TortoiseGit on Windows, so up to now I didn't really care about the command line.
Thanks for your help.
Once you go through conflict resolution in git-svn rebase once you are in a new tree with new commits that include your resolutions. A future git-svn rebase will not encounter the same problems (unlike repeated merges, which is where rerere comes in handy).
If by "commit all my local changes at once" you mean you want to fold all of your commits into a single commit in git (and later SVN) then you can use git rebase -i to "squash" all of your commits into a single commit. You should not include any revisions that have already been sent to SVN with dcommit in that rebase -i because you are rewriting history. You will still have to resolve conflicts when you git-svn rebase just like you would if you were using only SVN and did svn update.

How can you use git-svn to clone parts of an SVN repo, but still get all the branches

Is there any way to use git-svn to clone only some folders of an SVN repo structure. I'm trying to clone a repo that has some crazy big binary files and a number of subfolders that are just plain useless. I've tried using the --ignore-paths option, but my clone seemed to just stall out doing nothing for an extremely long time. Have any of you managed to make --ignore-paths work? I can't find much on the webs where anyone else is running into this. Maybe I'm the only one.
We've used the "ignore-paths" feature to ignore certain directories in a svn repo:
[svn-remote "svn"]
ignore-paths = ^(((branches|tags)/[^/]+|trunk)|)(huge/|mobile/)
This config ignores the "huge" and "mobile" subdirs of the repository in trunk, all branches and all tags.
Perhaps you can illustrate the structure of your Subversion repository to make it easier for us to suggest some solutions.
Are you trying to git svn clone the entire repository from the root-url? Have you tried cloning smaller parts of the repo, and then perhaps grafting several clones together?
The most success I've had here is to manually create branches in git that mirror the SVN remote repository when necessary. The process has been the following:
Update .git/config file with:
[svn-remote "svn-branch-alias"]
url = http://svn/branches/crazybranchname/craziername/url/
fetch = :refs/remotes/git-branch-name
From the command line type: git svn fetch 'svn-branch-alias' to collect the SVN branch data into your local git repo.
Then type: git checkout 'git-branch-name' to go into a headless mode.
Finally type: git checkout 'my-local-git-branch-name' to create move head to the latest submission in that branch and create a local branch alias you can use.
You can now commit and dcommit as usual and still switch between various local git branches and your manually created SVN mirrors using the usual mechanisms.

Using git and svn both as shared repositories

We have multiple teams working on a common svn repository. Is there a way to have one of the teams to work on git and other teams continue using svn.
What I like to do is have a shared (central) git repository for one of the "GIT" team (multiple developers). The "GIT" team Developers clone from shared git repository to dev. machines and push changes to shared git repository.
Merge the changes from shared Git repository to SVN periodically.(we could call this as promoting code to central SVN repository).
Sure, git-svn should let you set that up just fine. You may want to move the question to superuser as it's not really something you have to program after all;-)