summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2011-08-02 10:11:04 +0200
committerSebastian Pipping <sebastian@pipping.org>2011-08-02 10:11:04 +0200
commitf92b63f4fa81a6e4cc74b68cd8c7be9943ef84a3 (patch)
tree5fbc9f74309d49dc179f081df55b3ee9e6c9c32f /layman/dbtools/gitoliteparser.py
parentAct on last line (description) of a repo block, not first line (repo declarat... (diff)
downloadrepositories-xml-format-f92b63f4fa81a6e4cc74b68cd8c7be9943ef84a3.tar.gz
repositories-xml-format-f92b63f4fa81a6e4cc74b68cd8c7be9943ef84a3.tar.bz2
repositories-xml-format-f92b63f4fa81a6e4cc74b68cd8c7be9943ef84a3.zip
Improve handling of description extraction, add warnings on mismatch
Diffstat (limited to 'layman/dbtools/gitoliteparser.py')
-rw-r--r--layman/dbtools/gitoliteparser.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/layman/dbtools/gitoliteparser.py b/layman/dbtools/gitoliteparser.py
index 141088a..19baf73 100644
--- a/layman/dbtools/gitoliteparser.py
+++ b/layman/dbtools/gitoliteparser.py
@@ -66,9 +66,11 @@ class RepoDatabase:
elif matcher is _desc_line:
desc_repo = m.group(1)
+ if repo != desc_repo:
+ print('WARNING: Looks like description of repo "%s" mentions repo "%s", by mistake' % (repo, desc_repo))
desc_contact = m.group(2)
desc_desc = m.group(3)
- desc_map[desc_repo] = (desc_contact, desc_desc)
+ desc_map[repo] = (desc_contact, desc_desc)
self._add(repo, terms_status, is_overlay, dont_add_reason)
terms_status = None