hg push fails when pushing a change that moved a file with spaces

Create issue
Issue #124 new
Sybren Stüvel created an issue

hg push fails when pushing a change that moved a file with spaces in its name.

This reproduces it:

{{{ #!/bin/sh hg clone svn+https://svn.stuvel.eu/hgdemo/ hg rename 'Product/Internal/Documentation/Study Reports' 'Over Here' hg commit -m 'Test a move' hg push }}}

I've attached the traceback.

Comments (9)

  1. Sybren Stüvel reporter

    This bug doesn't appear in the same way locally:

    svnadmin create spacebug
    svn co file:///home/sybren/tmp/spacebug spacebug-svn
    touch 'spacebug-svn/file with spaces'
    svn add 'spacebug-svn/file with spaces'
    svn commit -m 'Initial checkin' spacebug-svn
    hg clone file:///home/sybren/tmp/spacebug spacebug-hg
    cd spacebug-hg
    hg rename 'file with spaces' 'other location'
    hg commit -m Moved
    hg push

    As you can try out yourself, this works just fine. However, this doesn't:

    cd spacebug-hg
    mkdir 'some dir'
    hg rename 'other location' 'some dir'
    hg commit -m 'moved to dir with spaces'
    hg push

    This gives this error message:

    pushing to file:///home/sybren/tmp/spacebug
    searching for changes
    svn: In file '/build/buildd/subversion-1.6.5dfsg/subversion/libsvn_ra/ra_loader.c' line 622: assertion failed (*path != '/')
  2. Former user Account Deleted

    What is the purpose of "[p.strip('/') for p in paths]"? It looks like you're trying to do something like os.path.normpath() but without using os.path.normpath.

  3. Chris Bilson

    I...I'm not really sure. I saw that in some post in one of the forums/mailing lists where I found information about this issue. I should have removed it. It's really only the first hunk that I think has an effect on the problem.

    I will clean this up and patch bomb the list soon.

  4. Former user Account Deleted

    Just wanted to say that the patch referred to above (by cbilson) worked for me when I just had the same issue.

  5. Log in to comment