Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

fogcreek commit: prompt for largefiles/kbfiles if user checks unversioned files >= 10 MB

Changeset 35ebc26ccb3a

Parent 2d9af1756f80

by David Golub

Changes to one file · Browse files at 35ebc26ccb3a Showing diff from parent 2d9af1756f80 Diff from another changeset...

 
14
15
16
17
 
18
19
20
 
712
713
714
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
715
716
717
 
14
15
16
 
17
18
19
20
 
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
@@ -14,7 +14,7 @@
 from tortoisehg.hgqt.i18n import _  from tortoisehg.hgqt.messageentry import MessageEntry  from tortoisehg.hgqt import qtlib, qscilib, status, cmdui, branchop, revpanel -from tortoisehg.hgqt import hgrcutil, mq +from tortoisehg.hgqt import hgrcutil, mq, lfprompt    from PyQt4.QtCore import *  from PyQt4.QtGui import * @@ -712,6 +712,22 @@
  (_('&Add'), _('Cancel')), 0, 1,   checkedUnknowns).run()   if res == 0: + haslf = 'largefiles' in repo.extensions() + haskbf = 'kbfiles' in repo.extensions() + if haslf or haskbf: + result = lfprompt.promptForLfiles(self, repo.ui, repo, + checkedUnknowns, haskbf) + if not result: + return + checkedUnknowns, lfiles = result + if lfiles: + if haslf: + cmd = ['add', '--repository', repo.root, '--large'] + \ + [repo.wjoin(f) for f in lfiles] + else: + cmd = ['add', '--repository', repo.root, '--bf'] + \ + [repo.wjoin(f) for f in lfiles] + commandlines.append(cmd)   cmd = ['add', '--repository', repo.root] + \   [repo.wjoin(f) for f in checkedUnknowns]   commandlines.append(cmd)