summaryrefslogtreecommitdiff
path: root/helpers.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-09-06 01:45:23 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-09-06 01:45:23 +0200
commit0bb3501e981f403ab6584210d45e8ff0504982e0 (patch)
treee656bddc50538736cb766f968d7d68e5ad95d7e2 /helpers.py
parentc60068bd0035e829a1e11a55d9bd6fe2cde65a32 (diff)
downloadbzr-fastimport-0bb3501e981f403ab6584210d45e8ff0504982e0.tar.gz
Remove processors, now in python-fastimport.
Diffstat (limited to 'helpers.py')
-rw-r--r--helpers.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/helpers.py b/helpers.py
index 97ab6b3..df6cc79 100644
--- a/helpers.py
+++ b/helpers.py
@@ -16,39 +16,6 @@
"""Miscellaneous useful stuff."""
-from fastimport.helpers import (
- common_path,
- )
-
-
-def common_directory(paths):
- """Find the deepest common directory of a list of paths.
-
- :return: if no paths are provided, None is returned;
- if there is no common directory, '' is returned;
- otherwise the common directory with a trailing / is returned.
- """
- from bzrlib import osutils
- def get_dir_with_slash(path):
- if path == '' or path.endswith('/'):
- return path
- else:
- dirname, basename = osutils.split(path)
- if dirname == '':
- return dirname
- else:
- return dirname + '/'
-
- if not paths:
- return None
- elif len(paths) == 1:
- return get_dir_with_slash(paths[0])
- else:
- common = common_path(paths[0], paths[1])
- for path in paths[2:]:
- common = common_path(common, path)
- return get_dir_with_slash(common)
-
def escape_commit_message(message):
"""Replace xml-incompatible control characters."""