Martin Geisler avatar Martin Geisler committed 57079a6

rebased to 378522bdc059

Comments (0)

Files changed (1)

 # HG changeset patch
 # User Henrik Stuart <hg@hstuart.dk>
 # Date 1297282594 -3600
-# Node ID 784a70c78ef3f3754a9bb076fa6537af5a1b8a70
-# Parent  e615765fdcc79eb87e237edd5fcb40c1839b1ea7
+# Node ID 9021b90e582e1305b7ae24a4582feba56848e5e4
+# Parent  378522bdc05965cba3651f6e09d443298e07fba9
 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
-@@ -1963,7 +1972,7 @@
+@@ -2001,7 +2010,7 @@
          start = cmdutil.revsingle(repo, opts['rev'], None).node()
  
      if opts.get('topo'):
      else:
          heads = []
          for b, ls in repo.branchmap().iteritems():
-@@ -1983,6 +1992,9 @@
+@@ -2021,6 +2030,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]
-@@ -2698,6 +2710,13 @@
+@@ -2736,6 +2748,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]):
-@@ -2805,6 +2824,7 @@
+@@ -2843,6 +2862,7 @@
      if not node:
          branch = repo[None].branch()
          bheads = repo.branchheads(branch)
          if len(bheads) > 2:
              raise util.Abort(_(
                  'branch \'%s\' has %d heads - '
-@@ -3007,7 +3027,8 @@
+@@ -3045,7 +3065,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)))
-@@ -3087,7 +3108,8 @@
+@@ -3125,7 +3146,8 @@
      finally:
          del repo._subtoppath
      result = repo.push(other, opts.get('force'), revs=revs,
  
      result = (result == 0)
  
-@@ -4364,7 +4386,9 @@
+@@ -4402,7 +4424,9 @@
           [('a', 'active', False,
             _('show only branches that have unmerged heads')),
            ('c', 'closed', False,
           _('[-ac]')),
      "bundle":
          (bundle,
-@@ -4406,6 +4430,8 @@
+@@ -4444,6 +4468,8 @@
            ('', 'pull', None, _('use pull protocol to copy metadata')),
            ('', 'uncompressed', None,
             _('use uncompressed transfer (fast over LAN)')),
           ] + remoteopts,
           _('[OPTION]... SOURCE [DEST]')),
      "^commit|ci":
-@@ -4414,6 +4440,8 @@
+@@ -4452,6 +4478,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":
-@@ -4538,6 +4566,8 @@
+@@ -4581,6 +4609,8 @@
             _('show active branchheads only (DEPRECATED)')),
            ('c', 'closed', False,
             _('show normal and closed branch heads')),
           ] + templateopts,
           _('[-ac] [-r STARTREV] [REV]...')),
      "help": (help_, [], _('[TOPIC]')),
-@@ -4581,6 +4611,7 @@
+@@ -4624,6 +4654,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]')),
-@@ -4613,6 +4644,7 @@
+@@ -4656,6 +4687,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')),
-@@ -4650,6 +4682,7 @@
+@@ -4693,6 +4725,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":
-@@ -4670,6 +4703,7 @@
+@@ -4713,6 +4746,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":
-@@ -4682,6 +4716,7 @@
+@@ -4725,6 +4759,7 @@
            ('b', 'branch', [],
             _('a specific branch you would like to push'), _('BRANCH')),
            ('', 'new-branch', False, _('allow pushing a new branch')),
 +        d = self._call('deadheads', dead=str(dead))
          try:
              return decodelist(d[:-1])
-         except:
+         except ValueError:
 @@ -48,6 +48,28 @@
-         except:
+         except ValueError:
              self._abort(error.ResponseError(_("unexpected response:"), d))
  
 +    def makesdead(self, heads):
 diff --git a/tests/test-debugcomplete.t b/tests/test-debugcomplete.t
 --- a/tests/test-debugcomplete.t
 +++ b/tests/test-debugcomplete.t
-@@ -183,16 +183,16 @@
+@@ -184,16 +184,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
-@@ -204,7 +204,7 @@
+@@ -205,7 +205,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
-@@ -232,14 +232,14 @@
+@@ -234,14 +234,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
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.