1. David Jade
  2. hgsubrepo


davidjade  committed 7f02223

added -map command

  • Participants
  • Parent commits a33f606
  • Branches default

Comments (0)

Files changed (1)

File subrepo.py

View file
     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)
+    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]'))