The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,087 other followers

Archive for the ‘Subversion/SVN’ Category

getting a svn compatible patch diff from the latest commit in a git branch

Posted by jpluimers on 2020/09/03

git diff --no-prefix @~

Via various sources:

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, Subversion/SVN | Leave a Comment »

Syncing GExperts svn to git

Posted by jpluimers on 2020/07/23

A while ago, I made a synced git repository and put it on [WayBack] GitHub – jpluimers/GExperts: Synced every now and then from git svn clone https://svn.code.sf.net/p/gexperts/code/trunk GExperts.

I forgot to save my initial notes, but they were based on what I did before with [WayBack] jeroenp / fastmm — Bitbucket**, so I resurrected my notes, after a chat with Graeme Geldenhuys on how he did a similar thing for Indy at

[WayBack] GitHub – graemeg/indy: Indy (Internet Direct) framework. This is an unofficial mirror repository which gets synced every 15 minutes. It contains the full history from the official Indy 10 SVN repository.

So here are my notes, as on GitHub they look odd:

[WayBack] GitHub – jpluimers/GExperts

Synced every now and then from git svn clone https://svn.code.sf.net/p/gexperts/code/trunk;

Syncing steps:

first time

git svn clone https://svn.code.sf.net/p/gexperts/code/trunk GExperts.git-svn
git remote add origin https://github.com/jpluimers/GExperts.git
git push origin master

each additional time from inside the GExperts.git-svn directory:

git svn fetch
git svn rebase
git push origin

It is very similar to what Graeme does for Indy in a cron job for each subsequent sync from https://svn.atozed.com:444/!/#Indy10/view/head/trunk/Lib to https://github.com/graemeg/indy:

#!/bin/sh
# Fetches latest revisions for Indy SubVersion repository
# and then pushes changes to GitHub.
# Created by Graeme Geldenhuys 

GIT="/usr/bin/git"

cd /data/git/indy.git/
$GIT checkout master
$GIT svn rebase
$GIT gc --auto
$GIT push github

And to my FastMM notes:

Getting the latest SVN changes:

git svn rebase

Initial repository creation and add to bitbucket (or github)

git svn clone http://svn.code.sf.net/p/fastmm/code/ FastMM.git

Notes (see [WayBack] Effectively Using Git With Subversion | Viget and [WayBack] Practical tips for using Git with large Subversion repositories for explanation):

  1. Do not include the -s option after git svn clone, as this SVN repository does not have the default trunk/branches/tags structure.
  2. There are no [WayBackSVN ignore entries in this repository, so this is not needed for git svn show-ignore > .gitignore

Add the repository to Bitbucket or GitHub:

Add either of these URLs to  [WayBack] Feedly for monitoring:

Some additional tidbits:

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, Subversion/SVN | Leave a Comment »

“error: invalid object 100644” “git svn”

Posted by jpluimers on 2020/07/14

A while back, while using “git svn”, on a Windows system, I got [Archive.is“error: invalid object 100644” “git svn” – Google Search after statements like this:

# git svn rebase
error: refs/remotes/git-svn does not point to a valid object!
error: invalid object 100644 ac7df132f5bd7d639fc525f1f0204a546658d0c5 for 'Source/ToDoList/GX_ToDo.pas'
fatal: git-write-tree: error building trees
write-tree: command returned error: 128

# git svn fetch
error: refs/remotes/git-svn does not point to a valid object!
error: invalid object 100644 ac7df132f5bd7d639fc525f1f0204a546658d0c5 for 'Source/ToDoList/GX_ToDo.pas'
fatal: git-write-tree: error building trees
write-tree: command returned error: 128

In my case, regular git operations (like branching, committing, pushing, etc) worked fine, but git svn would fail.

One problem was that [Archive.is“error: refs/remotes/git-svn does not point to a valid object” – Google Search only returned one un-meaningful result: [WayBack] gist:87613 · GitHub.

Luckily, I had a backup (though it was from a while ago as that VM had not been in use for quite some time) which is the first part in [WayBack] Git FAQ – Git SCM Wiki: How to fix a broken repo?.

Since I was still interested finding out how to resurrect, just in case this happens at a time the backups do not go back far enough, I tried the steps below.

The very first fixing step is to ensure you can quickly restore things, or even better: operate on a copy of the broken pieces. On Windows, robocopy /mir is my friend for this, in Linux rsync -avloz (although on some systems, -z crashes).

TL;DR from the fixing steps

Find out what problems you have, and in which order to fix them. Otherwise you will break more stuff and take longer to fix it.

In this case, two things failed: one on the git side, and one on the git svn side. Since git svn depends on git, the best approach is to fix the git problem first, then the git svn thing.

Fixing this manually try 1

Read the rest of this entry »

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, Subversion/SVN | Leave a Comment »

svnrdump for dumping and loading remote svn repositories – twm’s blog

Posted by jpluimers on 2019/05/31

One day I will likely need svnrdump:

Since I keep forgetting what the tool is called and how to use it: svnrdump is a tool that can dump a remote svn repostory to a text file and also load that text file into a different remote svn repository…

Via: [WayBack] Since I keep forgetting what the tool is called and how to use it: svnrdump i…

–jeroen

Posted in *nix, Development, DVCS - Distributed Version Control, Power User, Subversion/SVN, Windows | Leave a Comment »

Delphi: uninstalling the ancient CollabNet 1.7.5 version

Posted by jpluimers on 2018/10/24

Somehow the integration team at Embarcadero still hasn’t discovered there are [WayBack] newer CollabNet SVN Client versions than 1.7.5 which has been shipped since Delphi XE3 until Delphi XE6. The newer version (currently 1.8.8 when writing this, now 1.10.2 in 2018) have plenty [WayBack1/WayBack2SVN security issues fixed.

The easiest way to uninstall the CollabNet SVN Client is running this small script:

call :start %ProgramFiles%
call :start %ProgramFiles(x86)%
goto :end
:start
startlocal
set CollabNet="%*\CollabNet\uninst.exe"
echo %CollabNet%
if exist %CollabNet% start "CollabNet uninstall" %CollabNet%
endlocal
goto :end
:end

Then install the [WayBackSlik SVN client. Like [WayBackЈοеу, I’ve switched to [WayBackSlik SVN a long ago. Here is [WayBackhis reasoning:

I have long since stopped using the CollabNet-branded version because it’s behind a registration wall. I found Slik SVN as a good alternative. It’s exactly the same command-line client you get from CollabNet, sans the hassle in downloading it.

I hope someone at Embarcadero enters this in QC^w QualityPortal as I’m awaiting Embarcadero response about a security issue there.

–jeroen

Posted in Delphi, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, QC, Software Development, Source Code Management, Subversion/SVN | 2 Comments »

 
%d bloggers like this: