Bug 435617 - tailor can't convert from svn to hg
tailor can't convert from svn to hg
Product: Fedora
Classification: Fedora
Component: tailor (Show other bugs)
noarch Linux
low Severity low
: ---
: ---
Assigned To: Dan Horák
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-03-02 11:21 EST by Martí­n Marqués
Modified: 2008-03-13 03:46 EDT (History)
0 users

See Also:
Fixed In Version: 0.9.30-1.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-13 03:46:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
tailor file used in --configfile (270 bytes, text/plain)
2008-03-02 11:21 EST, Martí­n Marqués
no flags Details

  None (edit)
Description Martí­n Marqués 2008-03-02 11:21:48 EST
Description of problem:

I'm trying to convert trac's svn repository to hg on my local laptop to do some
tests, and I get instant errors on hg.py.

Attached is the trac.tailor file used to migrate the svn repo.

One more thing: I was able to use tailor 0.9.30 on a Debian system with exactly
the same trac.tailor file.

Version-Release number of selected component (if applicable):

$ rpm -q tailor

How reproducible:

$ tailor --configfile=trac.tailor
12:26:06 [I] Bootstrapping "project" in "/home/martin/hg/trac"
12:26:06 [I] Initializing new repository in '/home/martin/hg/trac'...
12:26:06 [C] Cannot prepare working directory!
Traceback (most recent call last):
  File "/usr/bin/tailor", line 32, in <module>
  File "/usr/lib/python2.5/site-packages/vcpx/tailor.py", line 339, in main
  File "/usr/lib/python2.5/site-packages/vcpx/tailor.py", line 144, in __call__
  File "/usr/lib/python2.5/site-packages/vcpx/tailor.py", line 67, in bootstrap
  File "/usr/lib/python2.5/site-packages/vcpx/target.py", line 550, in
  File "/usr/lib/python2.5/site-packages/vcpx/repository/hg.py", line 445, in
    message = 'Tailor preparing to convert repo by adding .hgignore')
  File "/usr/lib/python2.5/site-packages/vcpx/repository/hg.py", line 346, in
    allopts = self._defaultOpts(cmd)
  File "/usr/lib/python2.5/site-packages/vcpx/repository/hg.py", line 341, in
    return dict([(f[1].replace('-', '_'), f[2]) for f in findcmd(cmd)[1][1]])
  File "/usr/lib/python2.5/site-packages/vcpx/repository/hg.py", line 330, in
    return cmdutil.findcmd(self._getUI(), cmd)
TypeError: findcmd() takes exactly 3 arguments (2 given)

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Martí­n Marqués 2008-03-02 11:21:48 EST
Created attachment 296516 [details]
tailor file used in --configfile
Comment 2 Dan Horák 2008-03-02 11:43:36 EST
Can you try to update tailor to 0.9.30 from the RPMs at
http://koji.fedoraproject.org/koji/buildinfo?buildID=40773 and do your tests again?
Comment 3 Martí­n Marqués 2008-03-02 11:54:24 EST
Dan thanks for the fast response.

First, I found that Fedora has a python-vcpx package which contains the hg.py
file that gave the error, So checking hg.py from 0.9.30 I made this patch which
made tailor work:

$ diff -u hg-tailor-orig.py hg-tailor.py
--- hg-tailor-orig.py   2008-03-02 14:49:29.000000000 -0200
+++ hg-tailor.py        2008-03-02 14:48:47.000000000 -0200
@@ -326,8 +326,12 @@
         # findxxx() is not public, and to make that clear, hg folks
         # keep moving the function around...
         if hasattr(cmdutil, 'findcmd'):            # >= 0.9.4
-            def findcmd(cmd):
-                return cmdutil.findcmd(self._getUI(), cmd)
+            if cmdutil.findcmd.func_code.co_argcount == 2: # 0.9.4
+                def findcmd(cmd):
+                    return cmdutil.findcmd(self._getUI(), cmd)
+            elif cmdutil.findcmd.func_code.co_argcount == 3: # 0.9.5
+                def findcmd(cmd):
+                    return cmdutil.findcmd(self._getUI(), cmd, commands.table)
         elif hasattr(commands, 'findcmd'):         # < 0.9.4
             if commands.findcmd.func_code.co_argcount == 1:
                 findcmd = commands.findcmd

Comment 4 Fedora Update System 2008-03-02 12:14:39 EST
tailor-0.9.30-1.fc8 has been submitted as an update for Fedora 8
Comment 5 Dan Horák 2008-03-02 12:15:58 EST
OK, I will push the 0.9.30 version into official updates.
Comment 6 Martí­n Marqués 2008-03-02 12:28:38 EST
That, and python-vcpx 0.9.30 which has the BUG (I guess it will fall in with the

# rpm -q -R tailor
python-vcpx = 0.9.29-1.fc8
Comment 7 Fedora Update System 2008-03-03 13:24:59 EST
tailor-0.9.30-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update tailor'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-2223
Comment 8 Fedora Update System 2008-03-13 03:46:09 EDT
tailor-0.9.30-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.