Bug 477148 - Tailor Mercurial repository broken by mercurial 1.1 upgrade
Tailor Mercurial repository broken by mercurial 1.1 upgrade
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: tailor (Show other bugs)
9
All Linux
low Severity medium
: ---
: ---
Assigned To: Dan Horák
Fedora Extras Quality Assurance
http://progetti.arstecnica.it/tailor/...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-19 07:04 EST by Daniel Berrange
Modified: 2008-12-30 18:50 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-30 18:42:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Detect correct findcmd syntax for Mercurial 1.1 (1.21 KB, patch)
2008-12-19 07:07 EST, Daniel Berrange
no flags Details | Diff

  None (edit)
Description Daniel Berrange 2008-12-19 07:04:25 EST
Description of problem:
Mercurial 1.1 has just been pushed out to Fedora repositories for 9/10/rawhide. This completely breaks the Tailor mercurial plugin, making it unable to commit any new changes during conversion.

Version-Release number of selected component (if applicable):
mercurial-1.1-1.fc9.i386
tailor-0.9.35-1.fc9.noarch


How reproducible:
Always

Steps to Reproduce:
1. Try to run tailor with a 'hg' repository as destination
2.
3.
  
Actual results:
11:50:00 [C] Couldn't replay changeset: 'str' object has no attribute 'keys'
11:50:00 [C] Upstream change application failed
11:50:00 [C] Something unexpected!
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/vcpx/tailor.py", line 154, in __call__
    self.update()
  File "/usr/lib/python2.5/site-packages/vcpx/tailor.py", line 118, in update
    applyable=self._applyable, applied=self._applied)
  File "/usr/lib/python2.5/site-packages/vcpx/dualwd.py", line 102, in applyPendingChangesets
    applied=applied)
  File "/usr/lib/python2.5/site-packages/vcpx/source.py", line 137, in applyPendingChangesets
    replay(c)
  File "/usr/lib/python2.5/site-packages/vcpx/dualwd.py", line 113, in replayChangeset
    self.target.replayChangeset(changeset)
  File "/usr/lib/python2.5/site-packages/vcpx/target.py", line 143, in replayChangeset
    entries, tags = changeset.tags)
  File "/usr/lib/python2.5/site-packages/vcpx/repository/hg.py", line 308, in _commit
    self._hgCommand('commit', **opts)
  File "/usr/lib/python2.5/site-packages/vcpx/repository/hg.py", line 366, in _hgCommand
    allopts = self._defaultOpts(cmd)
  File "/usr/lib/python2.5/site-packages/vcpx/repository/hg.py", line 361, 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 350, in findcmd
    return cmdutil.findcmd(self._getUI(), cmd, commands.table)
  File "/usr/lib/python2.5/site-packages/mercurial/cmdutil.py", line 52, in findcmd
    choice = findpossible(cmd, table, strict)
  File "/usr/lib/python2.5/site-packages/mercurial/cmdutil.py", line 29, in findpossible
    for e in table.keys():
AttributeError: 'str' object has no attribute 'keys'


Expected results:
Converts the repository

Additional info:
Comment 1 Daniel Berrange 2008-12-19 07:07:22 EST
Created attachment 327436 [details]
Detect correct findcmd syntax for Mercurial 1.1

The problem appears to be that the syntax of mercurial's 'findcmd' method in /usr/lib64/python2.5/site-packages/mercurial/cmdutil.py change from:

  def findcmd(ui, cmd, table):

to

  def findcmd(cmd, table, strict=True):


Tailor was determining what syntax to use based on number of arguments. Since both old and new now have same number of arguments, I'm adding a further test. This time checking the name of the first argument.
Comment 2 Daniel Berrange 2008-12-19 07:08:03 EST
FYI the tailor script I tested this with is

#!/usr/bin/env tailor

"""
[DEFAULT]
verbose = True

[project]
target = hg:target
start-revision = INITIAL
root-directory = /home/berrange/src/xen
patch-name-format =
state-file = libvirt-hg.state
source = cvs:source
subdir = libvirt-hg

[cvs:source]
module = libvirt
repository = :pserver:anoncvs@libvirt.org:2401/data/cvs

[hg:target]

"""
Comment 3 Dan Horák 2008-12-19 07:19:18 EST
Hi Daniel,
thanks for such perfect report, the issue is known upstream, see URL. I will contact the author.
Comment 4 Fedora Update System 2008-12-19 07:44:37 EST
tailor-0.9.35-3.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/tailor-0.9.35-3.fc10
Comment 5 Fedora Update System 2008-12-19 07:47:07 EST
tailor-0.9.35-3.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/tailor-0.9.35-3.fc9
Comment 6 Fedora Update System 2008-12-21 03:22:22 EST
tailor-0.9.35-3.fc9 has been pushed to the Fedora 9 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-newkey update tailor'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-11469
Comment 7 Fedora Update System 2008-12-21 03:23:56 EST
tailor-0.9.35-3.fc10 has been pushed to the Fedora 10 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/F10/FEDORA-2008-11546
Comment 8 Fedora Update System 2008-12-30 18:42:20 EST
tailor-0.9.35-3.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2008-12-30 18:50:59 EST
tailor-0.9.35-3.fc10 has been pushed to the Fedora 10 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.