# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1289990938 -3600 # Node ID 5e54e333ec3d459be8a774868dc32761c41af29e # Parent ceaa9eeb6741aa2522d983e7c8f41265b17d60a4 wrappers: pass on subdir when creating obtaining svnmeta The incoming, outgoing and push commands are updated. Running any of parents, diff and rebase as the first command will fail, suggesting an 'hg svn rebuildmeta'. diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py --- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -63,10 +63,11 @@ def incoming(orig, ui, repo, source='def if 'subversion' not in other.capabilities: return orig(ui, repo, source, **opts) - meta = repo.svnmeta() + svn = other.svn + meta = repo.svnmeta(svn.uuid, svn.subdir) ui.status('incoming changes from %s\n' % other.svnurl) - for r in other.svn.revisions(start=meta.revmap.youngest): + for r in svn.revisions(start=meta.revmap.youngest): ui.status('\n') for label, attr in revmeta: l1 = label + ':' @@ -83,7 +84,8 @@ def outgoing(repo, dest=None, heads=None # split off #rev; TODO implement --revision/#rev support svnurl, revs, checkout = util.parseurl(dest.svnurl, heads) - meta = repo.svnmeta() + svn = dest.svn + meta = repo.svnmeta(svn.uuid, svn.subdir) parent = repo.parents()[0].node() hashes = meta.revmap.hashes() return util.outgoing_revisions(repo, hashes, parent) @@ -209,7 +211,7 @@ def push(repo, dest, force, revs): rebasemap[node.bin(rebasesrc)] = child.node() outgoing = [rebasemap.get(n) or n for n in outgoing] # TODO: stop constantly creating the SVNMeta instances. - meta = repo.svnmeta(svn.uuid) + meta = repo.svnmeta(svn.uuid, svn.subdir) hashes = meta.revmap.hashes() util.swap_out_encoding(old_encoding) return 1 # so we get a sane exit status, see hg's commands.push