Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#40508 closed defect (fixed)

unicode_path patch not working on subversion 1.8.x release

Reported by: genuinefafa@… Owned by: danielluke (Daniel J. Luke)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc: blair (Blair Zajac), cooljeanius (Eric Gallager), Serge3leo (Serguei E. Leontiev)
Port: subversion

Description

I've been using svn from macports for some time now. I am from a latin speaking languague therefor unicode_path was always a must. (all of my svn repos have special characters)

Since the latest release of svn (1.8.3 as it is today) the unicode_path is not working anymore.

I get the

# svn st
?       fíle 1
?       fíle 1

as they were different files.

I know this is related with #17813 but don't know how to solve for the current version of svn.

The only current workaround I found was to downgrade to 1.7.x following this steps: http://www.philipp.haussleiter.de/2013/08/downgrading-subversion-from-1-8-to-1-7-in-macports/ (which I dont like at all)

Attachments (2)

WorkForMe.tiff (137.5 KB) - added by Serge3leo (Serguei E. Leontiev) 11 years ago.
140104.tar.gz (4.1 KB) - added by Serge3leo (Serguei E. Leontiev) 11 years ago.
Patch for Protfile

Download all attachments as: .zip

Change History (35)

comment:1 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:2 Changed 11 years ago by mf2k (Frank Schima)

Cc: blair@… added
Keywords: unicode removed
Owner: changed from macports-tickets@… to dluke@…

In the future, please Cc the port maintainers (port info --maintainers subversion).

comment:3 Changed 11 years ago by danielluke (Daniel J. Luke)

You could follow-up with upstream (http://subversion.tigris.org/issues/show_bug.cgi?id=2464) and/or try to generate an updated version of the patch that does work correctly. I don't use this variant myself - if it's broken beyond repair, we should probably remove it from the port.

comment:4 Changed 11 years ago by danielluke (Daniel J. Luke)

Owner: changed from dluke@… to dluke@…
Status: newassigned

comment:5 Changed 11 years ago by genuinefafa@…

@macsforever2000 and @egall -- roger that, will take that into consideration for the next one ;) @dluke what i can tell you is that it doesnt work for any special character like it used to be (1.7.x)

I'm not sure what is "beyond repair", what i do know is that brew is somehow trying to fix it two, don't know if they found a way https://github.com/mxcl/homebrew/issues/20656

comment:6 Changed 11 years ago by danielluke (Daniel J. Luke)

We're using the patch for svn 1.8 on the upstream bug, if it doesn't work, we should probably remove it (for now) unless/until someone makes a new patch that does work.

comment:7 Changed 11 years ago by danielluke (Daniel J. Luke)

Someone just uploaded a new patch on the upstream bug, can you test it and see if it solves the issue for you? If so, I'll update the port to use it instead.

comment:8 Changed 11 years ago by genuinefafa@…

Sure, I can test it. But i dont know how :$

I'm selfupdating port and will try to check the latest version on the repository but my guess is that you want me to apply a patch locally, if that so?

comment:9 Changed 11 years ago by danielluke (Daniel J. Luke)

Yes. You can visit the upstream ticket url, download the patch and then copy it into place and MacPorts will use it.

Ie:

cd ~
wget http://subversion.tigris.org/nonav/issues/showattachment.cgi/1291/svn_1.8.x_darwin_unicode_precomp.patch
cd `port dir subversion`
mv ~/svn_1.8.x_darwin_unicode_precomp.patch files/patch-osx_unicode_precomp.diff

If you build the subversion port with +unicode_path, it will use the new patch. I have it running through the regular subversion test suite right now, and it looks like it at least builds and doesn't appear to break anything (so far).

(note that this change will be reverted the next time you do port sync or port selfupdate)

comment:10 Changed 11 years ago by genuinefafa@…

