Martin Geisler avatar Martin Geisler committed 8151267

rebased to 9c4e04fe267e

Comments (0)

Files changed (1)

 # HG changeset patch
 # User Henrik Stuart <hg@hstuart.dk>
 # Date 1297282594 -3600
-# Node ID 87ff289425d4b492b2fb1c675c344b814ac57777
-# Parent  2edf41a90b9d6a52d2ded00563a408aa7d511bb0
+# Node ID 344d24772e56526f8fa256a0103065f86a73bdd7
+# Parent  9c4e04fe267eedddbfe964227948b5bc501d3027
 add support for marking changesets as dead
 
 Marking a changeset as dead is, if it is a head, a way to delete a
      e = cmdutil.commiteditor
      if opts.get('force_editor'):
          e = cmdutil.commitforceeditor
-@@ -1936,7 +1945,7 @@
+@@ -1951,7 +1960,7 @@
          start = cmdutil.revsingle(repo, opts['rev'], None).node()
  
      if opts.get('topo'):
      else:
          heads = []
          for b, ls in repo.branchmap().iteritems():
-@@ -1956,6 +1965,9 @@
+@@ -1971,6 +1980,9 @@
      if not opts.get('closed'):
          heads = [h for h in heads if not h.extra().get('close')]
  
      if opts.get('active') and branchrevs:
          dagheads = repo.heads(start)
          heads = [h for h in heads if h.node() in dagheads]
-@@ -2671,6 +2683,13 @@
+@@ -2686,6 +2698,13 @@
              return
          if opts.get('only_merges') and len(parents) != 2:
              return
          if opts.get('branch') and ctx.branch() not in opts['branch']:
              return
          if df and not df(ctx.date()[0]):
-@@ -2778,6 +2797,7 @@
+@@ -2793,6 +2812,7 @@
      if not node:
          branch = repo[None].branch()
          bheads = repo.branchheads(branch)
          if len(bheads) > 2:
              raise util.Abort(_(
                  'branch \'%s\' has %d heads - '
-@@ -2980,7 +3000,8 @@
+@@ -2995,7 +3015,8 @@
                      "so a rev cannot be specified.")
              raise util.Abort(err)
  
      bookmarks.updatefromremote(ui, repo, other)
      if checkout:
          checkout = str(repo.changelog.rev(other.lookup(checkout)))
-@@ -3060,7 +3081,8 @@
+@@ -3075,7 +3096,8 @@
      finally:
          del repo._subtoppath
      result = repo.push(other, opts.get('force'), revs=revs,
  
      result = (result == 0)
  
-@@ -4337,7 +4359,9 @@
+@@ -4352,7 +4374,9 @@
           [('a', 'active', False,
             _('show only branches that have unmerged heads')),
            ('c', 'closed', False,
           _('[-ac]')),
      "bundle":
          (bundle,
-@@ -4379,6 +4403,8 @@
+@@ -4394,6 +4418,8 @@
            ('', 'pull', None, _('use pull protocol to copy metadata')),
            ('', 'uncompressed', None,
             _('use uncompressed transfer (fast over LAN)')),
           ] + remoteopts,
           _('[OPTION]... SOURCE [DEST]')),
      "^commit|ci":
-@@ -4387,6 +4413,8 @@
+@@ -4402,6 +4428,8 @@
             _('mark new/missing files as added/removed before committing')),
            ('', 'close-branch', None,
             _('mark a branch as closed, hiding it from the branch list')),
           ] + walkopts + commitopts + commitopts2,
           _('[OPTION]... [FILE]...')),
      "copy|cp":
-@@ -4504,6 +4532,8 @@
+@@ -4525,6 +4553,8 @@
             _('show active branchheads only (DEPRECATED)')),
            ('c', 'closed', False,
             _('show normal and closed branch heads')),
           ] + templateopts,
           _('[-ac] [-r STARTREV] [REV]...')),
      "help": (help_, [], _('[TOPIC]')),
-@@ -4547,6 +4577,7 @@
+@@ -4568,6 +4598,7 @@
            ('B', 'bookmarks', False, _("compare bookmarks")),
            ('b', 'branch', [],
             _('a specific branch you would like to pull'), _('BRANCH')),
           ] + logopts + remoteopts + subrepoopts,
           _('[-p] [-n] [-M] [-f] [-r REV]...'
             ' [--bundle FILENAME] [SOURCE]')),
-@@ -4579,6 +4610,7 @@
+@@ -4600,6 +4631,7 @@
            ('r', 'rev', [],
             _('show the specified revision or range'), _('REV')),
            ('', 'removed', None, _('include revisions where files were removed')),
            ('m', 'only-merges', None, _('show only merges')),
            ('u', 'user', [],
             _('revisions committed by user'), _('USER')),
-@@ -4616,6 +4648,7 @@
+@@ -4637,6 +4669,7 @@
            ('B', 'bookmarks', False, _("compare bookmarks")),
            ('b', 'branch', [],
             _('a specific branch you would like to push'), _('BRANCH')),
           ] + logopts + remoteopts + subrepoopts,
           _('[-M] [-p] [-n] [-f] [-r REV]... [DEST]')),
      "parents":
