Commits

Anonymous committed 7f02223

added -map command

Comments (0)

Files changed (1)

     optFetch = opts.get('fetch', None)
     optStatus = opts.get('status', None)
     optNoRecurse = opts.get('norecurse', None)
+    optMap = opts.get('map', None)
 
     if optList:
         ui.status("listing subrepos:\n-------\n")
         doCommand(ui, repo, func, False, optNoRecurse)
         ui.status("---------------------------\n")
 
+    if optMap:
+        ui.status("mapping '%s' for all subrepos\n" % opts['map'])
+        func = lambda repoPath, remotePath: doHgTextCommand(ui, repoPath, remotePath, opts['map'])
+        doCommand(ui, repo, func, True, optNoRecurse)
+        ui.status("---------------------------\n")
+
 
 # execute a function for each subrepo with optional recloning and optional recursion
 # func is defined as func(localPath, remotePath)
           ('u', 'update', None, _('call hg update within each subrepository')),
           ('f', 'fetch', None, _('call hg fetch within each subrepository')),
           ('s', 'status', None, _('call hg status within each subrepository')),
+          ('m', 'map', "", _('call hg \"CommandArgument\" within each subrepository')),
           ('', 'norecurse', None, _('do not operate recursively within each subrepository'))
          ],
          _('hg subrepo [ACTION]'))