[PATCH 1 of 2] convert: allow svn trunk/branches/tags detection to be skipped
Patrick Mezard
pmezard at gmail.com
Sat Feb 23 09:50:38 CST 2008
# HG changeset patch
# User Patrick Mezard <pmezard at gmail.com>
# Date 1203781554 -3600
# Node ID 5f175562eb96d58e6e06d6327a91fe3a3b3d9a85
# Parent 55455556f92133556983cade5dd940bf1c4b624b
convert: allow svn trunk/branches/tags detection to be skipped
- eluding convert.svn.branches defaults to "branches"
- convert.svn.branches= disables branches detection
- convert.svn.branches=/ is equivalent to former convert.svn.branches=
diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py
--- a/hgext/convert/__init__.py
+++ b/hgext/convert/__init__.py
@@ -95,7 +95,8 @@
"svn://repo/path/tags" exists, it is looked for tags referencing
converted branches. Default "trunk", "branches" and "tags" values
can be overriden with following options. Set them to paths
- relative to the source URL.
+ relative to the source URL, or leave them blank to disable
+ autodetection.
--config convert.svn.branches=branches (directory name)
specify the directory containing branches
diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py
--- a/hgext/convert/subversion.py
+++ b/hgext/convert/subversion.py
@@ -236,6 +236,8 @@
def getcfgpath(name, rev):
cfgpath = self.ui.config('convert', 'svn.' + name)
+ if cfgpath is not None and cfgpath.strip() == '':
+ return None
path = (cfgpath or name).strip('/')
if not self.exists(path, rev):
if cfgpath:
@@ -342,6 +344,9 @@
def gettags(self):
tags = {}
+ if self.tags is None:
+ return tags
+
start = self.revnum(self.head)
try:
for entry in get_log(self.url, [self.tags], 0, start):
More information about the Mercurial-devel
mailing list