Skip to contentSkip to conversation

stgit branch renaming into new dir crashes

BUG Yann Dirson 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

When trying to rename a branch to a name including a slash, there is no explicit creation of leading dirs, and stgit crashes:

$ stg branch -r multitag dev/multitag
Traceback (most recent call last):
  File "/usr/bin/stg", line 43, in ?
    main()
  File "/usr/lib/python2.3/site-packages/stgit/main.py", line 187, in main
    command.func(parser, options, args)
  File "/usr/lib/python2.3/site-packages/stgit/commands/branch.py", line 214, in func
    stack.Series(args[0]).rename(args[1])
  File "/usr/lib/python2.3/site-packages/stgit/stack.py", line 497, in rename
    os.rename(self.__series_dir, to_stack.__series_dir)
OSError: [Errno 2] No such file or directory
Signature · 4 lines
Yann Dirson    <[email protected]> |
Debian-related: <[email protected]> |   Support Debian GNU/Linux:
                                    |  Freedom, Power, Stability, Gratis
     http://ydirson.free.fr/        | Check <http://www.debian.org/>
#1 lore raw
Quoted 5 lines · Yann Dirson

When trying to rename a branch to a name including a slash, there is no explicit creation of leading dirs, and stgit crashes:

$ stg branch -r multitag dev/multitag
Traceback (most recent call last):

[...]

What version of StGIT are you using? It seems to be OK with 0.10.

Signature · 1 line
Catalin
#2 lore raw
Quoted 9 lines · Catalin Marinas
Quoted 5 lines · Yann Dirson

When trying to rename a branch to a name including a slash, there is no explicit creation of leading dirs, and stgit crashes:

$ stg branch -r multitag dev/multitag
Traceback (most recent call last):

[...]

What version of StGIT are you using? It seems to be OK with 0.10.

Right, that was with 0.9, and works perfectly with 0.10. Relying too much on /usr/bin/ ... :)

Best regards,

Signature · 4 lines
Yann Dirson    <[email protected]> |
Debian-related: <[email protected]> |   Support Debian GNU/Linux:
                                    |  Freedom, Power, Stability, Gratis
     http://ydirson.free.fr/        | Check <http://www.debian.org/>