Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.1, 1.1.1, and 1.1.2

thgpbranch: Hide menu items for internal branches

Changeset 5b5f89c6cf61

Parent bc93972daa6d

by Peer Sommerlund

Changes to one file · Browse files at 5b5f89c6cf61 Showing diff from parent bc93972daa6d Diff from another changeset...

 
468
469
470
 
 
 
 
 
 
471
472
473
 
537
538
539
540
 
 
541
542
543
 
544
545
546
 
468
469
470
471
472
473
474
475
476
477
478
479
 
543
544
545
 
546
547
548
549
 
550
551
552
553
@@ -468,6 +468,12 @@
  """ return True if pbranch extension is in use on repo """   return self.has_pbranch() and self.pgraph() != []   + def is_patch(self, branch_name): + """ return True if branch is a patch. This excludes root branches + and internal diff base branches (for patches with multiple + dependencies. """ + return self.has_pbranch() and self.pgraph().ispatch(branch_name) +   def cur_patch(self):   current_patch = self.repo.dirstate.branch()   if current_patch == 'default': @@ -537,10 +543,11 @@
    has_pbranch = self.has_pbranch()   is_current = self.has_patch() and self.cur_patch() == row[M_NAME] - is_patch = row[M_NAME] != 'default' + is_patch = self.is_patch(row[M_NAME]) + is_internal = self.pbranch.isinternal(row[M_NAME])   is_merge = len(self.repo.branchheads(row[M_NAME])) > 1   - if has_pbranch and not is_merge: + if has_pbranch and not is_merge and not is_internal:   append(_('_new'), self.pnew_activated)   if not is_current:   append(_('_goto (update workdir)'), self.goto_activated)