Bug 435617

Summary: tailor can't convert from svn to hg
Product: [Fedora] Fedora Reporter: Martí­n Marqués <martin.marques>
Component: tailorAssignee: Dan Horák <dan>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: noarch   
OS: Linux   
Whiteboard:
Fixed In Version: 0.9.30-1.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-13 07:46:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
tailor file used in --configfile none

Description Martí­n Marqués 2008-03-02 16:21:48 UTC
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
tailor-0.9.29-1.fc8.noarch

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>
    main()
  File "/usr/lib/python2.5/site-packages/vcpx/tailor.py", line 339, in main
    tailorizer()
  File "/usr/lib/python2.5/site-packages/vcpx/tailor.py", line 144, in __call__
    self.bootstrap()
  File "/usr/lib/python2.5/site-packages/vcpx/tailor.py", line 67, in bootstrap
    dwd.prepareWorkingDirectory(self.source)
  File "/usr/lib/python2.5/site-packages/vcpx/target.py", line 550, in
prepareWorkingDirectory
    self._prepareWorkingDirectory(source_repo)
  File "/usr/lib/python2.5/site-packages/vcpx/repository/hg.py", line 445, in
_prepareWorkingDirectory
    message = 'Tailor preparing to convert repo by adding .hgignore')
  File "/usr/lib/python2.5/site-packages/vcpx/repository/hg.py", line 346, in
_hgCommand
    allopts = self._defaultOpts(cmd)
  File "/usr/lib/python2.5/site-packages/vcpx/repository/hg.py", line 341, in
_defaultOpts
    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
findcmd
    return cmdutil.findcmd(self._getUI(), cmd)
TypeError: findcmd() takes exactly 3 arguments (2 given)


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Martí­n Marqués 2008-03-02 16:21:48 UTC
Created attachment 296516 [details]
tailor file used in --configfile

Comment 2 Dan Horák 2008-03-02 16:43:36 UTC
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 16:54:24 UTC
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

Thanks.

Comment 4 Fedora Update System 2008-03-02 17:14:39 UTC
tailor-0.9.30-1.fc8 has been submitted as an update for Fedora 8

Comment 5 Dan Horák 2008-03-02 17:15:58 UTC
OK, I will push the 0.9.30 version into official updates.

Comment 6 Martí­n Marqués 2008-03-02 17:28:38 UTC
That, and python-vcpx 0.9.30 which has the BUG (I guess it will fall in with the
dependencies).

# rpm -q -R tailor
/usr/bin/python
python-vcpx = 0.9.29-1.fc8


Comment 7 Fedora Update System 2008-03-03 18:24:59 UTC
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 07:46:09 UTC
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.