Bug 477148 - Tailor Mercurial repository broken by mercurial 1.1 upgrade
Summary: Tailor Mercurial repository broken by mercurial 1.1 upgrade
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: tailor
Version: 9
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Dan Horák
QA Contact: Fedora Extras Quality Assurance
URL: http://progetti.arstecnica.it/tailor/...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-19 12:04 UTC by Daniel Berrangé
Modified: 2008-12-30 23:50 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-12-30 23:42:23 UTC
Type: ---
Embargoed:


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

Description Daniel Berrangé 2008-12-19 12:04:25 UTC
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 Berrangé 2008-12-19 12:07:22 UTC
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 Berrangé 2008-12-19 12:08:03 UTC
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:2401/data/cvs

[hg:target]

"""

Comment 3 Dan Horák 2008-12-19 12:19:18 UTC
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 12:44:37 UTC
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 12:47:07 UTC
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 08:22:22 UTC
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 08:23:56 UTC
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 23:42:20 UTC
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 23:50:59 UTC
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.