'export' will use patches-<branch> by default
authorCatalin Marinas <catalin.marinas@gmail.com>
Wed, 14 Sep 2005 12:51:07 +0000 (13:51 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Wed, 14 Sep 2005 12:51:07 +0000 (13:51 +0100)
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 <catalin.marinas@gmail.com>
stgit/commands/export.py
stgit/stack.py

index 5f43da5..3e318a9 100644 (file)
@@ -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:
index 7a91b0c..5c41dd5 100644 (file)
@@ -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
         """