Maybe after all the test I made I broke my ports installation :(, I am now unable to do anything with ports, due to some gettext issue... I'm searching the web to fix it and let you know about this unicode-path as soon as I get it working again.

comment:11 Changed 11 years ago by genuinefafa@…

If i did everything right... The patch do not work (at least not on my Mac)

sh-3.2# cd ~
sh-3.2# wget http://subversion.tigris.org/nonav/issues/showattachment.cgi/1291/svn_1.8.x_darwin_unicode_precomp.patch
--2013-10-07 13:16:27--  http://subversion.tigris.org/nonav/issues/showattachment.cgi/1291/svn_1.8.x_darwin_unicode_precomp.patch
Resolving subversion.tigris.org... 
204.16.104.146
Connecting to subversion.tigris.org|204.16.104.146|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4469 (4.4K) [text/plain]
Saving to: `svn_1.8.x_darwin_unicode_precomp.patch'

100%[===========================================================================================================================================>] 4,469       19.5K/s   in 0.2s    

2013-10-07 13:16:28 (19.5 KB/s) - `svn_1.8.x_darwin_unicode_precomp.patch' saved [4469/4469]

sh-3.2# 
sh-3.2# cd `port dir subversion`
sh-3.2# mv ~/svn_1.8.x_darwin_unicode_precomp.patch files/patch-osx_unicode_precomp.diff
sh-3.2# port build subversion +unicode_path
--->  Computing dependencies for subversion
--->  Fetching distfiles for subversion
--->  Verifying checksums for subversion
--->  Extracting subversion
--->  Applying patches to subversion
--->  Configuring subversion
--->  Building subversion

Is there a way I can know if the patch was applied?

ps: my issue with gettext was solved using

port clean gettext
Last edited 11 years ago by genuinefafa@… (previous) (diff)

comment:12 Changed 11 years ago by danielluke (Daniel J. Luke)

If you run port with '-dv' you'll get lots of debugging info that will show the patch being applied as you build (it would have tried to apply the patchfile and the build would have failed if it didn't apply).

After you built your version, how did you test it (and did it fail in the same way?)

comment:13 Changed 11 years ago by genuinefafa@…

Ok, confirmed

DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_subversion/subversion/work/subversion-1.8.3" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/subversion/files/patch-osx_unicode_precomp.diff'
patching file subversion/libsvn_subr/io.c
patching file subversion/libsvn_subr/path.c
patching file subversion/svn/proplist-cmd.c
patching file subversion/svn/status-cmd.c
DEBUG: Executing proc-post-org.macports.patch-patch-0

Full log at http://pastebin.com/6Yf8PaD8

Patch was applied, error continues.

The can be seen as:

my-mac:genuinefafa-> svn st --depth=files
M       modified-file.txt
?       á.doc
!       á.doc

comment:14 Changed 11 years ago by danielluke (Daniel J. Luke)

It's not clear that you installed the modified subversion (since you showed the output of 'port build' before, and you aren't showing a full path to the 'svn' that you're using in the example.

However, I'll avoid updating the port unless/until I hear from someone that there is a patch that works.

comment:15 Changed 11 years ago by genuinefafa@…

I don't mind checking anything... :) I did a build, and then a install... The install returns:

sudo port install subversion +unicode_path
--->  Computing dependencies for subversion
--->  Cleaning subversion
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

How can I be sure of what you want me to do?

comment:16 Changed 11 years ago by danielluke (Daniel J. Luke)

ok, that's perfect then. We know that that patch doesn't work. You may want to try to work with upstream to get it fixed and/or with the other people on the upstream bug report to get a patch that works like the old patch...

comment:17 Changed 11 years ago by genuinefafa@…

Same issue ver 1.8.5, i'll update the info. Can an Admin update it?

comment:18 in reply to:  17 ; Changed 11 years ago by danielluke (Daniel J. Luke)

Replying to genuinefafa@…:

Same issue ver 1.8.5, i'll update the info. Can an Admin update it?

what are you asking? If there's a patch that works, I can update the port - it's probably a good idea to work with upstream on this, though.

comment:19 Changed 11 years ago by genuinefafa@…

I know, and I'm doing it. But, for the time being, let's update the subject of the issue here, so people can know it is still unresolved with the latest version. :)

comment:20 Changed 11 years ago by danielluke (Daniel J. Luke)

Summary: unicode_path patch not working on subversion 1.8.3 releaseunicode_path patch not working on subversion 1.8.x release

comment:21 Changed 11 years ago by Serge3leo (Serguei E. Leontiev)

Cc: leo@… added

Cc Me!

comment:22 in reply to:  18 Changed 11 years ago by Serge3leo (Serguei E. Leontiev)

Replying to dluke@…:

what are you asking? If there's a patch that works, I can update the port -

svn_1.8.x_darwin_unicode_precomp.patch seems good (OS X 10.9.1, Xcode 5.0.2).

However, it should be correct URL in portfile. From:

"...of solution 1 from http://svn.collab.net/repos/svn/trunk/notes/unicode-composition-for-filenames which _WILL_ break..."

To:

