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,091 other followers

Posts Tagged ‘software’

Just filed Mercurial Bug 4043 – HG 2.7.x cannot convert a local file based SVN repository with db format 6 (works fine with db format 4)

Posted by jpluimers on 2013/09/26

Converting SVN repositories to HG isn’t always as straight forward as you want to.

GExperts and GExperts-Formatter succeeded a while ago, but DSharp (a very nice library by Stefan Glienke) failed at first.

It so happens that in the mean time, I switched VM’s to Delphi XE5 with a fresh list of VCS installs:

That was the cause: this new setup caused a new SVN db format for local synced file based SVN repositories that HG cannot not cope with.

It worked fine when I went back to a VM that had this config:

So I won’t forget to keep an eye on progress, I filed this Bug 4043 – HG 2.7.x cannot convert a local file based SVN repository with db format 6 (works fine with db format 4):

HG 2.6.x and 2.7.x cannot convert SVN repositories with db format 6 that SVN 1.8.x defaults to.

(SVN db format list: see http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_fs_fs/structure)

This works fine when performing svnadmin/svnsync on SVN 1.7.5 (they will get a db format 4), but fails when performing svnadmin/svnsync on SVN 1.8.x (they will get a db format 6)

I’ve tried the matrix of SVN versions 1.7.5, 1.8.1 and 1.8.2 versus HG 2.6.2, 2.7 and 2.7. HG consistently fails with db format 6.

The error message you get is this:

file:///C:/Users/developer/Versioned/DSharp.svn does not look like a Subversion repository

from the command here:

C:\Users\developer\Versioned>hg convert --verbose file:///C:/Users/developer/Versioned/DSharp.svn DSharp
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a CVS checkout
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a Git repository
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a Subversion repository
file:///C:/Users/developer/Versioned/DSharp.svn is not a local Mercurial repository
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a darcs repository
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a monotone repository
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a GNU Arch repository
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a Bazaar repository
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a P4 repository
abort: file:///C:/Users/developer/Versioned/DSharp.svn: missing or unsupported repository

Two of my tries that shows success/failure and got me in the right direction:

Success:

