by
Changes to 3 files · Browse files at eeb1cd2d2538 Showing diff from parent b40200540d59 75c4dd997c9a Diff from another changeset...
@@ -14,14 +14,9 @@ # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-try:
- import pygtk
- pygtk.require("2.0")
-except:
- pass
-
+import pygtk
+pygtk.require("2.0")
import gtk
-import gtk.glade
from gtklib import MessageDialog
|
@@ -45,7 +45,15 @@ except util.Abort, inst:
sys.stderr.write(_("abort: %s\n") % inst)
return -1
- return _runcatch(u, args)
+ if '--debugger' in args:
+ pdb.set_trace()
+ try:
+ return _runcatch(u, args)
+ except:
+ if '--debugger' in args:
+ pdb.post_mortem(sys.exc_info()[2])
+ ui.print_exc()
+ raise
def get_list_from_file(filename):
try:
|
@@ -913,16 +913,15 @@
def dohgdiff():
self.diff_model.clear()
- difflines = []
- if len(files) != 0:
- wfiles = [self.repo.wjoin(x) for x in files]
- matcher = cmdutil.match(self.repo, wfiles, self.opts)
- diffopts = mdiff.diffopts(git=True, nodates=True)
- for s in patch.diff(self.repo, self._node1, self._node2,
- match=matcher, opts=diffopts):
- difflines.extend(s.splitlines(True))
+ difftext = cStringIO.StringIO()
try:
- difftext = cStringIO.StringIO(''.join(difflines))
+ if len(files) != 0:
+ wfiles = [self.repo.wjoin(x) for x in files]
+ matcher = cmdutil.match(self.repo, wfiles, self.opts)
+ diffopts = mdiff.diffopts(git=True, nodates=True)
+ for s in patch.diff(self.repo, self._node1, self._node2,
+ match=matcher, opts=diffopts):
+ difftext.writelines(s.splitlines(True))
difftext.seek(0)
self._shelve_chunks = hgshelve.parsepatch(difftext)
|
Loading...