{"thread":{"id":"12722","subject":"stg branch -r instructions","startedAt":"2008-03-17T12:14:07Z","lastAt":"2008-03-17T13:42:38Z","messageCount":2,"participants":["David Kågedal","Karl Hasselström"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"72284","messageId":"87d4ptczu8.fsf@lysator.liu.se","threadId":"12722","inReplyTo":null,"subject":"stg branch -r instructions","fromName":"David Kågedal","fromEmail":"davidk@lysator.liu.se","sentAt":"2008-03-17T12:14:07Z","receivedAt":"2008-03-17T12:14:07Z","isPatch":false,"sender":{"key":"davidk@lysator.liu.se","avatar":"https://avatars.githubusercontent.com/u/60530?v=4"},"body":"It isn't easy to figure out how to rename a branch in stg from looking\nat the help texts.\n\n  Usage: stg branch [options] branch-name [commit-id]\n\n  ...\n\n    -r, --rename          rename an existing development branch\n\nSo, how do I rename branch A to B?\n\nReading the source, it appears that you write\n\n  stg branch -r A B\n\nso, the usage string is wrong. In fact, the described usage string is\nonly for the default action to create a new branch.\n\nThe optparse library doesn't really make it easy to describe these\nkinds of options-as-subcommands, so I don't have a patch to fix it\nright away. I'm not even sure how the result should look.\n\nMaybe it would have been better to have separate stg subcommands?\n\n  stg branch NAME [COMMIT]\n  stg list-branches\n  stg rename-branch OLD NEW\n  ... etc ...\n\n-- \nDavid Kågedal\n"},{"id":"72286","messageId":"20080317134238.GA1271@diana.vm.bytemark.co.uk","threadId":"12722","inReplyTo":"87d4ptczu8.fsf@lysator.liu.se","subject":"Re: stg branch -r instructions","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-03-17T13:42:38Z","receivedAt":"2008-03-17T13:42:38Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2008-03-17 13:14:07 +0100, David Kågedal wrote:\n\n> so, the usage string is wrong. In fact, the described usage string\n> is only for the default action to create a new branch.\n\nYes, this is far from pretty.\n\n> Maybe it would have been better to have separate stg subcommands?\n>\n>   stg branch NAME [COMMIT]\n>   stg list-branches\n>   stg rename-branch OLD NEW\n>   ... etc ...\n\nMy first thought was another level of subcommands:\n\n  stg branch NAME [COMMIT]\n  stg branch list\n  stg branch rename OLD NEW\n\nBut this would create ambiguities -- how do I create a branch called\n\"list\"?. One could go with something like\n\n  stg branch NAME [COMMIT]\n  stg branch/list\n  stg branch/rename OLD NEW\n\nbut this is highly non-standard, and would probably confuse every\nsingle new user. Perhaps with dashes instead:\n\n  stg branch NAME [COMMIT]\n  stg branch-list\n  stg branch-rename OLD NEW\n\nWhich is essentially what you proposed, but with more regular (and\nmore tab-completion-friendly) names.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"}]}