diff options
26 files changed, 41 insertions, 3 deletions
diff --git a/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/creator b/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/creator new file mode 100644 index 0000000..ce73549 --- /dev/null +++ b/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/creator @@ -0,0 +1 @@ +abentley diff --git a/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/name b/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/name new file mode 100644 index 0000000..d213809 --- /dev/null +++ b/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/name @@ -0,0 +1 @@ +abentley-4 diff --git a/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/severity b/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/severity new file mode 100644 index 0000000..acb503f --- /dev/null +++ b/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/severity @@ -0,0 +1 @@ +minor diff --git a/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/status b/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/status new file mode 100644 index 0000000..f510327 --- /dev/null +++ b/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/status @@ -0,0 +1 @@ +open diff --git a/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/summary b/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/summary new file mode 100644 index 0000000..1cf46cb --- /dev/null +++ b/.be/bugs/2aa60b34-2c8d-4f41-bb97-a57309523262/summary @@ -0,0 +1 @@ +implement message-change log diff --git a/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/creator b/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/creator new file mode 100644 index 0000000..ce73549 --- /dev/null +++ b/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/creator @@ -0,0 +1 @@ +abentley diff --git a/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/name b/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/name new file mode 100644 index 0000000..a39c86e --- /dev/null +++ b/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/name @@ -0,0 +1 @@ +abentley-3 diff --git a/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/severity b/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/severity new file mode 100644 index 0000000..acb503f --- /dev/null +++ b/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/severity @@ -0,0 +1 @@ +minor diff --git a/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/status b/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/status new file mode 100644 index 0000000..f510327 --- /dev/null +++ b/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/status @@ -0,0 +1 @@ +open diff --git a/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/summary b/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/summary new file mode 100644 index 0000000..4c17f24 --- /dev/null +++ b/.be/bugs/3613e6e9-db9e-4775-8914-f31f0b4b81ac/summary @@ -0,0 +1 @@ +auto-add files to revision control diff --git a/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/creator b/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/creator new file mode 100644 index 0000000..ce73549 --- /dev/null +++ b/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/creator @@ -0,0 +1 @@ +abentley diff --git a/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/name b/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/name new file mode 100644 index 0000000..d213809 --- /dev/null +++ b/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/name @@ -0,0 +1 @@ +abentley-4 diff --git a/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/severity b/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/severity new file mode 100644 index 0000000..acb503f --- /dev/null +++ b/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/severity @@ -0,0 +1 @@ +minor diff --git a/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/status b/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/status new file mode 100644 index 0000000..f510327 --- /dev/null +++ b/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/status @@ -0,0 +1 @@ +open diff --git a/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/summary b/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/summary new file mode 100644 index 0000000..2cb4148 --- /dev/null +++ b/.be/bugs/372f8a5c-a1ce-4b07-a7b1-f409033a7eec/summary @@ -0,0 +1 @@ +implement severity on bug creation diff --git a/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/creator b/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/creator new file mode 100644 index 0000000..ce73549 --- /dev/null +++ b/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/creator @@ -0,0 +1 @@ +abentley diff --git a/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/name b/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/name new file mode 100644 index 0000000..d213809 --- /dev/null +++ b/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/name @@ -0,0 +1 @@ +abentley-4 diff --git a/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/severity b/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/severity new file mode 100644 index 0000000..acb503f --- /dev/null +++ b/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/severity @@ -0,0 +1 @@ +minor diff --git a/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/status b/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/status new file mode 100644 index 0000000..f510327 --- /dev/null +++ b/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/status @@ -0,0 +1 @@ +open diff --git a/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/summary b/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/summary new file mode 100644 index 0000000..682e915 --- /dev/null +++ b/.be/bugs/73a767f4-75e7-4cde-9e24-91bff99ab428/summary @@ -0,0 +1 @@ +implement comments diff --git a/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/creator b/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/creator new file mode 100644 index 0000000..ce73549 --- /dev/null +++ b/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/creator @@ -0,0 +1 @@ +abentley diff --git a/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/name b/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/name new file mode 100644 index 0000000..d213809 --- /dev/null +++ b/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/name @@ -0,0 +1 @@ +abentley-4 diff --git a/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/severity b/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/severity new file mode 100644 index 0000000..acb503f --- /dev/null +++ b/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/severity @@ -0,0 +1 @@ +minor diff --git a/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/status b/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/status new file mode 100644 index 0000000..1ac2082 --- /dev/null +++ b/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/status @@ -0,0 +1 @@ +closed diff --git a/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/summary b/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/summary new file mode 100644 index 0000000..b3ce992 --- /dev/null +++ b/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9/summary @@ -0,0 +1 @@ +prevent collisions in different branches diff --git a/libbe/cmdutil.py b/libbe/cmdutil.py index 560c78d..2214260 100644 --- a/libbe/cmdutil.py +++ b/libbe/cmdutil.py @@ -1,15 +1,28 @@ def unique_name(bug, bugs): - return bug.name + chars = 1 + for some_bug in bugs: + if bug.uuid == some_bug.uuid: + continue + while (bug.uuid[:chars] == some_bug.uuid[:chars]): + chars+=1 + return bug.uuid[:chars] class UserError(Exception): def __init__(self, msg): Exception.__init__(self, msg) def get_bug(spec, bug_dir): + matches = [] bugs = list(bug_dir.list()) for bug in bugs: - if bug.uuid == spec: - return bug + if bug.uuid.startswith(spec): + matches.append(bug) + if len(matches) > 1: + raise UserError("More than one bug matches %s. Please be more" + " specific." % spec) + if len(matches) == 1: + return matches[0] + matches = [] for bug in bugs: if bug.name == spec: |