by
Changes to 4 files · Browse files at 11dc712a7517 Showing diff from parent 3e9fa875c486 6f33ec32e601 Diff from another changeset...
@@ -9,6 +9,7 @@ import pango
import Queue
import threading
+import re
from mercurial import util
@@ -333,6 +334,13 @@ _('You must provide a search expression'), self).run()
regexp.grab_focus()
return
+ try:
+ re.compile(retext)
+ except re.error, e:
+ gdialog.Prompt(_('Invalid regular expression'),
+ _('Error: %s') % str(e), self).run()
+ regexp.grab_focus()
+ return
q = Queue.Queue()
args = [self.repo.root, q, 'grep']
@@ -347,7 +355,14 @@ for x in excs:
if x: args.extend(['-X', x])
args.append(retext)
- thread = thread2.Thread(target=hgcmd_toq, args=args)
+
+ def threadfunc(path, q, *args):
+ try:
+ hgcmd_toq(path, q, *args)
+ except util.Abort, e:
+ self.stbar.set_status_text(_('Abort: %s') % str(e))
+
+ thread = thread2.Thread(target=threadfunc, args=args)
thread.start()
frame._mythread = thread
self.stop_button.set_sensitive(True)
|
@@ -137,6 +137,7 @@
def commit(self, button):
dlg = commit.run(ui.ui())
+ dlg.set_transient_for(self)
dlg.set_modal(True)
dlg.set_notify_func(self.commit_notify, dlg)
dlg.display()
|
@@ -625,7 +625,13 @@ self.stop_button.set_sensitive(False)
if self.hgthread.return_code() is None:
self.write_err(_('[command interrupted]'))
- if self.notify_func and self.lastcmd[0] == 'pull':
+ if not self.notify_func or self.lastcmd[0] != 'pull':
+ return False
+ if ' '.join(self.lastcmd[:2]) == 'pull --rebase':
+ # disable notification; rebase can be poisonous
+ self.notify_func = None
+ self.notify_args = None
+ else:
self.notify_func(self.notify_args)
return False # Stop polling this function
|
@@ -83,6 +83,12 @@ {"vdiff", "Visual Diff",
"View changes using GUI diff tool",
"TortoiseMerge.ico", 0},
+ {"hgignore", "Edit Ignore Filter",
+ "Edit repository ignore filter",
+ "ignore.ico", 0},
+ {"guess", "Guess Renames",
+ "Detect renames and copies",
+ "detect_rename.ico", 0},
/* Add new items here */
@@ -95,7 +101,7 @@{
Commit, Init, Clone, Status, Shelve, Add, Revert, Remove, Rename,
Log, Synch, Serve, Update, Recover, Thgstatus, Userconf, Repoconf,
- About, Datamine, VDiff,
+ About, Datamine, VDiff, Ignore, Guess,
/* Add new items here */
Separator, EndOfList
};
@@ -103,9 +109,9 @@menuDescListEntries RepoNoFilesMenu[] =
{
Commit, Status, Shelve, VDiff, Separator,
- Log, Separator,
- Update, Separator,
- Synch, Clone, Recover, Serve, Thgstatus, Separator,
+ Log, Update, Datamine, Thgstatus, Separator,
+ Synch, Serve, Clone, Init, Separator,
+ Ignore, Guess, Recover, Separator,
Repoconf, Userconf, Separator,
About, EndOfList
};
|
Loading...