# svn update ou # svn up -r
# svn revert --recursive .
ver versão
mostra o autor que alterou cada linha do arquivo.
svn blame | less
buscar "#define EINA_LIST_FOREACH(" sem procurar nos diretorios escondidos .svn
grep --exclude="*\.svn*" -R -A 5 "\#define EINA_LIST_FOREACH(" *
Para gerar patch
svn diff > meupatch.diff
Ver patch colorido
para aplicar patch a copia local
# svn info
ver aterações em colorido
# svn diff | colordiff | less -R
mostra o autor que alterou cada linha do arquivo.
svn blame
buscar "#define EINA_LIST_FOREACH(" sem procurar nos diretorios escondidos .svn
grep --exclude="*\.svn*" -R -A 5 "\#define EINA_LIST_FOREACH(" *
cat meupatch.diff | colordiff | less
patch -p0 -i meupatch.diff
Git SVN
Referencia: Manual do Webkit
Resetar configurações SVN
# rm -rf .git/svn
Pegar todos os branchs
# git svn fetch --fetch-all
Git SVN
Referencia: Manual do Webkit
cd WebKit
git svn init -T trunk http://svn.webkit.org/repository/webkit
git update-ref refs/remotes/trunk origin/master
[svn-remote "svn"]
url = http://svn.webkit.org/repository/webkit
fetch = trunk:refs/remotes/trunk
git svn fetch
git svn rebase
If you don't fetch new revisions from Subversion very often and find fetching them one by one too slow, you can modify the svn section in your .git/config file to point directly to the refs/remotes/origin/master rather then refs/remotes/trunk which is how it is set up by default. In this case 'git svn fetch' will be way faster if done after "git fetch" or "git pull", since it'll realize it already has all the revisions locally. Edit your svn entry to look like this:
[svn-remote "svn"]
url = http://svn.webkit.org/repository/webkit
fetch = trunk:refs/remotes/origin/master
and then re-build the svn index by doing 'git svn fetch' once.
Referencia: Multiple branches using git-svn
Referencia: Multiple branches using git-svn
Now, we want to add a second remote branch to our local git. To do this, edit your
.git/config file. You've probably got soemthing like this in there:
[svn-remote "svn"]
url = svn+ssh://your-server/home/svn/project-name/trunk
fetch = :refs/remotes/git-svn
To track a second branch (for this example, it's "branches/3.4.x"), you want to add:
[svn-remote "svn34"]
url = svn+ssh://your-server/home/svn/project-name/branches/3.4.x
fetch = :refs/remotes/git-svn-3.4
You're just adding a new svn-remote stanza with a new svn-remote name, url, and
fetch target.
Next, we want to pull that branch:
git-svn fetch svn34 -r MMMM
Again, pick for the MMMM revision a value that's a) somewhat recent, or you'll
wait forever, and b) actually on the branch you want to retrieve.
Now, 'git branch -a' should show a new remote branch named git-svn-3.4. You
don't want to mess with this remote branch, so we'll want a local master to
edit and/or branch from:
git checkout git-svn-3.4
git checkout -b master-3.4.x
Now we've got a new master-3.4.x that can be used for git-svn rebase and
dcommit just as your old master could. From here, cherry-pick the patches you
want to backport to your branch, and then dcommit them back to svn.
Resetar configurações SVN
# rm -rf .git/svn
Pegar todos os branchs
# git svn fetch --fetch-all
No comments:
Post a Comment