-@@ -4636,6 +4669,7 @@
+@@ -4657,6 +4690,7 @@
            ('B', 'bookmark', [], _("bookmark to pull"), _('BOOKMARK')),
            ('b', 'branch', [],
             _('a specific branch you would like to pull'), _('BRANCH')),
           ] + remoteopts,
           _('[-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]')),
      "^push":
-@@ -4648,6 +4682,7 @@
+@@ -4669,6 +4703,7 @@
            ('b', 'branch', [],
             _('a specific branch you would like to push'), _('BRANCH')),
            ('', 'new-branch', False, _('allow pushing a new branch')),
  
      def _changegroup(self, nodes, source):
          """Compute the changegroup of all nodes that we have that a recipient
-@@ -1650,7 +1673,8 @@
+@@ -1647,7 +1670,8 @@
  
          return changegroup.unbundle10(util.chunkbuffer(gengroup()), 'UN')
  
          """Add the changegroup returned by source.read() to this repo.
          srctype is a string like 'push', 'pull', or 'unbundle'.  url is
          the URL of the repo where this changegroup is coming from.
-@@ -1874,7 +1898,7 @@
+@@ -1871,7 +1895,7 @@
          finally:
              lock.release()
  
          '''clone remote repository.
  
          keyword arguments:
-@@ -1889,7 +1913,7 @@
+@@ -1886,7 +1910,7 @@
          # and format flags on "stream" capability, and use
          # uncompressed only if compatible.
  
              # 'stream' means remote revlog format is revlogv1 only
              if remote.capable('stream'):
                  return self.stream_in(remote, set(('revlogv1',)))
-@@ -1900,7 +1924,7 @@
+@@ -1897,7 +1921,7 @@
                  # if we support it, stream in and adjust our requirements
                  if not streamreqs - self.supportedformats:
                      return self.stream_in(remote, streamreqs)
          '''Send cg (a readable file-like object representing the
          changegroup to push, typically a chunkbuffer object) to the
          remote server as a bundle. Return an integer indicating the
-@@ -176,7 +205,7 @@
+@@ -185,7 +214,7 @@
      return "".join(r)
  
  def capabilities(repo, proto):
      if _allowstream(repo.ui):
          requiredformats = repo.requirements & repo.supportedformats
          # if our local revlogs are just revlogv1, add 'stream' cap
-@@ -193,16 +222,29 @@
+@@ -202,6 +231,11 @@
      cg = repo.changegroup(nodes, 'serve')
      return streamres(proto.groupchunks(cg))
  
  def changegroupsubset(repo, proto, bases, heads):
      bases = decodelist(bases)
      heads = decodelist(heads)
-     cg = repo.changegroupsubset(bases, heads, 'serve')
-     return streamres(proto.groupchunks(cg))
+@@ -211,10 +245,18 @@
+ def debugwireargs(repo, proto, one, two):
+     return repo.debugwireargs(one, two)
  
 +def makesdead(repo, proto, heads):
 +    heads = decodelist(heads)
  def hello(repo, proto):
      '''the hello command returns a set of lines describing various
      interesting things about the server, in an RFC822-like format.
-@@ -342,12 +384,15 @@
+@@ -354,13 +396,16 @@
      'branches': (branches, 'nodes'),
      'capabilities': (capabilities, ''),
      'changegroup': (changegroup, 'roots'),
 +    'deadchangegroup': (deadchangegroup, 'roots dead'),
      'changegroupsubset': (changegroupsubset, 'bases heads'),
+     'debugwireargs': (debugwireargs, 'one two'),
      'heads': (heads, ''),
 +    'deadheads': (deadheads, 'dead'),
      'hello': (hello, ''),
 diff --git a/tests/test-debugcomplete.t b/tests/test-debugcomplete.t
 --- a/tests/test-debugcomplete.t
 +++ b/tests/test-debugcomplete.t
-@@ -181,16 +181,16 @@
+@@ -182,16 +182,16 @@
    $ hg debugcommands
    add: include, exclude, subrepos, dry-run
    annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, include, exclude
    remove: after, force, include, exclude
    serve: accesslog, daemon, daemon-pipefds, errorlog, port, address, prefix, name, web-conf, webdir-conf, pid-file, stdio, templates, style, ipv6, certificate
    status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, change, include, exclude, subrepos
-@@ -202,7 +202,7 @@
+@@ -203,7 +203,7 @@
    bisect: reset, good, bad, skip, extend, command, noupdate
    bookmarks: force, rev, delete, rename
    branch: force, clean
    bundle: force, rev, branch, base, all, type, ssh, remotecmd, insecure
    cat: output, rev, decode, include, exclude
    copy: after, force, include, exclude, dry-run
-@@ -228,14 +228,14 @@
-   debugsub: rev
+@@ -230,14 +230,14 @@
    debugwalk: include, exclude
+   debugwireargs: three, four, ssh, remotecmd, insecure
    grep: print0, all, follow, ignore-case, files-with-matches, line-number, rev, user, date, include, exclude
 -  heads: rev, topo, active, closed, style, template
 +  heads: rev, topo, active, closed, dead, style, template
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.