Generate unique patch names
authorKarl Hasselström <kha@treskal.com>
Tue, 7 Nov 2006 19:03:48 +0000 (19:03 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Tue, 7 Nov 2006 19:03:48 +0000 (19:03 +0000)
commitb839b1cf42be33947adb87d6a2ae2164aad2371e
tree986e6d920db5be54a8d0d411b2dd941143b34b45
parentf9a2b5dae96b05071105a9b84e98bcc8942960ed
Generate unique patch names

"stg assimilate" was already making sure that automatically generated
patch names were non-empty and unique, by suffixing them with a dash
and a number if necessary. This patch moves that functionality into
the autogeneration function itself, so that all its callers can
benefit from it (and the user can benefit from uniform behavior from
all stgit commands).

As an added bonus, this permits the removal of a number of checks that
would abort with an error if the automatically generated name was
empty.

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/commands/assimilate.py
stgit/commands/common.py
stgit/commands/imprt.py
stgit/commands/pick.py
stgit/commands/uncommit.py