"...of solution 1 from http://svn.apache.org/repos/asf/subversion/trunk/notes/unicode-composition-for-filenames which _WILL_ break..."

it's probably a good idea to work with upstream on this, though.

See upstream ticket and discussion (2005-2013 years) : http://subversion.tigris.org/issues/show_bug.cgi?id=2464

comment:23 Changed 11 years ago by danielluke (Daniel J. Luke)

The upstream bug's patch (http://subversion.tigris.org/nonav/issues/showattachment.cgi/1291/svn_1.8.x_darwin_unicode_precomp.patch) is what genuinefafa tested and said it didn't work.

leo - can you confirm that that patch is working for you? I've updated the url in the ui_warn for that variant (in r115454)

comment:24 in reply to:  23 Changed 11 years ago by Serge3leo (Serguei E. Leontiev)

Replying to dluke@…:

The upstream bug's patch (http://subversion.tigris.org/nonav/issues/showattachment.cgi/1291/svn_1.8.x_darwin_unicode_precomp.patch) is what genuinefafa tested and said it didn't work.

leo - can you confirm that that patch is working for you? I've updated the url in the ui_warn for that variant (in r115454)

OK, ui_warn - seems right URL.

Without this patch (with old "patch-osx_unicode_precomp.diff") - svn don't work with some Russian file names (see "WorkForMe.tiff" screenshot)

With this patch svn work for me (Russian file names, see "WorkForMe.tiff" screenshot, see Portfile, Portfile.patch and svn_1.8.x_darwin_unicode_precomp.patch in archive "140104.tar.gz").

Also, see upstream reports:

  • Daisuke Ban (exceed_alae@…) - work (using Japanese 'DAKUTEN' and 'HAN-DAKUTEN' characters);
  • Jörn Schellhaas (joerns@…) - work (using a modified homebrew script);
  • Serguei E. Leontiev (serge3leo@…) - this my report, work (using Russian);
  • Facundo Donato (genuinefafa@…) - probably report of genuinefafa@…, svn work as without patch.

-- Sorry for my best English

Last edited 11 years ago by Serge3leo (Serguei E. Leontiev) (previous) (diff)

Changed 11 years ago by Serge3leo (Serguei E. Leontiev)

Attachment: WorkForMe.tiff added

Changed 11 years ago by Serge3leo (Serguei E. Leontiev)

Attachment: 140104.tar.gz added

Patch for Protfile

comment:25 Changed 11 years ago by genuinefafa@…

Well... I did a recheck - after following leo@ comments - and I guess that I was doing something wrong.

What did now:

  • uninstall the version of subversion I want to custom build port uninstall subversion@... and it dependencies if any
  • build the subversion 'port build subversion +uncode_path
  • instal the subversion 'port install subversion +uncode_path

After this, I am getting better results with subversion and special characters.

I now realize that there is an issue with directories vs files. Also, there is some strange behavior among different versions.

(sorry for the long log, but there is no other way to put it)

Check this:

fafa-mac:fafa-> pwd
/Users/fafa/Documents/3f/comercial/presupuestos/UIFRA
fafa-mac:fafa-> svn info
Path: .
Working Copy Root Path: /Users/fafa/Documents/3f
URL: http://***/svn/3f/comercial/presupuestos/UIFRA
Relative URL: ^/comercial/presupuestos/UIFRA
Repository Root: http://***/svn/3f
Repository UUID: 5babf55b-27cd-0d4d-b53e-00eca4de1311
Revision: 3751
Node Kind: directory
Schedule: normal
Last Changed Author: facundo
Last Changed Rev: 3666
Last Changed Date: 2013-09-25 11:39:42 -0300 (Wed, 25 Sep 2013)

fafa-mac:fafa-> sudo port installed subversion
The following ports are currently installed:
  subversion @1.7.10_1
  subversion @1.7.10_1+unicode_path
  subversion @1.8.3_2
  subversion @1.8.3_3+unicode_path
  subversion @1.8.4_1+unicode_path (active)
  subversion @1.8.5_0+unicode_path

# using 1.8.5
fafa-mac:fafa-> sudo port activate subversion @1.8.5_0+unicode_path
--->  Computing dependencies for subversion
--->  Deactivating subversion @1.8.4_1+unicode_path
--->  Cleaning subversion
--->  Activating subversion @1.8.5_0+unicode_path
--->  Cleaning subversion
fafa-mac:fafa-> svn st
!       2013-09-25 Cociná tu pasta - UIFRA.docx
?       2013-09-25 Cociná tu pasta - UIFRA.docx

