From: Catalin Marinas Date: Wed, 14 Sep 2005 12:51:07 +0000 (+0100) Subject: 'export' will use patches- by default X-Git-Tag: v0.14.3~681 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/629ddd028508be1f40dcd0f4509decb8de2a337c 'export' will use patches- by default Previously, it was exporting to the patches directory by default but this may cause problems if multiple branches are used. Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/export.py b/stgit/commands/export.py index 5f43da5..3e318a9 100644 --- a/stgit/commands/export.py +++ b/stgit/commands/export.py @@ -63,7 +63,7 @@ options = [make_option('-n', '--numbered', def func(parser, options, args): if len(args) == 0: - dirname = 'patches' + dirname = 'patches-%s' % crt_series.get_branch() elif len(args) == 1: dirname = args[0] else: diff --git a/stgit/stack.py b/stgit/stack.py index 7a91b0c..5c41dd5 100644 --- a/stgit/stack.py +++ b/stgit/stack.py @@ -257,6 +257,11 @@ class Series: self.__unapplied_file = os.path.join(self.__patch_dir, 'unapplied') self.__current_file = os.path.join(self.__patch_dir, 'current') + def get_branch(self): + """Return the branch name for the Series object + """ + return self.__name + def __set_current(self, name): """Sets the topmost patch """