Re: git-svn set-tree bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2007-06-10 at 23:58 -0700, Steven Grimm wrote:
> Eric Wong wrote:
> > Doable?  Yes.  However, I think using grafts is quite hackish and
> > unreliable[1].  I'd rather just have users using set-tree if
> > they want to deal with non-linear history in the first place.
> >   
> 
> Agreed about grafts being hackish and unreliable. But they were what I 
> had to work with, given that I know little enough about git-svn's 
> internals to be able to implement Junio's more robust idea.
> 
> IMO set-tree is not much of an option. In my environment it is 
> unacceptable for there to be any possibility of accidentally and 
> silently overwriting some other change that just happened to hit the svn 
> repo right before I committed my change, which (unless it has changed 
> since I last tried it) set-tree will happily do. I can get away with 
> doing that maybe once before my company's release manager will, quite 
> justifiably, require me to stop using git and switch back to the 
> standard svn client.
> 
> > I'd personally avoid any sort of non-linear history when interacting
> > with SVN repositories, however.
> >   
> 
> Which is a shame since git loses a lot of its utility without nonlinear 
> history. For example, the script I posted uses git to do merges between 
> svn branches. It works wonderfully even if, as you and Junio point out, 
> its use of grafts to record svn merges scales poorly and is potentially 
> susceptible to corruption. Thanks to the ability to record the fact that 
> my merges between svn branches were actually merges, my git clone has a 
> more complete picture of what's in my svn repository than the svn 
> repository itself does!

Exactly, I too think that this is a much needed feature for git-svn.

I have also noted that this modified(added a git svn dcommit) script 
works:
rm -rf mygitsvn
rm -rf mysvnrepo
rm -rf mysvnwork
mkdir mysvnrepo
cd mysvnrepo
svnadmin create .
cd ..
svn checkout file:///$PWD/mysvnrepo mysvnwork
mkdir -p mysvnwork/trunk
cd mysvnwork/
cat << EOF  > trunk/README
#
# (C) Copyright 2000 - 2005
# Wolfgang Denk, DENX Software Engineering, wd@xxxxxxxx
#
# See file CREDITS for list of people who contributed to this
# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#

EOF

svn add trunk
svn ci -m "first commit" trunk
cd ..
git-svn clone  file:///$PWD/mysvnrepo -t tags -T trunk -b branches  mygitsvn
cd mygitsvn

git checkout --track -b svn remotes/trunk
git checkout -b merge
echo new file > new_file
git add new_file
git commit -a -m "New file"

echo hello >> README
git commit -a  -m "hello"

echo add some stuff >> new_file
git commit -a -m "add some stuff"

git checkout svn
mv -f README tmp
echo friend > README
cat tmp >> README
git commit -a -m "friend"
git svn dcommit
git pull . merge
git svn dcommit

but, as expected, then merge commit is still gone.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux