diff options
-rw-r--r-- | .be/bugs/f65b680b-4309-43a2-ae2d-e65811c9d107/status | 2 | ||||
-rwxr-xr-x | be | 1 | ||||
-rw-r--r-- | libbe/bugdir.py | 7 | ||||
-rw-r--r-- | libbe/cmdutil.py | 8 | ||||
-rw-r--r-- | libbe/names.py | 14 |
5 files changed, 2 insertions, 30 deletions
diff --git a/.be/bugs/f65b680b-4309-43a2-ae2d-e65811c9d107/status b/.be/bugs/f65b680b-4309-43a2-ae2d-e65811c9d107/status index f510327..1ac2082 100644 --- a/.be/bugs/f65b680b-4309-43a2-ae2d-e65811c9d107/status +++ b/.be/bugs/f65b680b-4309-43a2-ae2d-e65811c9d107/status @@ -1 +1 @@ -open +closed @@ -53,7 +53,6 @@ def new_bug(args): bugs = (dir.list()) bug = dir.new_bug() bug.creator = names.creator() - bug.name = names.friendly_name(bugs, bug.creator) bug.severity = "minor" bug.status = "open" bug.summary = args[0] diff --git a/libbe/bugdir.py b/libbe/bugdir.py index fd7b0f6..0008be8 100644 --- a/libbe/bugdir.py +++ b/libbe/bugdir.py @@ -75,13 +75,6 @@ class Bug(object): def get_path(self, file): return os.path.join(self.path, file) - def _get_name(self): - return self._get_value("name") - - def _set_name(self, value): - return self._set_value("name", value) - - name = file_property("name") summary = file_property("summary") creator = file_property("creator") target = file_property("target") diff --git a/libbe/cmdutil.py b/libbe/cmdutil.py index e7ded4f..ac67f3a 100644 --- a/libbe/cmdutil.py +++ b/libbe/cmdutil.py @@ -24,14 +24,8 @@ def get_bug(spec, bug_dir): return matches[0] matches = [] - for bug in bugs: - if bug.name == spec: - matches.append(bug) - if len(matches) > 1: - raise UserError("More than one bug has the name %s. Please use the" - " uuid." % spec) if len(matches) == 0: - raise UserError("No bug has the name %s" % spec) + raise UserError("No bug matches %s" % spec) return matches[0] def bug_summary(bug, bugs): diff --git a/libbe/names.py b/libbe/names.py index 1c54dc2..1951046 100644 --- a/libbe/names.py +++ b/libbe/names.py @@ -6,17 +6,3 @@ def uuid(): def creator(): return os.environ["LOGNAME"] - -def friendly_name(bugs, ctor): - last = 0 - for bug in bugs: - name = bug.name - if name is None: - continue - if name.startswith(ctor): - num = int(name.split("-")[-1]) - if num > last: - last = num - return "%s-%i" % (ctor, last+1) - - |