Ticket #102 (closed defect: fixed)
hg --> svn: AttributeError: 'localrepository' object has no attribute 'update'
| Reported by: | ThurnerRupert | Owned by: | lele |
|---|---|---|---|
| Priority: | major | Milestone: | VersionOne |
| Component: | hg | Version: | 0.9 |
| Keywords: | Cc: |
Description
when trying to run a tailor from a mercurial source to a svn target the first time, it fails, using the following versions, with the error below:
- tailor version: 0.9.27
- hg version: 0.9.3
$ tailor -D -v --configfile mycomp.tailor
18:04:21 [W] Forcing UTF-8 encoding instead of ISO8859-1
18:04:21 [I] Bootstrapping "project" in "/usr/local/sync/hg2svn/mycomp"
18:04:21 [I] $ svn ls http://mysvn.net/svn/test/trunk/mycomp-hgsync
18:04:23 [I] [Ok]
18:04:23 [I] Extracting revision 'INITIAL' from '/usr/local/hg/mycomp' into '/usr/local/sync/hg2svn/mycomp'
18:04:23 [C] Checkout of project failed!
Traceback (most recent call last):
File "/usr/local/bin/tailor", line 35, in <module>
main()
File "/usr/local/lib/python2.5/site-packages/vcpx/tailor.py", line 339, in main
tailorizer()
File "/usr/local/lib/python2.5/site-packages/vcpx/tailor.py", line 144, in __call__
self.bootstrap()
File "/usr/local/lib/python2.5/site-packages/vcpx/tailor.py", line 74, in bootstrap
actual = dwd.checkoutUpstreamRevision(revision)
File "/usr/local/lib/python2.5/site-packages/vcpx/source.py", line 252, in checkoutUpstreamRevision
last = self._checkoutUpstreamRevision(revision)
File "/usr/local/lib/python2.5/site-packages/vcpx/repository/hg.py", line 91, in _checkoutUpstreamRevision
repo.update(node)
AttributeError: 'localrepository' object has no attribute 'update'
what could be the reason for this? the only thing i found on the web is this from brendan.
Change History
comment:2 Changed 6 years ago by lele
Seen at http://www.nopaste.com/p/arXADJZf5, pasted by Henning at 2007-10-04 07:53:35 UTC:
--- hg.py.old 2007-10-04 09:39:11.000000000 +0200
+++ hg.py 2007-10-04 09:45:16.000000000 +0200
@@ -88,7 +88,7 @@
self.log.info('Extracting revision %r from %r into %r',
revision, self.repository.repository, self.repository.basedir)
- repo.update(node)
+ hg.update(repo, node)
return self._changesetForRevision(repo, revision)
@@ -108,7 +108,7 @@
node = self._getNode(repo, changeset.revision)
self.log.info('Updating to %r', changeset.revision)
- res = repo.update(node)
+ res = hg.update(repo, node)
if res:
# Files in to-be-merged changesets not on the trunk will
# cause a merge error on update. If no files are modified,
@@ -117,7 +117,7 @@
conflicting = modified + added + removed + deleted
if conflicting:
return conflicting
- return repo.update(node, force=True)
+ return hg.update(repo, node, force=True)
def _changesetForRevision(self, repo, revision):
from datetime import datetime
Note: See
TracTickets for help on using
tickets.

The write up by Kevin Cavanaugh has the best details of the error: http://www.mail-archive.com/tailor@lists.zooko.com/msg00843.html
Since Mercurial's API has been under a bit of flux, tailor needs to have someone assigned to fixing the hg.py file to get support back in place for the current hg release.