svn command --cl don't support names that contain chinese characters.

2013-04-25 Thread Bluce Lu
svn command --cl don't support names that contain chinese characters.

 

E,g. command “svn status -q D:\Project”, we see there is a changelist
named “好”, but when use command “svn status -q --verbose D:\Project
--ignore-externals --cl 好”, there is nothing to print.

 



 



image001.pngimage002.png

Re: svn command --cl don't support names that contain chinese characters.

2013-04-25 Thread Philip Martin
Bluce Lu bluc...@51buy.com writes:

 svn command --cl don't support names that contain chinese characters.

 E,g. command “svn status -q D:\Project”, we see there is a changelist
 named “好”, but when use command “svn status -q --verbose D:\Project
 --ignore-externals --cl 好”, there is nothing to print.

Does svn st --cl 好 without the other options work?  Are you using a
UTF-8 environment or some other encoding?

Chinese changelist names should work.  This works on my Linux box:

$ svnadmin create repo
$ svn -mm import repo/format file://`pwd`/repo/f
$ svn co file://`pwd`/repo wc
$ svn cl 好 wc/f
$ svn st --cl 好 wc -v -q --ignore-externals

--- Changelist '好':
 11 pm   wc/f

Does that simple example work for you?

-- 
Certified  Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download


Re: svn command --cl don't support names that contain chinese characters.

2013-04-25 Thread C. Michael Pilato
On 04/25/2013 05:14 AM, Philip Martin wrote:
 Bluce Lu bluc...@51buy.com writes:
 
 svn command --cl don't support names that contain chinese characters.

 E,g. command “svn status -q D:\Project”, we see there is a changelist
 named “好”, but when use command “svn status -q --verbose D:\Project
 --ignore-externals --cl 好”, there is nothing to print.
 
 Does svn st --cl 好 without the other options work?  Are you using a
 UTF-8 environment or some other encoding?
 
 Chinese changelist names should work.  This works on my Linux box:
 
 $ svnadmin create repo
 $ svn -mm import repo/format file://`pwd`/repo/f
 $ svn co file://`pwd`/repo wc
 $ svn cl 好 wc/f
 $ svn st --cl 好 wc -v -q --ignore-externals
 
 --- Changelist '好':
  11 pm   wc/f
 
 Does that simple example work for you?

