"push after clone" fail when last commit in svn-repo is "tagging"

Create issue
Issue #196 resolved
Shun-ichi Goto created an issue

When the youngest commit is "tagging" (copy and commit) in remote subversion repository, hgsubversion will fail to push changesets committed very after clone.

This is reproduceable on windows and unix with recent version of hg and hgsubversion. hg = 1.6.2+36-fcb67f74aad9 hgsubversion = 653:ab454ee515d4

The script to reproduce is attached.

Here is a output of "hg push": {{{ pushing to file:///C:/develop/hg/hgsubversion-test/issue-end-by-tag/svnrepo searching for changes [r4] gotoh: r4 (tagged) unknown exception encountered, details follow report bug details to http://mercurial.selenic.com/bts/ or mercurial@selenic.com Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] Mercurial Distributed SCM (version 1.6.2+36-fcb67f74aad9) Extensions loaded: hgsubversion Traceback (most recent call last): File "hg", line 27, in <module> File "mercurial\dispatch.pyc", line 22, in run File "mercurial\dispatch.pyc", line 42, in dispatch File "mercurial\dispatch.pyc", line 64, in _runcatch File "mercurial\dispatch.pyc", line 522, in _dispatch File "mercurial\dispatch.pyc", line 383, in runcommand File "mercurial\dispatch.pyc", line 573, in _runcommand File "mercurial\dispatch.pyc", line 527, in checkargs File "mercurial\dispatch.pyc", line 520, in <lambda> File "mercurial\util.pyc", line 426, in check File "mercurial\extensions.pyc", line 129, in wrap File "mercurial\util.pyc", line 426, in check File "c:/develop/hg/hgsubversion-test/hgsubversion\hgsubversion\wrappers.py", line 431, in generic return orig(ui, repo, args, *opts) File "mercurial\util.pyc", line 426, in check File "mercurial\commands.pyc", line 2843, in push File "hgsubversion\svnrepo.py", line 48, in wrapper File "hgsubversion\svnrepo.py", line 59, in push File "c:/develop/hg/hgsubversion-test/hgsubversion\hgsubversion\wrappers.py", line 167, in push r = repo.pull(dest, force=force) File "hgsubversion\svnrepo.py", line 48, in wrapper File "hgsubversion\svnrepo.py", line 63, in pull File "c:/develop/hg/hgsubversion-test/hgsubversion\hgsubversion\wrappers.py", line 292, in pull close = pullfunshave_replay File "c:/develop/hg/hgsubversion-test/hgsubversion\hgsubversion\replay.py", li ne 187, in convert_rev meta.movetag(tag, new_hash, rev, date) File "c:/develop/hg/hgsubversion-test/hgsubversion\hgsubversion\svnmeta.py", l ine 585, in movetag if (self.get_source_rev(ctx=child)[1] == branch File "c:/develop/hg/hgsubversion-test/hgsubversion\hgsubversion\svnmeta.py", l ine 430, in get_source_rev raise KeyError('%s has no conversion record' % ctx) KeyError: '530d110d9d56 has no conversion record'

}}}

Comments (2)

  1. Shun-ichi Goto reporter

    This patch resolve my issue, but I don't know this is right thing.

    diff -r ab454ee515d4 hgsubversion/svnmeta.py
    --- a/hgsubversion/svnmeta.py	Tue Jul 20 12:53:47 2010 +0200
    +++ b/hgsubversion/svnmeta.py	Wed Aug 11 18:18:52 2010 +0900
    @@ -599,7 +599,7 @@
             new_hash = self.repo.commitctx(ctx)
             if not newparent:
                 assert self.revmap[revnum, branch] == parentctx.node()
    -            self.revmap[revnum, branch] = new_hash
    +            self.revmap[rev.revnum, branch] = new_hash
             self.tags[tag] = hash, rev.revnum
             util.describe_commit(self.ui, new_hash, branch)
     
    
  2. Log in to comment