Commits

Anonymous committed 48ba617

fixed defaultpatch usecase (was broken if a .current file was there)

Comments (0)

Files changed (1)

         self.ui = ui
         self.applied = ''
         self.appliedfile = '.applied'
-        self.currentpatch = 'default'
+        self.currentpatch = ''
         self.currentfile = '.current'
         if not os.path.isdir(self.path):
             try:
             self.applied = self.opener(self.appliedfile).read().strip()
         if os.path.exists(self.join(self.currentfile)):
             self.currentpatch = self.opener(self.currentfile).read().strip()
+        if not len(self.currentpatch):
+            self.currentpatch = 'default'
 
     def diffopts(self, opts={}):
         """proxies a call to patch.diffopts, providing the ui argument"""