RE: [PATCH 1/7] remote-hg: don't decode UTF-8 paths into Unicode objects

2013-11-11 Thread Felipe Contreras
Richard Hansen wrote:
 The internal mercurial API expects ordinary 8-bit string objects, not
 Unicode string objects.  With this change, the test-hg.sh unit tests
 pass again.

This makes sense to me, but the tests are already passing for me. How are they
failing for you?

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/7] remote-hg: don't decode UTF-8 paths into Unicode objects

2013-11-11 Thread Richard Hansen
On 2013-11-11 06:04, Felipe Contreras wrote:
 Richard Hansen wrote:
 The internal mercurial API expects ordinary 8-bit string objects, not
 Unicode string objects.  With this change, the test-hg.sh unit tests
 pass again.
 
 This makes sense to me, but the tests are already passing for me. How are they
 failing for you?

$ hg --version | head -n 1
Mercurial Distributed SCM (version 2.2.2)
$ cd ~/git/t
$ ../contrib/remote-helpers/test-hg.sh --verbose --immediate
...
Traceback (most recent call last):
  File ~/git/contrib/remote-helpers/git-remote-hg, line 1246, in module
sys.exit(main(sys.argv))
  File ~/git/contrib/remote-helpers/git-remote-hg, line 1230, in main
do_export(parser)
  File ~/git/contrib/remote-helpers/git-remote-hg, line 1031, in do_export
parse_commit(parser)
  File ~/git/contrib/remote-helpers/git-remote-hg, line 822, in
parse_commit
node = hghex(repo.commitctx(ctx))
  File /usr/lib/python2.7/dist-packages/mercurial/localrepo.py, line
1270, in commitctx
p2.manifestnode(), (new, drop))
  File /usr/lib/python2.7/dist-packages/mercurial/manifest.py, line
197, in add
cachedelta = (self.rev(p1), addlistdelta(addlist, delta))
  File /usr/lib/python2.7/dist-packages/mercurial/manifest.py, line
124, in addlistdelta
addlist[start:end] = array.array('c', content)
TypeError: array item must be char
not ok 4 - update bookmark

I can put the above in the commit message if people would like it there.

-Richard
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/7] remote-hg: don't decode UTF-8 paths into Unicode objects

2013-11-11 Thread Felipe Contreras
On Mon, Nov 11, 2013 at 12:30 PM, Richard Hansen rhan...@bbn.com wrote:
 On 2013-11-11 06:04, Felipe Contreras wrote:
 Richard Hansen wrote:
 The internal mercurial API expects ordinary 8-bit string objects, not
 Unicode string objects.  With this change, the test-hg.sh unit tests
 pass again.

 This makes sense to me, but the tests are already passing for me. How are 
 they
 failing for you?

 $ hg --version | head -n 1
 Mercurial Distributed SCM (version 2.2.2)
 $ cd ~/git/t
 $ ../contrib/remote-helpers/test-hg.sh --verbose --immediate

Ah, I see they are failing now (v 2.8). I don't know what I was testing.

FWIW my tree doesn't have this problem [1].

 I can put the above in the commit message if people would like it there.

Personally I think it's overkill. You mentioned the tests failed,
that's enough explanation. I just wanted to see if that was actually
the case.

[1] https://travis-ci.org/felipec/git-travis

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/7] remote-hg: don't decode UTF-8 paths into Unicode objects

2013-11-10 Thread Richard Hansen
The internal mercurial API expects ordinary 8-bit string objects, not
Unicode string objects.  With this change, the test-hg.sh unit tests
pass again.

Signed-off-by: Richard Hansen rhan...@bbn.com
---
 contrib/remote-helpers/git-remote-hg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/remote-helpers/git-remote-hg 
b/contrib/remote-helpers/git-remote-hg
index 3222afd..c6026b9 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -747,7 +747,7 @@ def parse_commit(parser):
 f = { 'deleted' : True }
 else:
 die('Unknown file command: %s' % line)
-path = c_style_unescape(path).decode('utf-8')
+path = c_style_unescape(path)
 files[path] = f
 
 # only export the commits if we are on an internal proxy repo
-- 
1.8.5.rc1.207.gc17dd22

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html