Package: stgit
Version: 0.17.1-1
Severity: normal

Every now and then, it happens that I try importing a patch with two
consecutive dots in its name. Here's an example of what happens:

daenzer@kaveri|15:57:16> stg import -m 
/tmp/2-2-glamor-Add-an-assert-to-catch-the-previous-bug..patch
Checking for changes in the working directory ... done
fatal: Cannot lock the ref 
'refs/patches/master/2-2-glamor-Add-an-assert-to-catch-the-previous-bug..patch'.
Traceback (most recent call last):
  File "/usr/bin/stg", line 43, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/stgit/main.py", line 208, in main
    _main()
  File "/usr/lib/python2.7/dist-packages/stgit/main.py", line 187, in _main
    directory.write_log(cmd)
  File "/usr/lib/python2.7/dist-packages/stgit/commands/common.py", line 547, 
in write_log
    log.compat_log_entry(msg)
  File "/usr/lib/python2.7/dist-packages/stgit/lib/log.py", line 372, in 
compat_log_entry
    log_entry(stack, msg)
  File "/usr/lib/python2.7/dist-packages/stgit/lib/log.py", line 322, in 
log_entry
    new_log = LogEntry.from_stack(last_log, stack, msg)
  File "/usr/lib/python2.7/dist-packages/stgit/lib/log.py", line 179, in 
from_stack
    for pn in stack.patchorder.all),
  File "/usr/lib/python2.7/dist-packages/stgit/lib/log.py", line 179, in 
<genexpr>
    for pn in stack.patchorder.all),
  File "/usr/lib/python2.7/dist-packages/stgit/lib/stack.py", line 157, in get
    return self.__patches[name]
  File "/usr/lib/python2.7/dist-packages/stgit/lib/git.py", line 531, in 
__getitem__
    self.__objects[name] = self.__create(name)
  File "/usr/lib/python2.7/dist-packages/stgit/lib/stack.py", line 147, in 
create_patch
    p.commit # raise exception if the patch doesn't exist
  File "/usr/lib/python2.7/dist-packages/stgit/lib/stack.py", line 26, in commit
    return self.__stack.repository.refs.get(self.__ref)
  File "/usr/lib/python2.7/dist-packages/stgit/lib/git.py", line 494, in get
    return self.__repository.get_commit(self.__refs[ref])
KeyError: 
'refs/patches/master/2-2-glamor-Add-an-assert-to-catch-the-previous-bug..patch'


After that, the branch is in a bad state, with basically any stgit command
failing with a similar python traceback. I have to do some manual surgery to
get rid of the problematic patch.


-- System Information:
Debian Release: stretch/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (500, 'testing'), 
(500, 'stable'), (102, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.0+ (SMP w/4 CPU cores)
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages stgit depends on:
ii  git     1:2.1.4-2.1
ii  python  2.7.9-1

stgit recommends no packages.

stgit suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to