diff options
author | Javi Merino <vicho@debian.org> | 2015-10-25 15:31:24 +0000 |
---|---|---|
committer | Javi Merino <vicho@debian.org> | 2015-10-25 15:31:24 +0000 |
commit | ae5b9e085f9ac524ee9456d598fd6542da59ecb9 (patch) | |
tree | 79b7cba13a61cdde84ed4a8c0a6632efb6bfb51e | |
parent | 33ff705e9aa1bf0e280c8038004176c87548c3dc (diff) | |
parent | a4d4413a8d6e3658c9ab23e31d0ece0c963721b8 (diff) |
New upstream release
-rw-r--r-- | .hg_archival.txt | 4 | ||||
-rw-r--r-- | .hgtags | 1 | ||||
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | hgsubversion/editor.py | 17 |
4 files changed, 16 insertions, 12 deletions
diff --git a/.hg_archival.txt b/.hg_archival.txt index 3abf145..a721aaa 100644 --- a/.hg_archival.txt +++ b/.hg_archival.txt @@ -1,4 +1,4 @@ repo: f2636cfed11500fdc47d1e3822d8e4a2bd636bf7 -node: 38be7a6b6def3298fe9ffff141eb58e1370a53cc +node: 759cafce6becef077fb1a152b554a05ff66b04cd branch: stable -tag: 1.8.2 +tag: 1.8.3 @@ -16,3 +16,4 @@ d0f3a5c2cb56ce65d9ef1c611c8bfbebdc3bef34 1.5.1 139a44a63090b2c0f8e05d7d1104d3d9c9e26f57 1.7 c1756971f8828a59c859513f208c6d79bf34c275 1.8 dde1ade36a49d3d0e1b4b8bd384a6797665b5081 1.8.1 +38be7a6b6def3298fe9ffff141eb58e1370a53cc 1.8.2 diff --git a/debian/changelog b/debian/changelog index 31aca66..5cc8d4b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +hgsubversion (1.8.3-1) UNRELEASED; urgency=medium + + * New upstream release + + -- Javi Merino <vicho@debian.org> Sun, 25 Oct 2015 15:07:58 +0000 + hgsubversion (1.8.2-1) unstable; urgency=medium * New upstream release diff --git a/hgsubversion/editor.py b/hgsubversion/editor.py index bfe0345..f50f928 100644 --- a/hgsubversion/editor.py +++ b/hgsubversion/editor.py @@ -199,8 +199,8 @@ class HgEditor(svnwrap.Editor): self._openpaths = {} self._deleted = set() self._getctx = hgutil.lrucachefunc(self.repo.changectx) - # A stack of opened directory (baton, path) pairs. - self._opendirs = [] + # A map from directory baton to path + self._opendirs = {} self._missing = set() def _openfile(self, path, data, isexec, islink, copypath, create=False): @@ -220,16 +220,13 @@ class HgEditor(svnwrap.Editor): def _opendir(self, path): self._filecounter += 1 baton = 'f%d-%s' % (self._filecounter, path) - self._opendirs.append((baton, path)) + self._opendirs[baton] = path return baton def _checkparentdir(self, baton): - if not self._opendirs: + if not self._opendirs or baton not in self._opendirs: raise EditingError('trying to operate on an already closed ' 'directory: %s' % baton) - if self._opendirs[-1][0] != baton: - raise EditingError('can only operate on the most recently ' - 'opened directory: %s != %s' % (self._opendirs[-1][0], baton)) def _deletefile(self, path): if self.meta.is_path_valid(path): @@ -532,7 +529,7 @@ class HgEditor(svnwrap.Editor): self._checkparentdir(dir_baton) if len(self._opendirs) == 1: return - path = self._opendirs[-1][1] + path = self._opendirs[dir_baton] if name == 'svn:externals': self.current.externals[path] = value @@ -556,7 +553,7 @@ class HgEditor(svnwrap.Editor): @svnwrap.ieditor def close_directory(self, dir_baton, dir_pool=None): self._checkparentdir(dir_baton) - self._opendirs.pop() + del self._opendirs[dir_baton] @svnwrap.ieditor def apply_textdelta(self, file_baton, base_checksum, pool=None): @@ -620,7 +617,7 @@ class HgEditor(svnwrap.Editor): if self._opendirs: raise EditingError('directory %s was not closed' - % self._opendirs[-1][1]) + % self._opendirs.keys()[-1]) # Resolve by changelog entries to avoid extra reads nodes = {} |