diff -u -r meld.orig/meldapp.py meld/meldapp.py
--- meld.orig/meldapp.py 2009-09-16 17:19:16.000000000 -0600
+++ meld/meldapp.py 2009-09-16 18:15:40.000000000 -0600
@@ -842,7 +842,10 @@
%prog
Start with VC browser in 'dir'
%prog Start with VC diff of 'file'
%prog [file] Start with 2 or 3 way file comparison
- %prog [dir] Start with 2 or 3 way directory comparison""",
+ %prog [dir] Start with 2 or 3 way directory comparison
+
+ Multiple diffs may be separated with "-".
+ """,
description="""Meld is a file and directory comparison tool.""",
version="%prog "+version)
parser.add_option("-L", "--label", action="append", default=[], help=_("Set label to use instead of file name"))
@@ -854,30 +857,42 @@
app = MeldApp()
tab = None
-
- if len(args) == 0:
- pass
-
- elif len(args) == 1:
- a = args[0]
- if os.path.isfile(a):
- doc = vcview.VcView(app.prefs)
- def cleanup():
- app.scheduler.remove_scheduler(doc.scheduler)
- app.scheduler.add_task(cleanup)
- app.scheduler.add_scheduler(doc.scheduler)
- doc.set_location( os.path.dirname(a) )
- doc.connect("create-diff", lambda obj,arg: app.append_diff(arg) )
- doc.run_diff([a])
- else:
- tab = app.append_vcview( [a] )
-
- elif len(args) in (2,3):
- tab = app.append_diff(args)
+
+ if '-' in args:
+ ##
+ ## There are multiple diffs, separated by '-'
+ argParts = []
+ working = args
+ while '-' in working:
+ argParts.append(working[:working.index('-')])
+ working = working[working.index('-')+1:]
+ argParts.append(working)
else:
- app.usage( _("Wrong number of arguments (Got %i)") % len(args))
-
- if tab:
- tab.set_labels( options.label )
+ argParts = [args]
+
+ for args in argParts:
+ if len(args) == 0:
+ pass
+ elif len(args) == 1:
+ a = args[0]
+ if os.path.isfile(a):
+ doc = vcview.VcView(app.prefs)
+ def cleanup():
+ app.scheduler.remove_scheduler(doc.scheduler)
+ app.scheduler.add_task(cleanup)
+ app.scheduler.add_scheduler(doc.scheduler)
+ doc.set_location( os.path.dirname(a) )
+ doc.connect("create-diff", lambda obj,arg: app.append_diff(arg) )
+ doc.run_diff([a])
+ else:
+ tab = app.append_vcview( [a] )
+
+ elif len(args) in (2,3):
+ tab = app.append_diff(args)
+ else:
+ app.usage( _("Wrong number of arguments (Got %i)") % len(args))
+
+ if tab:
+ tab.set_labels( options.label )
app.main()
Binary files meld.orig/meldapp.pyc and meld/meldapp.pyc differ