# using 1.8.4
fafa-mac:fafa-> sudo port activate subversion @1.8.4_1+unicode_path
--->  Computing dependencies for subversion
--->  Deactivating subversion @1.8.5_0+unicode_path
--->  Cleaning subversion
--->  Activating subversion @1.8.4_1+unicode_path
--->  Cleaning subversion
fafa-mac:fafa-> svn st

# using 1.8.5 again, just for checking
fafa-mac:fafa-> sudo port activate subversion @1.8.5_0+unicode_path
--->  Computing dependencies for subversion
--->  Deactivating subversion @1.8.4_1+unicode_path
--->  Cleaning subversion
--->  Activating subversion @1.8.5_0+unicode_path
--->  Cleaning subversion
fafa-mac:fafa-> svn st
!       2013-09-25 Cociná tu pasta - UIFRA.docx
?       2013-09-25 Cociná tu pasta - UIFRA.docx

Anyway, I have other files and directories with special characters but, with the latest version, there are no problems. I feel much better now. :)

comment:26 in reply to:  25 Changed 11 years ago by Serge3leo (Serguei E. Leontiev)

Replying to genuinefafa@…:

Well... I did a recheck - after following leo@ comments - and I guess that I was doing something wrong.

Please re-apply the patch with the ability to check its application protocols (may be "port" rewite contents of "patch-osx_unicode_precomp.diff):

  • uninstall all versions;
  • copy "svn_1.8.x_darwin_unicode_precomp.patch" into $(port dir subversion)/files;
  • use 'sudo port edit subversion' for change "patch-osx_unicode_precomp.diff" to "svn_1.8.x_darwin_unicode_precomp.patch";
  • build&install subversion +unicode_path;
  • attach verbose log;
  • checkout files to new empty directory;

P.S. Try it without "+unicode_path". May be files your repository create from Mac OSX without this patch (see ui_warn & http://svn.apache.org/repos/asf/subversion/trunk/notes/unicode-composition-for-filenames )

Last edited 11 years ago by Serge3leo (Serguei E. Leontiev) (previous) (diff)

comment:27 Changed 11 years ago by martin.hollerweger@…

Thanks leo I testet your patch and now it works. After one year i finally resolved the issue.

I went through your steps without problems. Mac OS Mavericks, SVN 1.8.5 Additionally I install the java-hl port and resolved the issue in eclipse too.

Why is this patch not included in the standard Version of SVN. It took me a lot of time to resolve the issue!

Thank you!!

Last edited 11 years ago by martin.hollerweger@… (previous) (diff)

comment:28 in reply to:  27 Changed 11 years ago by Serge3leo (Serguei E. Leontiev)

Replying to martin.hollerweger@…:

Why is this patch not included in the standard Version of SVN. It took me a lot of time to resolve the issue!

See discussion at http://svn.apache.org/repos/asf/subversion/trunk/notes/unicode-composition-for-filenames and http://subversion.tigris.org/issues/show_bug.cgi?id=2464 IMHO, probably, svn repository created by Mac OSX without this incompatible with this patch.

P.S. elmulator@… also report: "...patch works for me on OS X 10.9.1 and with svn version 1.8.5" Wed Jan 8 07:26:41

Version 0, edited 11 years ago by Serge3leo (Serguei E. Leontiev) (next)

comment:29 in reply to:  18 Changed 11 years ago by Serge3leo (Serguei E. Leontiev)

Replying to dluke@…:

what are you asking? If there's a patch that works, I can update the port - it's probably a good idea to work with upstream on this, though.

dluke, long overdue update MacPorts port with this patch! It works well for many peoples (For ​genuinefafa, one of the two, or will work well, or will just work as if without patch).

Last edited 11 years ago by Serge3leo (Serguei E. Leontiev) (previous) (diff)

comment:30 Changed 11 years ago by danielluke (Daniel J. Luke)

Resolution: fixed
Status: assignedclosed

comment:31 in reply to:  30 Changed 11 years ago by Serge3leo (Serguei E. Leontiev)

Replying to dluke@…:

r116511

OK, all work fine for me. Thank you.

comment:32 Changed 11 years ago by genuinefafa@…

Thanks everyone for your help. It's working on my computer. If I have any glitch i'll let you all know. :)

comment:33 Changed 11 years ago by danielluke (Daniel J. Luke)

Everyone interested in this should really be working with upstream to get it (or some other fix) included in the regular subversion release...

Note: See TracTickets for help on using tickets.