2009/1/14 TK Soh <[email protected]>

> On Wed, Jan 14, 2009 at 3:45 AM, Steve Borho <[email protected]> wrote:
> >   What do you think of Qct's policy of pre-selecting files that Mercurial
> > would normally
> >   commit by default (AMR)?
>
> It should be this way. In fact all FILE specified at argv should be
> selected. It seemed strange to have to select the files again, if I
> already choose to add them via, either the explorer context menu, or
> hgtk add.
>
> I thought Peer has volunteered to work on this quite awhile back.
> Maybe I'm mistaken, Peer?


Yes, I did some work on this back in September. However, I never finished
the work so it is not in crew.

The code in crew *filters* on selected files in explorer - but does not mark
them selected in the dialog.

The state of my patch is that if files are selected, it enables all filters
(to show also clean, ignored and unknown files) and marks all files selected
in explorer.

My plan was to add a filter (similar to add/remove/clean/ignored, etc) for
selected files, before submitting the patch. When enabled, only files
selected in explorer would be shown.

Regards,
Peer
Transfer file browser selection to THG dialog

When files are selected in Windows Explorer, they should also be selected
in the THG dialogs.

diff --git a/hggtk/commit.py b/hggtk/commit.py
--- a/hggtk/commit.py
+++ b/hggtk/commit.py
@@ -330,6 +330,11 @@
         'check': False, 'git':False, 'logfile':'', 'addremove':False,
     }
     
+    if files:
+        cmdoptions['unknown'] = True
+        cmdoptions['ignored'] = True
+        cmdoptions['clean'] = True
+    
     dialog = GCommit(u, repo, cwd, files, cmdoptions, main)
     dialog.display()
     return dialog
diff --git a/hggtk/status.py b/hggtk/status.py
--- a/hggtk/status.py
+++ b/hggtk/status.py
@@ -312,6 +312,14 @@
         # If the status load failed, no reason to continue
         if not self.reload_status():
             raise util.Abort('could not load status')
+        # If we have been instructed to show only some parts of the repo
+        # we should select those parts. The next operation of the user
+        # will probably be to commit the selected files.
+        if self.pats:
+            print self.pats
+            for row in self.model:
+                row[0] = True
+            self._update_check_count()
         self.auto_check()
 
 
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to