summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Shadura <andrew.shadura@collabora.co.uk>2019-09-16 19:23:43 +0200
committerAndrej Shadura <andrew.shadura@collabora.co.uk>2019-09-16 19:23:43 +0200
commit5bf84ade35e6ea31ac46f1d24595cb1e1e5b212b (patch)
treef25f6ba7707e101ff11e606e7cf669e484bb8dcc
parente2e56b621fe048a3b12068627405bc9336e13774 (diff)
New upstream version 1.9.3+git20190419+6a6ce
-rw-r--r--.hg_archival.txt6
-rw-r--r--.hgsigs1
-rw-r--r--.hgtags1
-rw-r--r--README10
-rw-r--r--hgsubversion/__init__.py43
-rw-r--r--hgsubversion/compathacks.py36
-rw-r--r--hgsubversion/replay.py2
-rw-r--r--hgsubversion/stupid.py2
-rw-r--r--hgsubversion/svncommands.py8
-rw-r--r--hgsubversion/svnrepo.py13
-rw-r--r--hgsubversion/util.py6
-rw-r--r--hgsubversion/verify.py21
-rw-r--r--hgsubversion/wrappers.py6
-rw-r--r--tests/test_fetch_branches.py2
-rw-r--r--tests/test_single_dir_clone.py8
-rw-r--r--tests/test_single_dir_push.py2
-rw-r--r--tests/test_tags.py2
17 files changed, 78 insertions, 91 deletions
diff --git a/.hg_archival.txt b/.hg_archival.txt
index abfad82..b358ef5 100644
--- a/.hg_archival.txt
+++ b/.hg_archival.txt
@@ -1,4 +1,6 @@
repo: f2636cfed11500fdc47d1e3822d8e4a2bd636bf7
-node: 207a0f26f797ecf241dddf00673e77e99bee7323
+node: 6a6ce9d9da352801d30263178db6ba3f1637c197
branch: default
-tag: 1.9.3
+latesttag: 1.9.3
+latesttagdistance: 10
+changessincelatesttag: 10
diff --git a/.hgsigs b/.hgsigs
index 85f7d77..a30c6a3 100644
--- a/.hgsigs
+++ b/.hgsigs
@@ -5,3 +5,4 @@ e7d84481cf76a1a839b4ab2ebb0a081b01658fe0 0 iQIcBAABAgAGBQJUy6pRAAoJELnJ3IJKpb3VN
08ea19b989c389af65b75290664038a2d74786d5 0 iQIzBAABCAA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PxdBJ2Jum+gVWCE9MHaVFFuJYuLKsFMi1mQ4Fob5sjUU36cGbDoz+wL1NwJPVo3QYIz0dsDA0ZfETeepxB/0Xr7+nk8/GlQ1+lwVgtnbk1nBdHnUBTK8pTDN9aFCkgvOfO9reA=
+207a0f26f797ecf241dddf00673e77e99bee7323 0 iQIzBAABCAAdFiEEK8zhT1xnJaouqK63ucncgkqlvdUFAlvdF3IACgkQucncgkqlvdXnUw//YjBQTpgq00bNdnWGQSNUCFam7G2ySNF+n/oS7fe2xGCyYDdzwPSMzamk4+DascBbB9ig1aLTd+QMLxlaILAJKNNbVMXiXmtl9jDBnFWF+PrRch+AdcJL38VcZVCuG4qMMsABKDwaexDSTwPIIVDCZNGTeMpAeYJJ5/1Q96QF0/U64G5ofNIC+k5WBUr5N+mdipXV5Nu3/ZEsAgF4Z15XobxZdnAuzENFKCDxtzyR1QoLLITxQm8+pDyjEUuDKYy40ziqOaSejyIaTre/J3/Gc02lDEn22QOxPzq0l9+WlPo2AHNjvP2U3zWlz6FbVSRHh0dIxntAWEVewt1XTLk3Vqe2HRZeA7R7joN8fq0DiAGlpt3+P1gwRjt8wyKAR0mFesPFETxPRyrgqClOcMRjXfo1TNDt6CqElGta6v4kN4A4E/hpckKcAc27c++QINkxxQ4XLuCpISm7PFxUVowSDW4vxA5CAdnj1VytKIg1CXE1rBuut9rthuW6Z8q1AQFXjVw175PaYTWjeogFWym+neIgxMglvdiLPubJT+DZjvfV2KY6G2dR0hoQSKUzdotzcMrWqs6OzyUn2c6Mno3Gw4nLFgIfF9Z9Azl8JfwKUb0273XTYAz4JA9To1Rb1zn94yGIGpoB8oG3wl9cr/IywmJ3mrNzD1ojKuR+cJeloKk=
diff --git a/.hgtags b/.hgtags
index 15d6499..2e3e099 100644
--- a/.hgtags
+++ b/.hgtags
@@ -25,3 +25,4 @@ bd979667611d9df733c61251e7668899f3e77a8f 1.8.5
08ea19b989c389af65b75290664038a2d74786d5 1.9
b303c9414190aab398e7853dc99ebd4e82e497a5 1.9.1
bb09e8a230d6192722059eba749fa4f889102364 1.9.2
+207a0f26f797ecf241dddf00673e77e99bee7323 1.9.3
diff --git a/README b/README
index b421bae..a529410 100644
--- a/README
+++ b/README
@@ -16,19 +16,17 @@ Installation
------------
You need to have either have Subversion 1.5 (or later) installed along with
either Subvertpy 0.7.4 (or later) or the Subversion SWIG Python bindings. You
-need Mercurial 2.0 or later.
+need Mercurial 3.7 or later.
-.. _mercurial: http://selenic.com/repo/hg
-.. _mercurial-stable: http://selenic.com/repo/hg-stable
-.. _crew: http://hg.intevation.org/mercurial/crew
-.. _crew-stable: http://hg.intevation.org/mercurial/crew-stable
+.. _mercurial: http://mercurial-scm.org/repo/hg
+.. _mercurial-stable: http://mercurial-scm.org/repo/hg-stable
If you are unfamiliar with installing Mercurial extensions, please see
the UsingExtensions_ page in the Mercurial wiki. Look at the example
for specifying an absolute path near the bottom of the page. You want
to give the path to the top level of your clone of this repository.
-.. _UsingExtensions: http://mercurial.selenic.com/wiki/UsingExtensions
+.. _UsingExtensions: http://mercurial-scm.org/wiki/UsingExtensions
Before using hgsubversion, I *strongly* encourage you to run the
automated tests. Just use nose_ if you have it (or ``easy_install
diff --git a/hgsubversion/__init__.py b/hgsubversion/__init__.py
index aba258c..3870ebd 100644
--- a/hgsubversion/__init__.py
+++ b/hgsubversion/__init__.py
@@ -21,12 +21,7 @@ import inspect
import os
from mercurial import commands
-try:
- from mercurial import exchange
- exchange.push # existed in first iteration of this file
-except ImportError:
- # We only *use* the exchange module in hg 3.2+, so this is safe
- pass
+from mercurial import exchange
from mercurial import error as hgerror
from mercurial import extensions
from mercurial import help
@@ -52,6 +47,7 @@ except (ImportError, AttributeError):
'svn.ra',
}
+from mercurial import discovery
from mercurial import revset
from mercurial import subrepo
@@ -106,26 +102,13 @@ wrapcmds = { # cmd: generic, target, fixdoc, ppopts, opts
]),
}
-try:
- from mercurial import discovery
- def findcommonoutgoing(orig, *args, **opts):
- capable = getattr(args[1], 'capable', lambda x: False)
- if capable('subversion'):
- return wrappers.findcommonoutgoing(*args, **opts)
- else:
- return orig(*args, **opts)
- extensions.wrapfunction(discovery, 'findcommonoutgoing', findcommonoutgoing)
-except AttributeError:
- # only need the discovery variant of this code when we drop hg < 1.6
- def findoutgoing(orig, *args, **opts):
- capable = getattr(args[1], 'capable', lambda x: False)
- if capable('subversion'):
- return wrappers.findoutgoing(*args, **opts)
- else:
- return orig(*args, **opts)
- extensions.wrapfunction(discovery, 'findoutgoing', findoutgoing)
-except ImportError:
- pass
+def findcommonoutgoing(orig, *args, **opts):
+ capable = getattr(args[1], 'capable', lambda x: False)
+ if capable('subversion'):
+ return wrappers.findcommonoutgoing(*args, **opts)
+ else:
+ return orig(*args, **opts)
+extensions.wrapfunction(discovery, 'findcommonoutgoing', findcommonoutgoing)
def extsetup(ui):
"""insert command wrappers for a bunch of commands"""
@@ -157,12 +140,8 @@ def extsetup(ui):
except:
pass
- if not hgutil.safehasattr(localrepo.localrepository, 'push'):
- # Mercurial >= 3.2
- extensions.wrapfunction(exchange, 'push', wrappers.exchangepush)
- if not hgutil.safehasattr(localrepo.localrepository, 'pull'):
- # Mercurial >= 3.2
- extensions.wrapfunction(exchange, 'pull', wrappers.exchangepull)
+ extensions.wrapfunction(exchange, 'push', wrappers.exchangepush)
+ extensions.wrapfunction(exchange, 'pull', wrappers.exchangepull)
helpdir = os.path.join(os.path.dirname(__file__), 'help')
diff --git a/hgsubversion/compathacks.py b/hgsubversion/compathacks.py
index 5b515b1..ad47a1f 100644
--- a/hgsubversion/compathacks.py
+++ b/hgsubversion/compathacks.py
@@ -3,17 +3,19 @@
import errno
import sys
-from mercurial import util
-
-def branchset(repo):
- """Return the set of branches present in a repo.
-
- Works around branchtags() vanishing between 2.8 and 2.9.
- """
- try:
- return set(repo.branchmap())
- except AttributeError:
- return set(repo.branchtags())
+from mercurial import ui as uimod, util
+
+# ui.makeprogress will be dropped after hg-5.1
+if util.safehasattr(uimod.ui, 'makeprogress'):
+ def progress(ui, topic, pos, item="", unit="", total=None):
+ progress = ui.makeprogress(topic, unit, total)
+ if pos is not None:
+ progress.update(pos, item=item)
+ else:
+ progress.complete()
+else:
+ def progress(ui, topic, pos, item="", unit="", total=None):
+ ui.progress(topic, pos, item="", unit="", total=None)
def pickle_load(f):
import cPickle as pickle
@@ -24,6 +26,7 @@ def makememfilectx(repo, memctx, path, data, islink, isexec, copied):
"""Return a memfilectx
Works around API change by 8a0cac20a1ad (first in 4.5).
+ and also API change by 550a172a603b9e (first in 5.0)
"""
from mercurial import context
try:
@@ -31,8 +34,15 @@ def makememfilectx(repo, memctx, path, data, islink, isexec, copied):
islink=islink, isexec=isexec, copied=copied,
changectx=memctx)
except TypeError:
- return context.memfilectx(repo=repo, path=path, data=data,
- islink=islink, isexec=isexec, copied=copied)
+ try:
+ return context.memfilectx(repo=repo, path=path, data=data,
+ islink=islink, isexec=isexec,
+ copied=copied)
+ except TypeError:
+ return context.memfilectx(repo=repo, changectx=memctx,
+ path=path, data=data,
+ islink=islink, isexec=isexec,
+ copysource=copied)
def filectxfn_deleted(memctx, path):
"""
diff --git a/hgsubversion/replay.py b/hgsubversion/replay.py
index e88a87e..d23a89c 100644
--- a/hgsubversion/replay.py
+++ b/hgsubversion/replay.py
@@ -140,7 +140,7 @@ def _convert_rev(ui, meta, svn, r, tbdelta, firstrun):
tag = meta.get_path_tag(meta.remotename(branch))
if (tag and tag not in meta.tags
and branch not in meta.branches
- and branch not in compathacks.branchset(meta.repo)
+ and branch not in meta.repo.branchmap()
and not files):
continue
diff --git a/hgsubversion/stupid.py b/hgsubversion/stupid.py
index 94cc91e..245d362 100644
--- a/hgsubversion/stupid.py
+++ b/hgsubversion/stupid.py
@@ -759,7 +759,7 @@ def convert_rev(ui, meta, svn, r, tbdelta, firstrun):
# svnmeta.committag(), we can skip the whole branch for now
if (tag and tag not in meta.tags and
b not in meta.branches
- and b not in compathacks.branchset(meta.repo)
+ and b not in meta.repo.branchmap()
and not files_touched):
continue
diff --git a/hgsubversion/svncommands.py b/hgsubversion/svncommands.py
index 5284421..ba8a12c 100644
--- a/hgsubversion/svncommands.py
+++ b/hgsubversion/svncommands.py
@@ -108,7 +108,7 @@ def _buildmeta(ui, repo, args, partial=False, skipuuid=False):
# of the repository instead. During this traversal, we find all converted
# changesets that close a branch, and store their first parent
for ctx in util.get_contexts(repo, startrev):
- ui.progress('prepare', ctx.rev() - startrev, total=numrevs)
+ compathacks.progress(ui, 'prepare', ctx.rev() - startrev, total=numrevs)
convinfo = util.getsvnrev(ctx, None)
if not convinfo:
@@ -132,11 +132,11 @@ def _buildmeta(ui, repo, args, partial=False, skipuuid=False):
else:
closed.add(parentctx.rev())
- ui.progress('prepare', None, total=numrevs)
+ compathacks.progress(ui, 'prepare', None, total=numrevs)
revmapbuf = []
for ctx in util.get_contexts(repo, startrev):
- ui.progress('rebuild', ctx.rev() - startrev, total=numrevs)
+ compathacks.progress(ui, 'rebuild', ctx.rev() - startrev, total=numrevs)
convinfo = util.getsvnrev(ctx, None)
if not convinfo:
@@ -267,7 +267,7 @@ def _buildmeta(ui, repo, args, partial=False, skipuuid=False):
revision)
revmap.batchset(revmapbuf, youngest)
- ui.progress('rebuild', None, total=numrevs)
+ compathacks.progress(ui, 'rebuild', None, total=numrevs)
# save off branch info
util.dump(branchinfo, meta.branch_info_file)
diff --git a/hgsubversion/svnrepo.py b/hgsubversion/svnrepo.py
index b79d245..cca7447 100644
--- a/hgsubversion/svnrepo.py
+++ b/hgsubversion/svnrepo.py
@@ -100,19 +100,6 @@ def generate_repo_class(ui, repo):
self.pushkey('phases', self[hash].hex(), str(phases.draft), str(phases.public))
return hash
- if hgutil.safehasattr(localrepo.localrepository, 'push'):
- # Mercurial < 3.2
- # TODO use newbranch to allow branch creation in Subversion?
- @remotesvn
- def push(self, remote, force=False, revs=None, newbranch=None):
- return wrappers.push(self, remote, force, revs)
-
- if hgutil.safehasattr(localrepo.localrepository, 'pull'):
- # Mercurial < 3.2
- @remotesvn
- def pull(self, remote, heads=[], force=False):
- return wrappers.pull(self, remote, heads, force)
-
@remotesvn
def findoutgoing(self, remote, base=None, heads=None, force=False):
return wrappers.findoutgoing(self, remote, heads, force)
diff --git a/hgsubversion/util.py b/hgsubversion/util.py
index fed475d..eaa2f04 100644
--- a/hgsubversion/util.py
+++ b/hgsubversion/util.py
@@ -249,6 +249,12 @@ class PrefixMatch(object):
def prefix(self):
return False
+ def visitdir(self, dir):
+ return True
+
+ def visitchildrenset(self, dir):
+ return 'this'
+
def outgoing_revisions(repo, reverse_map, sourcerev):
"""Given a repo and an hg_editor, determines outgoing revisions for the
current working copy state.
diff --git a/hgsubversion/verify.py b/hgsubversion/verify.py
index cc9f6b6..6c6b9f8 100644
--- a/hgsubversion/verify.py
+++ b/hgsubversion/verify.py
@@ -4,6 +4,7 @@ import posixpath
from mercurial import error
from mercurial import worker
+import compathacks
import svnwrap
import svnrepo
import util
@@ -94,7 +95,7 @@ def verify(ui, repo, args=None, **opts):
w = worker.worker(repo.ui, perarg, verifydata, (), tuple(svndata))
i = 0
for _, t in w:
- ui.progress('verify', i, total=len(hgfiles))
+ compathacks.progress(ui, 'verify', i, total=len(hgfiles))
i += 1
fn, ok = t.split('\0', 2)
if not bool(ok):
@@ -110,7 +111,7 @@ def verify(ui, repo, args=None, **opts):
ui.write('missing file: %s\n' % f)
result = 1
- ui.progress('verify', None, total=len(hgfiles))
+ compathacks.progress(ui, 'verify', None, total=len(hgfiles))
else:
class VerifyEditor(svnwrap.Editor):
@@ -152,7 +153,7 @@ def verify(ui, repo, args=None, **opts):
self.props = None
self.seen += 1
- self.ui.progress('verify', self.seen, total=self.total)
+ compathacks.progress(self.ui, 'verify', self.seen, total=self.total)
def open_file(self, path, base_revnum):
raise NotImplementedError()
@@ -175,19 +176,19 @@ def verify(ui, repo, args=None, **opts):
if 'svn:executable' in self.props:
if fctx.flags() != 'x':
- self.ui.warn('wrong flags for: %s\n' % self.file)
+ self.ui.write('wrong flags for: %s\n' % self.file)
self.failed = True
elif 'svn:special' in self.props:
hgdata = 'link ' + hgdata
if fctx.flags() != 'l':
- self.ui.warn('wrong flags for: %s\n' % self.file)
+ self.ui.write('wrong flags for: %s\n' % self.file)
self.failed = True
elif fctx.flags():
- self.ui.warn('wrong flags for: %s\n' % self.file)
+ self.ui.write('wrong flags for: %s\n' % self.file)
self.failed = True
if hgdata != svndata:
- self.ui.warn('difference in: %s\n' % self.file)
+ self.ui.write('difference in: %s\n' % self.file)
diff_file(self.file, svndata)
self.failed = True
@@ -211,13 +212,13 @@ def verify(ui, repo, args=None, **opts):
raise NotImplementedError()
def check(self):
- self.ui.progress('verify', None, total=self.total)
+ compathacks.progress(self.ui, 'verify', None, total=self.total)
for f in self.unexpected:
- self.ui.warn('unexpected file: %s\n' % f)
+ self.ui.write('unexpected file: %s\n' % f)
self.failed = True
for f in self.missing:
- self.ui.warn('missing file: %s\n' % f)
+ self.ui.write('missing file: %s\n' % f)
self.failed = True
return not self.failed
diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py
index 870030c..14a0390 100644
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -27,6 +27,7 @@ except ImportError:
logcmdutil = None
from mercurial import scmutil
+import compathacks
import replay
import pushmod
import stupid as stupidmod
@@ -502,7 +503,8 @@ def pull(repo, source, heads=[], force=False, meta=None):
w = hgutil.termwidth()
bits = (r.revnum, r.author, msg)
ui.status(('[r%d] %s: %s' % bits)[:w] + '\n')
- ui.progress('pull', r.revnum - start, total=total)
+ compathacks.progress(ui, 'pull', r.revnum - start,
+ total=total)
meta.save_tbdelta(tbdelta)
close = pullfuns[have_replay](ui, meta, svn, r, tbdelta,
@@ -539,7 +541,7 @@ def pull(repo, source, heads=[], force=False, meta=None):
lock.release()
finally:
if total is not None:
- ui.progress('pull', None, total=total)
+ compathacks.progress(ui, 'pull', None, total=total)
util.swap_out_encoding(old_encoding)
if lastpulled is not None:
diff --git a/tests/test_fetch_branches.py b/tests/test_fetch_branches.py
index bd61357..f8f5aac 100644
--- a/tests/test_fetch_branches.py
+++ b/tests/test_fetch_branches.py
@@ -100,7 +100,7 @@ class TestFetchBranches(test_util.TestBase):
'unorderedbranch.svndump', 'NaN')
repo = self._load_fixture_and_fetch_with_anchor(
'unorderedbranch.svndump', '4')
- self.assertTrue('c' not in compathacks.branchset(repo))
+ self.assertTrue('c' not in set(repo.branchmap()))
def test_branches_weird_moves(self):
repo = self._load_fixture_and_fetch('renamedproject.svndump',
diff --git a/tests/test_single_dir_clone.py b/tests/test_single_dir_clone.py
index 8c2ce29..0f3ce87 100644
--- a/tests/test_single_dir_clone.py
+++ b/tests/test_single_dir_clone.py
@@ -21,7 +21,7 @@ class TestSingleDirClone(test_util.TestBase):
repo = self._load_fixture_and_fetch('branch_from_tag.svndump',
layout='single',
subdir='')
- self.assertEqual(compathacks.branchset(repo),
+ self.assertEqual(set(repo.branchmap()),
set(['default']))
self.assertEqual(sorted(repo['tip'].manifest().keys()),
['branches/branch_from_tag/alpha',
@@ -36,7 +36,7 @@ class TestSingleDirClone(test_util.TestBase):
def test_auto_detect_single(self):
repo = self._load_fixture_and_fetch('branch_from_tag.svndump',
layout='auto')
- self.assertEqual(compathacks.branchset(repo),
+ self.assertEqual(set(repo.branchmap()),
set(['default', 'branch_from_tag']))
oldmanifest = test_util.filtermanifest(revsymbol(repo, 'default').manifest().keys())
# remove standard layout
@@ -45,7 +45,7 @@ class TestSingleDirClone(test_util.TestBase):
repo = self._load_fixture_and_fetch('branch_from_tag.svndump',
layout='auto',
subdir='trunk')
- self.assertEqual(compathacks.branchset(repo), set(['default', ]))
+ self.assertEqual(set(repo.branchmap()), set(['default', ]))
self.assertEqual(revsymbol(repo, 'default').manifest().keys(), oldmanifest)
def test_clone_subdir_is_file_prefix(self):
@@ -53,7 +53,7 @@ class TestSingleDirClone(test_util.TestBase):
repo = self._load_fixture_and_fetch(FIXTURE,
layout='single',
subdir=test_util.subdir[FIXTURE])
- self.assertEqual(compathacks.branchset(repo), set(['default']))
+ self.assertEqual(set(repo.branchmap()), set(['default']))
self.assertEqual(repo['tip'].manifest().keys(), ['flaf.txt'])
def test_externals_single(self):
diff --git a/tests/test_single_dir_push.py b/tests/test_single_dir_push.py
index ea75afe..555ccbc 100644
--- a/tests/test_single_dir_push.py
+++ b/tests/test_single_dir_push.py
@@ -163,7 +163,7 @@ class TestSingleDirPush(test_util.TestBase):
self.pushrevisions()
repo = self.repo # repo is outdated after the rebase happens, refresh
self.assertTrue('foo' in test_util.svnls(repo_path, ''))
- self.assertEqual(compathacks.branchset(repo), set(['default']))
+ self.assertEqual(set(repo.branchmap()), set(['default']))
# Have to cross to another branch head, so hg.update doesn't work
commands.update(self.ui(),
self.repo,
diff --git a/tests/test_tags.py b/tests/test_tags.py
index f8ef62e..3f58709 100644
--- a/tests/test_tags.py
+++ b/tests/test_tags.py
@@ -51,7 +51,7 @@ rename a tag
def test_branch_from_tag(self):
repo = self._load_fixture_and_fetch('branch_from_tag.svndump')
- self.assert_('branch_from_tag' in compathacks.branchset(repo))
+ self.assert_('branch_from_tag' in repo.branchmap())
self.assertEqual(repo[1], revsymbol(repo, 'tag_r3'))
self.assertEqual(revsymbol(repo, 'branch_from_tag').parents()[0],
revsymbol(repo, 'copied_tag'))