Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.6, 0.7, and 0.7.1

tortoise: replace init dialog with hginit

Changeset 7d0cf16d91e6

Parent fe7a8da3311b

by TK Soh

Changes to 2 files · Browse files at 7d0cf16d91e6 Showing diff from parent fe7a8da3311b Diff from another changeset...

Change 1 of 2 Show Entire File hgproc.py Stacked
 
35
36
37
38
 
39
40
41
 
43
44
45
46
 
47
48
49
 
35
36
37
 
38
39
40
41
 
43
44
45
 
46
47
48
49
@@ -35,7 +35,7 @@
 # Map hgproc commands to dialog modules in hggtk/  from hggtk import commit, status, addremove, tagadd, tags, history, merge  from hggtk import diff, revisions, update, serve, clone, synch, hgcmd, about -from hggtk import recovery, thgconfig, datamine +from hggtk import recovery, thgconfig, datamine, hginit  _dialogs = { 'commit' : commit, 'status' : status, 'revert' : status,   'add' : addremove, 'remove' : addremove, 'tag' : tagadd,   'tags' : tags, 'log' : history, 'history': history, @@ -43,7 +43,7 @@
  'parents': revisions, 'heads' : revisions, 'update' : update,   'clone' : clone, 'serve' : serve, 'synch' : synch,   'about' : about, 'config' : thgconfig, 'recovery': recovery, - 'datamine': datamine } + 'datamine': datamine, 'init' : hginit }    def get_list_from_file(filename):   fd = open(filename, "r")
 
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
 
554
555
556
 
525
526
527
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
528
529
530
531
@@ -525,32 +525,7 @@
  open_dialog('outgoing', cmdopts, root=src, filelist=[dest])     def _init(self, parent_window): - dest = self._folder or self._filenames[0] - if os.path.isfile(dest): - dest = os.path.dirname(dest) - - msg = "Create Hg repository in %s?" % (dest) - title = "Mercurial: init" - rv = win32ui.MessageBox(msg, title, win32con.MB_OKCANCEL) - if rv == 2: - return - try: - # initialize the repo - hg.repository(ui.ui(), dest, create=1) - - # create the .hgignore file, mainly to workaround - # Explorer's problem in creating files with name - # that start with a dot. - hgignore = os.path.join(dest, '.hgignore') - if not os.path.exists(hgignore): - try: - open(hgignore, 'wb') - except: - pass - except: - msg = "Error creating repo" - win32ui.MessageBox(msg, title, - win32con.MB_OK|win32con.MB_ICONERROR) + self._run_dialog('init')     def _status(self, parent_window):   self._run_dialog('status')