Changeset c405ae14d089…
Parent 41910761f1a1…
by
Changes to one file · Browse files at c405ae14d089 Showing diff from parent 41910761f1a1 Diff from another changeset...
@@ -45,6 +45,20 @@ return -1
return _runcatch(u, args)
+def get_list_from_file(filename):
+ try:
+ if filename == '-':
+ lines = [ x.replace("\n", "") for x in sys.stdin.readlines() ]
+ else:
+ fd = open(filename, "r")
+ lines = [ x.replace("\n", "") for x in fd.readlines() ]
+ fd.close()
+ os.unlink(listfile)
+ return lines
+ except IOError, e:
+ sys.stderr.write(_('can not read file "%s". Ignored.\n') % filename)
+ return []
+
def _parse(ui, args):
options = {}
cmdoptions = {}
@@ -78,6 +92,12 @@ options[n] = cmdoptions[n]
del cmdoptions[n]
+ listfile = options.get('listfile')
+ if listfile:
+ del options['listfile']
+ args += get_list_from_file(listfile)
+
+ print 'args=', args, '\noptions=', options, '\ncmdoptions=', cmdoptions ###
return (cmd, cmd and i[0] or None, args, options, cmdoptions)
def _runcatch(ui, args):
@@ -488,6 +508,7 @@ _('repository root directory or symbolic path name')),
('v', 'verbose', None, _('enable additional output')),
('h', 'help', None, _('display help and exit')),
+ ('l', 'listfile', '', _('read file list from file')),
]
table = {
|
Loading...