hgpullsvn dies with exception when started outside of repository

Bug #174232 reported by psl
2
Affects Status Importance Assigned to Milestone
hgsvn (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: hgsvn

Ubuntu 7.10, i386

$ hgpullsvn --version
hgsvn 0.1.3

$ hgpullsvn
* svn 'info' '--xml' '.'
Traceback (most recent call last):
  File "/usr/bin/hgpullsvn", line 8, in <module>
    load_entry_point('hgsvn==0.1.3', 'console_scripts', 'hgpullsvn')()
  File "/var/lib/python-support/python2.5/hgsvn/run/hgpullsvn.py", line 176, in main
    svn_info = get_svn_info('.')
  File "/var/lib/python-support/python2.5/hgsvn/svnclient.py", line 119, in get_svn_info
    fail_if_stderr=True)
  File "/var/lib/python-support/python2.5/hgsvn/common.py", line 148, in run_svn
    args=args, bulk_args=bulk_args, fail_if_stderr=fail_if_stderr)
  File "/var/lib/python-support/python2.5/hgsvn/common.py", line 93, in run_command
    return _run_raw_command(cmd, map(_transform_arg, args), fail_if_stderr)
  File "/var/lib/python-support/python2.5/hgsvn/common.py", line 67, in _run_raw_command
    % (pipe.returncode, cmd_string, err))
hgsvn.errors.ExternalCommandFailed: External program failed (return code 1): svn 'info' '--xml' '.'
svn: '.' is not a working copy

This complicated error output is written when hgpullsvn is run from the directory that is not Mercurial repository. The same error when hgpullsvn is started in pure Mercurial directory (not created with hgpullsvn command).

From my point of view, some check has to be added to hgpullsvn, to don't crash in this way.

BTW, fast introduction How to convert Subversion repository to Mercurial repository is here: http://digitalspaghetti.me.uk/category/svn

Revision history for this message
psl (slansky) wrote :

Other problem I noticed is that I think it is possible to run two hgpullsvn commands in the valid directory in the same time. I think that some lock should be checked to prevent data corruption.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10?

Changed in hgsvn:
status: New → Incomplete
Revision history for this message
psl (slansky) wrote :

I can repeat it in 8.10 i386 too:

# uname -rvs; cd /; hgpullsvn
Linux 2.6.27-7-generic #1 SMP Fri Oct 24 06:42:44 UTC 2008
* svn 'info' '--xml' '.'
Traceback (most recent call last):
  File "/usr/bin/hgpullsvn", line 8, in <module>
    load_entry_point('hgsvn==0.1.6', 'console_scripts', 'hgpullsvn')()
  File "/var/lib/python-support/python2.5/hgsvn/run/hgpullsvn.py", line 271, in main
    return locked_main()
  File "/var/lib/python-support/python2.5/hgsvn/run/hgpullsvn.py", line 188, in locked_main
    svn_info = get_svn_info('.')
  File "/var/lib/python-support/python2.5/hgsvn/svnclient.py", line 137, in get_svn_info
    fail_if_stderr=True)
  File "/var/lib/python-support/python2.5/hgsvn/common.py", line 209, in run_svn
    args=args, bulk_args=bulk_args, fail_if_stderr=fail_if_stderr)
  File "/var/lib/python-support/python2.5/hgsvn/common.py", line 149, in run_command
    return _run_raw_command(cmd, map(_transform_arg, args), fail_if_stderr)
  File "/var/lib/python-support/python2.5/hgsvn/common.py", line 123, in _run_raw_command
    % (pipe.returncode, cmd_string, err))
hgsvn.errors.ExternalCommandFailed: External program failed (return code 1): svn 'info' '--xml' '.'
svn: '.' is not a working copy

Revision history for this message
Dimitrios Symeonidis (azimout) wrote :

psl, is this still an issue in Jaunty/Karmic? thank you

summary: - hgpullsvn dies with exceptation when started out of repository
+ hgpullsvn dies with exception when started outside of repository
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for hgsvn (Ubuntu) because there has been no activity for 60 days.]

Changed in hgsvn (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.