Bug 435617 - tailor can't convert from svn to hg
Summary: tailor can't convert from svn to hg
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: tailor
Version: 8
Hardware: noarch
OS: Linux
low
low
Target Milestone: ---
Assignee: Dan Horák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-02 16:21 UTC by Martí­n Marqués
Modified: 2008-03-13 07:46 UTC (History)
0 users

Fixed In Version: 0.9.30-1.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-03-13 07:46:11 UTC
Type: ---
Embargoed:


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

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.


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