Bug 478841 - Tailor Mercurial repository cannot delete files after mercurial 1.1 upgrade
Tailor Mercurial repository cannot delete files after 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
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-05 10:27 EST by Daniel Berrange
Modified: 2009-01-21 16:37 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-21 16:36:22 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)
Fix deleted file handling for mercurial 1.1.2 API (1.05 KB, patch)
2009-01-05 10:32 EST, Daniel Berrange
no flags Details | Diff
reverted patch (997 bytes, patch)
2009-01-07 12:32 EST, Dan Horák
no flags Details | Diff

  None (edit)
Description Daniel Berrange 2009-01-05 10:27:47 EST
Following on from the original Mercurial 1.1 upgrade bug report (see bug #477148) , I've discovered a further problem in the HG plugin for tailor. With mercurial 1.1, it is no longer able to handle files which are deleted from the source repository, failing with the following stack trace



14:43:42 [C] Couldn't replay changeset: walk() takes exactly 4 arguments (2 given)
14:43:42 [C] Upstream change application failed
14:43:42 [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 134, in replayChangeset
    self._replayChangeset(changeset)
  File "/usr/lib/python2.5/site-packages/vcpx/target.py", line 336, in _replayChangeset
    action(group)
  File "/usr/lib/python2.5/site-packages/vcpx/target.py", line 416, in _removeEntries
    self._removePathnames([e.name for e in entries])
  File "/usr/lib/python2.5/site-packages/vcpx/repository/hg.py", line 386, in _removePathnames
    files = self._walk(name)
  File "/usr/lib/python2.5/site-packages/vcpx/repository/hg.py", line 483, in _walk
    for src, path in self._getRepo().dirstate.walk(["qemud"]):
TypeError: walk() takes exactly 4 arguments (2 given)
Comment 1 Daniel Berrange 2009-01-05 10:32:37 EST
Created attachment 328203 [details]
Fix deleted file handling for mercurial 1.1.2 API

The syntax of the 'walk' method in mercurial.dirstate changed significantly

In 1.0.2:

-    def walk(self, files=None, match=util.always, badmatch=None):

In 1.1.2:

+    def walk(self, match, unknown, ignored):

The patch I'm uploading is my best guess at what the new API wants, and allowed me to continue to convert the libvirt CVS repo to Mercurial. 

It does not attempt to auto-detect which version of mercurial its running against, so it will need more work before it is suitable for tailor upstream. It would be OK for Fedora, assuming we add a 'Requires: mercurial >= 1.1.2' after applying it to RPM
Comment 2 Fedora Update System 2009-01-06 04:39:18 EST
tailor-0.9.35-4.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/tailor-0.9.35-4.fc9
Comment 3 Fedora Update System 2009-01-06 04:40:09 EST
tailor-0.9.35-4.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/tailor-0.9.35-4.fc10
Comment 4 Fedora Update System 2009-01-07 04:19:41 EST
tailor-0.9.35-4.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-2009-0117
Comment 5 Fedora Update System 2009-01-07 04:19:58 EST
tailor-0.9.35-4.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-2009-0118
Comment 6 Dan Horák 2009-01-07 12:32:07 EST
Created attachment 328401 [details]
reverted patch
Comment 7 Fedora Update System 2009-01-21 16:36:19 EST
tailor-0.9.35-4.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2009-01-21 16:37:40 EST
tailor-0.9.35-4.fc9 has been pushed to the Fedora 9 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.