Code inspection tells me that when we set changelists (with 'svn
changelist') we convert the changelist name provided on the command-line to
UTF-8 (svn/changelist-cmd.c:58).  But when we're stashing in the options
baton the value of the --changelist option, there's no such translation
(svn/svn.c:2162).

Your Linux box is probably using a UTF8 locale, Philip.  Perhaps the OP's
Windows box is using something else (GB18030 or somesuch)?

Is this all that's needed?

Index: subversion/svn/svn.c
===
--- subversion/svn/svn.c(revision 1471390)
+++ subversion/svn/svn.c(working copy)
@@ -2159,7 +2159,8 @@
 opt_state.remove = TRUE;
 break;
   case opt_changelist:
-opt_state.changelist = apr_pstrdup(pool, opt_arg);
+SVN_INT_ERR(svn_utf_cstring_to_utf8(utf8_opt_arg, opt_arg, pool));
+opt_state.changelist = utf8_opt_arg;
 if (opt_state.changelist[0] == '\0')
   {
 err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,



-- 
C. Michael Pilato cmpil...@collab.net
CollabNet  www.collab.net  Enterprise Cloud Development



signature.asc
Description: OpenPGP digital signature


答复: svn command --cl don't support names that contain chinese characters.

2013-04-25 Thread Bluce Lu
I used tortoise svn to create changelist 好. :)

-邮件原件-
发件人: C. Michael Pilato [mailto:cmpil...@collab.net] 
发送时间: 2013年4月25日 20:18
收件人: Philip Martin
抄送: Bluce Lu; users@subversion.apache.org
主题: Re: svn command --cl don't support names that contain chinese characters.

On 04/25/2013 05:14 AM, Philip Martin wrote:
 Bluce Lu bluc...@51buy.com writes:
 
 svn command --cl don't support names that contain chinese characters.

 E,g. command “svn status -q D:\Project”, we see there is a changelist 
 named “好”, but when use command “svn status -q --verbose D:\Project 
 --ignore-externals --cl 好”, there is nothing to print.
 
 Does svn st --cl 好 without the other options work?  Are you using a
 UTF-8 environment or some other encoding?
 
 Chinese changelist names should work.  This works on my Linux box:
 
 $ svnadmin create repo
 $ svn -mm import repo/format file://`pwd`/repo/f $ svn co 
 file://`pwd`/repo wc $ svn cl 好 wc/f $ svn st --cl 好 wc -v -q 
 --ignore-externals
 
 --- Changelist '好':
  11 pm   wc/f
 
 Does that simple example work for you?

Code inspection tells me that when we set changelists (with 'svn
changelist') we convert the changelist name provided on the command-line to
UTF-8 (svn/changelist-cmd.c:58).  But when we're stashing in the options baton 
the value of the --changelist option, there's no such translation 
(svn/svn.c:2162).

Your Linux box is probably using a UTF8 locale, Philip.  Perhaps the OP's 
Windows box is using something else (GB18030 or somesuch)?

Is this all that's needed?

Index: subversion/svn/svn.c
===
--- subversion/svn/svn.c(revision 1471390)
+++ subversion/svn/svn.c(working copy)
@@ -2159,7 +2159,8 @@
 opt_state.remove = TRUE;
 break;
   case opt_changelist:
-opt_state.changelist = apr_pstrdup(pool, opt_arg);
+SVN_INT_ERR(svn_utf_cstring_to_utf8(utf8_opt_arg, opt_arg, pool));
+opt_state.changelist = utf8_opt_arg;
 if (opt_state.changelist[0] == '\0')
   {
 err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,



--
C. Michael Pilato cmpil...@collab.net
CollabNet  www.collab.net  Enterprise Cloud Development




Re: svn command --cl don't support names that contain chinese characters.

2013-04-25 Thread C. Michael Pilato
On 04/25/2013 08:31 AM, Philip Martin wrote:
 Yes, I was using UTF-8.  I see the bug in iso-8859-1:
 
 $ svn cl å wc/f
 A [å] wc/f
 $ svn st wc
 
 --- Changelist 'å':
 wc/f
 $ svn st --cl å wc
 $
 
 With your patch:
 
 $ svn st --cl å wc
 
 --- Changelist 'å':
 wc/f

Committed my patch:
   Sendingsubversion/svn/svn.c
   Transmitting file data .
   Committed revision 1475724.

-- 
C. Michael Pilato cmpil...@collab.net
CollabNet  www.collab.net  Enterprise Cloud Development



signature.asc
Description: OpenPGP digital signature


Re: svn command --cl don't support names that contain chinese characters.

2013-04-25 Thread Daniel Shahaf
On Thu, Apr 25, 2013 at 08:37:01AM -0400, C. Michael Pilato wrote:
 Committed my patch:

... which means the fix will likely be released in 1.7.10 and 1.8.0-alpha1 (or
1.8.0-rc1).  The fix does not affect tortoisesvn; if it exhibits a problem,
contact the tortoisesvn developers at http://tortoisesvn.net/support.html.


Re: How to setup a server?

2013-04-25 Thread

On 04/24/2013 08:52 PM, C. Michael Pilato wrote:

The closest thing to official would be the Version Control With Subversion
book (http://svnbook.org/).  But don't expect to find an ordered list of
steps to setting up a Subversion server, because that's just not the
audience for that text.


It would be nice if that sort of text was made available officially.  At 
least I would be interested in it, and I believe others would too.




But not to worry!  A Google search for guide to setting up a subversion
server only returns 1.35 million hits.  Surely there's*something*  of value
out there.


There might be, but it requires a bit of knowledge to be able to tell 
which have value and which are a complete waste of time.  An official 
guide would offer some assurances that newbies wouldn't be wasting their 
time.




If you'd like to avoid setting up the server yourself, you might consider
looking into a more turnkey solution uch as CollabNet's Subversion Edge
(http://www.collab.net/products/subversion) or WANdisco's uberSVN
(http://www.wandisco.com/ubersvn).


Third-party service providers aren't an option.


Zé


Re: How to setup a server?

2013-04-25 Thread C. Michael Pilato
On 04/25/2013 09:00 AM, Zé wrote:
 On 04/24/2013 08:52 PM, C. Michael Pilato wrote:
 The closest thing to official would be the Version Control With Subversion
 book (http://svnbook.org/).  But don't expect to find an ordered list of
 steps to setting up a Subversion server, because that's just not the
 audience for that text.
 
 It would be nice if that sort of text was made available officially.  At
 least I would be interested in it, and I believe others would too.

Try reading Chapter 6 of the aforementioned book.  It may be all that you
need to read.

The problem with an official step-by-step how-to, though, is that right out
of the gate, you have decisions to make:

  * Which Subversion server do I want to use?  (Apache+mod_dav_svn
or svnserve)

  * Do I want my repositories to require authentication for access?
If so, what kind (Basic, MD5, client-certs, Kerberos, ...)

  * Do I want encryption? (SSL?  SSH tunneling?)

  * Do I want to enable access control on my repositories?

What wants to be a linear step-by-step very quickly turns into a flowchart
of possibilities with a potential series of dead ends determined by what
software packages you do and don't have at your disposal.

 If you'd like to avoid setting up the server yourself, you might consider
 looking into a more turnkey solution uch as CollabNet's Subversion Edge
 (http://www.collab.net/products/subversion) or WANdisco's uberSVN
 (http://www.wandisco.com/ubersvn).
 
 Third-party service providers aren't an option.

These aren't service providers.  These products are downloadable packages
which include all the stuff you need to run and administer a basic
Subversion server on your own hardware/network/etc.

I think it's fair to say that these products exist and are popular *not*
because setting up a server is difficult, but simply because you can be sure
that with a single download you eliminate the dead-ends and less-traveled
paths in that flowchart of possibilities I was talking about earlier.

-- 
C. Michael Pilato cmpil...@collab.net
CollabNet  www.collab.net  Enterprise Cloud Development



signature.asc
Description: OpenPGP digital signature


Re: svn command --cl don't support names that contain chinese characters.

2013-04-25 Thread Philip Martin
Daniel Shahaf danie...@apache.org writes:

 On Thu, Apr 25, 2013 at 08:37:01AM -0400, C. Michael Pilato wrote:
 Committed my patch:

 ... which means the fix will likely be released in 1.7.10 and 1.8.0-alpha1 (or
 1.8.0-rc1).  The fix does not affect tortoisesvn; if it exhibits a problem,
 contact the tortoisesvn developers at http://tortoisesvn.net/support.html.

The workaround is to switch to a UTF-8 environment. If that is not
possible you need to find some way of entering the UTF-8 representation
of the changelist at the command line.  In an ISO-8859-1 environment on
Linux I can use the 好 changelist by doing:

$ svn st --cl `printf \345\245\275` wc

--- Changelist '?\229?\165?\189':
wc/f

-- 
Certified  Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download


Re: svn command --cl don't support names that contain chinese characters.

2013-04-25 Thread Daniel Shahaf
Philip Martin wrote on Thu, Apr 25, 2013 at 15:19:45 +0100:
 Daniel Shahaf danie...@apache.org writes:
 
  On Thu, Apr 25, 2013 at 08:37:01AM -0400, C. Michael Pilato wrote:
  Committed my patch:
 
  ... which means the fix will likely be released in 1.7.10 and 1.8.0-alpha1 
  (or
  1.8.0-rc1).  The fix does not affect tortoisesvn; if it exhibits a problem,
  contact the tortoisesvn developers at http://tortoisesvn.net/support.html.
 
 The workaround is to switch to a UTF-8 environment. If that is not
 possible you need to find some way of entering the UTF-8 representation
 of the changelist at the command line.  In an ISO-8859-1 environment on
 Linux I can use the 好 changelist by doing:
 
 $ svn st --cl `printf \345\245\275` wc
 
 --- Changelist '?\229?\165?\189':
 wc/f

IOW, the workaround is to enter a $LOCAL_ENCODING string whose
representation in bytes is the UTF-8 of the string you want.  I haven't
tested that, but you might be able to compute such a string via
'svn status | sed -ne 's/.*Changelist//p' | iconv -f utf-8 -t $LOCAL_ENCODING'.


Files on trunk overwritten...

2013-04-25 Thread C M
I am certain there is simple way out of this situation.

Some files were committed to trunk which have incorrect updates.

What's the easiest way to roll back to the previous versions (before the
erroneous changes were committed)?

Should I checkout the previous revision and commit them over the erroneous
changes? Or is there some way to handle this?

TIA,
Amad


Re: Files on trunk overwritten...

2013-04-25 Thread Andy Levy
On Thu, Apr 25, 2013 at 3:34 PM, C M cmanalys...@gmail.com wrote:
 I am certain there is simple way out of this situation.

 Some files were committed to trunk which have incorrect updates.

 What's the easiest way to roll back to the previous versions (before the
 erroneous changes were committed)?

 Should I checkout the previous revision and commit them over the erroneous
 changes? Or is there some way to handle this?

Perform a reverse merge to back out the change  keep your history
intact. 
http://svnbook.red-bean.com/en/1.7/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.undo


Re: Files on trunk overwritten...

2013-04-25 Thread Les Mikesell
On Thu, Apr 25, 2013 at 2:34 PM, C M cmanalys...@gmail.com wrote:
 I am certain there is simple way out of this situation.

 Some files were committed to trunk which have incorrect updates.

 What's the easiest way to roll back to the previous versions (before the
 erroneous changes were committed)?

 Should I checkout the previous revision and commit them over the erroneous
 changes? Or is there some way to handle this?

Do a reverse-merge of the bad change and commit it back.
Look at the 'undoing changes' section here:
http://svnbook.red-bean.com/en/1.7/svn.branchmerge.basicmerging.html

--
   Les Mikesell
 lesmikes...@gmail.com


Re: Files on trunk overwritten...

2013-04-25 Thread Lorenz
C M wrote:
Some files were committed to trunk which have incorrect updates.

What's the easiest way to roll back to the previous versions (before the
erroneous changes were committed)?

another way is to delete the trunk and reestablish it by copying the
last correct trunk revision.

This way a log of trunk head won't show the intermediate (between the
revision of the copy source ad the copy itself)  commits to trunk.
Only the copy of the earlier revision will show up.
   
---x---  ---y  z--- ...
\ /
 -

If there was only one objectionable commit I would go with the reverse
merge though.
-- 

Lorenz