C:\Users\Developer\Versioned>svnadmin create DSharp.svn
C:\Users\Developer\Versioned>echo exit 0 1>DSharp.svn\hooks\pre-revprop-change.bat
C:\Users\Developer\Versioned>svnsync init file:///C:/Users/Developer/Versioned/DSharp.svn http://delphisorcery.googlecode.com/svn
Copied properties for revision 0.
C:\Users\Developer\Versioned>svnsync sync file:///C:/Users/Developer/Versioned/DSharp.svn http://delphisorcery.googlecode.com/svn
Committed revision 1.
Copied properties for revision 1.
Transmitting file data ……….
Committed revision 630.
Copied properties for revision 630.
C:\Users\Developer\Versioned>hg clone https://bitbucket.org/jeroenp/dsharp DSharp.hg
no changes found
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
C:\Users\Developer\Versioned>hg convert file:///C:/Users/Developer/Versioned/DSharp.svn DSharp.hg
scanning source…
sorting…
converting…
628 Initial directory structure.
627 First version
1 – refactoring for yield support (renamed DSharp.Collections.Yield.pas to DSharp.Collections.Iterators.pas)
0 – added XE4 packages
C:\Users\Developer\Versioned>svn –version
svn, version 1.7.5 (r1336830)
compiled May 11 2012, 02:21:17
Copyright (C) 2012 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/
The following repository access (RA) modules are available:
* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
– handles 'http' scheme
– handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
– with Cyrus SASL authentication
– handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
– handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
– handles 'http' scheme
– handles 'https' scheme
C:\Users\Developer\Versioned>hg –version
Mercurial Distributed SCM (version 2.6.2)
(see http://mercurial.selenic.com for more information)
Copyright (C) 2005-2012 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\Users\Developer\Versioned>type DSharp.svn\format
5
C:\Users\Developer\Versioned>type DSharp.svn\db\format
4
layout sharded 1000
C:\Users\Developer\Versioned>type DSharp.svn\db\fs-type
fsfs
C:\Users\Developer\Versioned>type DSharp.svn\db\min-unpacked-rev
0
C:\Users\Developer\Versioned>dir DSharp.svn DSharp.svn\db
Volume in drive C has no label.
Volume Serial Number is 4665-BAA1
Directory of C:\Users\Developer\Versioned\DSharp.svn
09/26/2013 08:47 AM <DIR> .
09/26/2013 08:47 AM <DIR> ..
09/26/2013 08:47 AM <DIR> conf
09/26/2013 08:55 AM <DIR> db
09/26/2013 08:47 AM 2 format
09/26/2013 08:47 AM <DIR> hooks
09/26/2013 08:47 AM <DIR> locks
09/26/2013 08:47 AM 234 README.txt
2 File(s) 236 bytes
Directory of C:\Users\Developer\Versioned\DSharp.svn\db
09/26/2013 08:55 AM <DIR> .
09/26/2013 08:55 AM <DIR> ..
09/26/2013 08:55 AM 4 current
09/26/2013 08:47 AM 22 format
09/26/2013 08:47 AM 5 fs-type
09/26/2013 08:47 AM 1,997 fsfs.conf
09/26/2013 08:47 AM 2 min-unpacked-rev
09/26/2013 08:55 AM 235,520 rep-cache.db
09/26/2013 08:47 AM <DIR> revprops
09/26/2013 08:47 AM <DIR> revs
09/26/2013 08:55 AM <DIR> transactions
09/26/2013 08:55 AM 3 txn-current
09/26/2013 08:47 AM 0 txn-current-lock
09/26/2013 08:55 AM <DIR> txn-protorevs
09/26/2013 08:47 AM 37 uuid
09/26/2013 08:47 AM 0 write-lock
10 File(s) 237,590 bytes
6 Dir(s) 2,377,388,032 bytes free
C:\Users\Developer\Versioned>

Failure:

C:\Users\developer\Versioned>svnadmin create DSharp.svn
C:\Users\developer\Versioned>echo exit 0 1>DSharp.svn\hooks\pre-revprop-change.bat
C:\Users\developer\Versioned>svnsync init file:///C:/Users/developer/Versioned/DSharp.svn http://delphisorcery.googlecode.com/svn
Copied properties for revision 0.
C:\Users\developer\Versioned>svnsync sync file:///C:/Users/developer/Versioned/DSharp.svn http://delphisorcery.googlecode.com/svn
Committed revision 1.
Copied properties for revision 1.
Transmitting file data ……….
Committed revision 630.
Copied properties for revision 630.
C:\Users\developer\Versioned>hg clone https://bitbucket.org/jeroenp/dsharp DSharp.hg
no changes found
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
C:\Users\developer\Versioned>hg convert –verbose file:///C:/Users/developer/Versioned/DSharp.svn DSharp
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a CVS checkout
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a Git repository
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a Subversion repository
file:///C:/Users/developer/Versioned/DSharp.svn is not a local Mercurial repository
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a darcs repository
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a monotone repository
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a GNU Arch repository
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a Bazaar repository
file:///C:/Users/developer/Versioned/DSharp.svn does not look like a P4 repository
abort: file:///C:/Users/developer/Versioned/DSharp.svn: missing or unsupported repository
C:\Users\developer\Versioned>svn –version
svn, version 1.8.1 (r1503906)
compiled Jul 22 2013, 19:58:17 on x86-microsoft-windows
Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/
The following repository access (RA) modules are available:
* ra_svn : Module for accessing a repository using the svn network protocol.
– with Cyrus SASL authentication
– handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
– handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
– handles 'http' scheme
– handles 'https' scheme
C:\Users\developer\Versioned>hg –version
Mercurial Distributed SCM (version 2.7)
(see http://mercurial.selenic.com for more information)
Copyright (C) 2005-2013 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\Users\developer\Versioned>type DSharp.svn\format
5
C:\Users\developer\Versioned>type DSharp.svn\db\format
6
layout sharded 1000
C:\Users\developer\Versioned>type DSharp.svn\db\fs-type
fsfs
C:\Users\developer\Versioned>type DSharp.svn\db\min-unpacked-rev
0
C:\Users\developer\Versioned>dir DSharp.svn DSharp.svn\db
Volume in drive C has no label.
Volume Serial Number is A855-3C2D
Directory of C:\Users\developer\Versioned\DSharp.svn
09/25/2013 09:52 PM <DIR> .
09/25/2013 09:52 PM <DIR> ..
09/25/2013 07:38 PM <DIR> conf
09/25/2013 07:44 PM <DIR> db
09/25/2013 07:38 PM 2 format
09/25/2013 07:38 PM <DIR> hooks
09/25/2013 07:38 PM <DIR> locks
09/25/2013 07:38 PM 251 README.txt
2 File(s) 253 bytes
Directory of C:\Users\developer\Versioned\DSharp.svn\db
09/25/2013 07:44 PM <DIR> .
09/25/2013 07:44 PM <DIR> ..
09/25/2013 07:44 PM 4 current
09/25/2013 07:38 PM 22 format
09/25/2013 07:38 PM 5 fs-type
09/25/2013 07:38 PM 6,963 fsfs.conf
09/25/2013 07:38 PM 2 min-unpacked-rev
09/25/2013 07:44 PM 232,448 rep-cache.db
09/25/2013 07:38 PM <DIR> revprops
09/25/2013 07:38 PM <DIR> revs
09/25/2013 07:44 PM <DIR> transactions
09/25/2013 07:44 PM 3 txn-current
09/25/2013 07:38 PM 0 txn-current-lock
09/25/2013 07:44 PM <DIR> txn-protorevs
09/25/2013 07:38 PM 37 uuid
09/25/2013 07:38 PM 0 write-lock
10 File(s) 239,484 bytes

.

–jeroen

via: Bug 4043 – HG 2.7.x cannot convert a local file based SVN repository with db format 6 (works fine with db format 4).

Posted in Delphi, Development, DVCS - Distributed Version Control, Mercurial/Hg, Software Development, Source Code Management, Subversion/SVN | Tagged: , , | 1 Comment »

XSD/XML Schemas: resolving `Namespace ” is not available to be referenced in this schema` (via: StackOverflow)

Posted by jpluimers on 2013/09/01

While working on my Delphi: First try on an XSD for .groupproj files, I bumped into an error `Namespace ” is not available to be referenced in this schema`.

I added a targetNamespace attribute to the GroupProj.xsd so the .grouproj files would use the right namespace.

That resulted into two funny errors:

  1. Namespace ” is not available to be referenced in this schema.
    Visual Studio (which I normally use for editing XSD) would only throw this error on these elements:
    <xsd:element ...>
    So it would not throw them on nodes using the empty namespace.
    That was really confusing!
  2. When validating .grouproj files using this GroupProj.xsd, I would get this error for all .groupproj files:
    System.Xml.Schema.XmlSchemaValidationException: Type ‘<type>’ is not declared. (in this case for ‘<type>’  ‘ProjectType’).
    That was odd too: the ‘ProjectType’ was indeed declared, and should be valid.

I could hardly find any information about the latter error, but the former gave a few useful hits.

Thanks User weston – Stack Overflow. for answering this: it made me smack to my head (like usual, a case of EBCAK). Read the rest of this entry »

Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development, XML/XSD, XSD | Tagged: , , | 2 Comments »

On Windows: Do not install the Android SDK ADT bundle in a path with spaces

Posted by jpluimers on 2013/08/28

Some 20 years after someone thought it was a nice idea to allow spaces in path names on Windows, it still is a bad idea to rely that just “works” for everything.

Today I tried to see if it still applied what I mentioned 2 years ago during the German BASTA! Fall conference in the Rheingoldhalle when talking about cross platform .NET development using MonoDroid/MonoTouch/Visual Studio:

Android SDK
http://developer.android.com/sdk/index.html
– Windows:
- http://dl.google.com/android/installer_r13-windows.exe
- http://dl.google.com/android/android-sdk_r13-windows.zip
Do not install in a directory with spaces (not C:\Program Files, but C:\android-sdk)

And it does still apply: though not mentioned in the Android SDK/ADT documentation, most of the batch files in the Android SDK ADT bundle are not compatible being stored in a path that has spaces.

Unquoted referrals to paths like this are used in most SDK batch files:

cd /d %~dp0

The only way to run these batch files is with the current directory being the directory of the batch file itself, or referring to them in their fully quoted form.

Another correct way would be to use short names, but that’s only done in find_java.bat:

%~dps0

Summary of the batch files and how they are affected:

+ …\adt-bundle-windows-x86-20130522\sdk\build-tools\android-4.2.2\dx.bat
+ …\adt-bundle-windows-x86-20130522\sdk\tools\android.bat
+ …\adt-bundle-windows-x86-20130522\sdk\tools\ddms.bat
+ …\adt-bundle-windows-x86-20130522\sdk\tools\draw9patch.bat
+ …\adt-bundle-windows-x86-20130522\sdk\tools\hierarchyviewer.bat
+ …\adt-bundle-windows-x86-20130522\sdk\tools\jobb.bat
+ …\adt-bundle-windows-x86-20130522\sdk\tools\lint.bat
+ …\adt-bundle-windows-x86-20130522\sdk\tools\monitor.bat
+ …\adt-bundle-windows-x86-20130522\sdk\tools\monkeyrunner.bat
+ …\adt-bundle-windows-x86-20130522\sdk\tools\traceview.bat
+ …\adt-bundle-windows-x86-20130522\sdk\tools\uiautomatorviewer.bat
– …\adt-bundle-windows-x86-20130522\sdk\tools\lib\find_java.bat
+ …\adt-bundle-windows-x86-20130522\sdk\tools\lib\post_tools_install.bat
* …\adt-bundle-windows-x86-20130522\sdk\tools\proguard\bin\proguard.bat
* …\adt-bundle-windows-x86-20130522\sdk\tools\proguard\bin\proguardgui.bat
* …\adt-bundle-windows-x86-20130522\sdk\tools\proguard\bin\retrace.bat
– …\adt-bundle-windows-x86-20130522\sdk\tools\templates\gradle\wrapper\gradlew.bat
– compatible with spaces in path
+ incompatible with spaces in path
* won't run at all when current directory is different from directory of batch file

view raw
gistfile1.txt
hosted with ❤ by GitHub

(Side note: most incompatible batch files correctly do `for %%i in (“%cd%”) do set prog_dir=%%~fsi`)

So: make sure “…”  is a path not containing spaces.

–jeroen

Posted in Android, BASTA!, Conferences, Development, Event, Mobile Development, Software Development | Tagged: , , , , , , , | Leave a Comment »

shorter version of batch file: getting directory and parent directory

Posted by jpluimers on 2013/08/17

Two years ago, I posted a batch file that gets the parent directory of the batch file that runs.

It was convoluted, using substrings and intermediate environment variables so you needed setlocal.

This one does not any more: for both the directory of the batch file, and the parent directory of that directory, one-liners suffice:

echo batchfile=%0
echo full=%~f0
setlocal
for %%d in (%~dp0.) do set Directory=%%~fd
echo Directory=%Directory%
for %%d in (%~dp0..) do set ParentDirectory=%%~fd
echo ParentDirectory=%ParentDirectory%
endlocal

–jeroen

via: batch files: getting directory and parent directory « The Wiert Corner – irregular stream of stuff.

Posted in Batch-Files, Development, Scripting, Software Development | Tagged: , , , | 1 Comment »

Paint.NET v3.5.11 is now available (via: Paint.NET Blog)

Posted by jpluimers on 2013/08/17

Programmers scale: time versus project completeness

Programmers scale: time versus project completeness

I totally agree that Paint.NET is the best free image and photo editor on Windows.

Writing quality software takes time, not only when writing it in spare time like Rick Brewster does. Getting things “right” is a tedious process and often will set you back: just watch the graph on the right.

So I’m not surprised that it took a very long time after the first Paint.NET 4.0 idea in 2008 to get “close” to a release.

And indeed, it looks like Rick has become much closer which will please many people waiting for Paint .NET 4.

I’m really glad with the announcement that Paint.NET v3.5.11 BETA is now available – Paint.NET Discussion & Questions – Paint.NET Forum.

Edit: while writing this, the final Paint.NET v3.5.11 came out.

It paves the way for Paint .NET 4.0 update in the future, and fixes/improves quite a few things.

A few quotes from it:

This is probably not the update you were expecting I need to push out an update to v3.5 in preparation for the eventual release of v4.0 […] releasing a “beta” today […] I’ll be pushing out the Final/RTM in a few days.

The primary goal of this update is preparing for the v4.0 release: v3.5.10 will not be able to offer the v4.0 update, but v3.5.11 will. […]

Here are the changes for this release:

  • Fixed: The Gaussian Blur effect was incorrectly calculating alpha values for non-opaque pixels. (http://forums.getpaint.net/index.php?/topic/18483-gaussian-blur-mistreats-alpha/)
  • Improved performance of the Sharpen effect by about 25%
  • Improved performance of the Median effect by about 30%
  • Improved performance of the Fragment effect by about 40%
  • Improved performance of the Unfocus effect by about 100%
  • Reduced memory usage when many selection manipulation operations are in the history/undo stack (the undo data is now saved to disk)
  • The built-in updater now supports upgrading to paint.net 4.0 (once it’s available)

There have been rumors floating around that Paint.NET is “dead.” This is not true!

–jeroen

via: Paint.NET Blog | The best free image and photo editor. By Rick Brewster..

Posted in .NET, .NET 3.5, .NET 4.0, Algorithms, Development, Floating point handling, Power User, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Tagged: , , | Leave a Comment »

 
%d bloggers like this: