Mercurial > hg
changeset 6172:0cd6846e5200
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=
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 24 Feb 2008 17:58:53 +0100 |
parents | 73b1de288801 |
children | 963000ed8cac |
files | hgext/convert/__init__.py hgext/convert/subversion.py tests/test-convert.out |
diffstat | 3 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/__init__.py Thu Feb 21 08:24:58 2008 -0500 +++ b/hgext/convert/__init__.py Sun Feb 24 17:58:53 2008 +0100 @@ -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
--- a/hgext/convert/subversion.py Thu Feb 21 08:24:58 2008 -0500 +++ b/hgext/convert/subversion.py Sun Feb 24 17:58:53 2008 +0100 @@ -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):
--- a/tests/test-convert.out Thu Feb 21 08:24:58 2008 -0500 +++ b/tests/test-convert.out Sun Feb 24 17:58:53 2008 +0100 @@ -84,7 +84,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