[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: merge issue (solved) - 1.1.1 client, 1.0.8 server

From: Robert Spier <rspier_at_pobox.com>
Date: 2004-11-21 11:53:35 CET

> > I think I might have a 1.0/1.1 compatibility issue.
>
> Nope, you just have a control character in a log message. So, the
> REPORT you are seeing fail is the same kind used by 'svn log'. In
> fact, you can reproduce this error by simply running
>...

Yay! (Well, not-Yay! for having the control character that leaked over
from CVS... but Yay! for it not being a compatibility issue.) Sorry
for crying wolf - that was just how the evidence presented itself at
the time.

> See that character after "has now been tagged" ? I think that's the
> sucker that's causing you problems. Use 'svnadmin setlog' to fix that
> sucker, and I think you'll be all good (I've checked all other
> existing revisions in your repository).

Confirmed. After editing the log message, 1.1.1 is quite happy to
perform the merge.

Is reason this problem exists with 1.1.1 and not the 1.0.8 client is
because of the rename-following stuff?

In general, I've found that many (all?) of my odd SVN problems have
been due to similar issues (log messages with stray characters or
incorrect encodings) in repos converted from CVS. (And of course,
these crop up after weeks of no issues.)

Do you have any suggestions for better debugging these issues before
panicking? It sounds like keeping a subversion compiled with a
debugging neon around is a good start.

Clkao wrote the (below) script for checking encodings. It would be
very easy to modify it to check for valid characters. (And hopefully,
next time I have a weird error, I will remember to do that.)

Thanks-

-R

---
# Clkao's log message re-encoder (changes log messages improperly
# encoded as latin-1 to UTF-8)
use SVN::Fs;
use Encode;
use Encode::Guess;
my $repospath = shift or die 'no repospath';
my $repos = SVN::Repos::open ($repospath) or die $!;
my $fs = $repos->fs;
my $yrev = $fs->youngest_rev;
my $pool = SVN::Pool->new_default;
for (0..$yrev) {
    $pool->clear;
    my $log = $fs->revision_prop ($_, 'svn:log');
    my $enc = guess_encoding ($log, qw/latin-1/);
    next unless ref ($enc);
    warn "log at $_ is ".$enc->name;
    next if $enc-name eq "utf-8";
    Encode::from_to ($log, $enc->name, 'utf-8');
    $fs->change_rev_prop ($_, 'svn:log', $log);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 21 11:55:06 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.