Commits

Martin Geisler  committed 4a80428

rebased to 63307feb59dd

  • Participants
  • Parent commits a4c5fda

Comments (0)

Files changed (1)

File implementation

 # HG changeset patch
 # User Henrik Stuart <hg@hstuart.dk>
 # Date 1297282594 -3600
-# Node ID ea71e2d279a2d31f852fb2aa8b00485c81d0a08d
-# Parent  a56c1b2bff1806aa0ce2495ad56bd2301908b521
+# Node ID 03d485eadae7d57f416a55a4816f461b11134f31
+# Parent  63307feb59dd039e42a0961781bd6a116b746e55
 add support for marking changesets as dead
 
 Marking a changeset as dead is, if it is a head, a way to delete a
 diff --git a/mercurial/commands.py b/mercurial/commands.py
 --- a/mercurial/commands.py
 +++ b/mercurial/commands.py
-@@ -605,7 +605,7 @@
+@@ -609,7 +609,7 @@
      else:
          ui.write("%s\n" % repo.dirstate.branch())
  
      """list repository named branches
  
      List the repository's named branches, indicating which ones are
-@@ -625,7 +625,8 @@
+@@ -629,7 +629,8 @@
      def testactive(tag, node):
          realhead = tag in activebranches
          open = node in repo.branchheads(tag, closed=False)
      branches = sorted([(testactive(tag, node), repo.changelog.rev(node), tag)
                            for tag, node in repo.branchtags().items()],
                        reverse=True)
-@@ -644,6 +645,10 @@
+@@ -648,6 +649,10 @@
                          continue
                      label = 'branches.closed'
                      notice = _(' (closed)')
                  else:
                      label = 'branches.inactive'
                      notice = _(' (inactive)')
-@@ -840,11 +845,11 @@
+@@ -844,11 +849,11 @@
          raise util.Abort(_("cannot specify both --noupdate and --updaterev"))
  
      r = hg.clone(hg.remoteui(ui, opts), source, dest,
  
      return r is None
  
-@@ -877,6 +882,10 @@
+@@ -881,6 +886,10 @@
              # current branch, so it's sufficient to test branchheads
              raise util.Abort(_('can only close branch heads'))
          extra['close'] = 1
      e = cmdutil.commiteditor
      if opts.get('force_editor'):
          e = cmdutil.commitforceeditor
-@@ -1932,7 +1941,7 @@
+@@ -1936,7 +1945,7 @@
          start = cmdutil.revsingle(repo, opts['rev'], None).node()
  
      if opts.get('topo'):
      else:
          heads = []
          for b, ls in repo.branchmap().iteritems():
-@@ -1952,6 +1961,9 @@
+@@ -1956,6 +1965,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]
-@@ -2667,6 +2679,13 @@
+@@ -2671,6 +2683,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]):
-@@ -2774,6 +2793,7 @@
+@@ -2778,6 +2797,7 @@
      if not node:
          branch = repo[None].branch()
          bheads = repo.branchheads(branch)
          if len(bheads) > 2:
              raise util.Abort(_(
                  'branch \'%s\' has %d heads - '
-@@ -2976,7 +2996,8 @@
+@@ -2980,7 +3000,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)))
-@@ -3056,7 +3077,8 @@
+@@ -3060,7 +3081,8 @@
      finally:
          del repo._subtoppath
      result = repo.push(other, opts.get('force'), revs=revs,
  
      result = (result == 0)
  
-@@ -4332,7 +4354,9 @@
+@@ -4337,7 +4359,9 @@
           [('a', 'active', False,
             _('show only branches that have unmerged heads')),
            ('c', 'closed', False,
           _('[-ac]')),
      "bundle":
          (bundle,
-@@ -4374,6 +4398,8 @@
+@@ -4379,6 +4403,8 @@
            ('', 'pull', None, _('use pull protocol to copy metadata')),
            ('', 'uncompressed', None,
             _('use uncompressed transfer (fast over LAN)')),
           ] + remoteopts,
           _('[OPTION]... SOURCE [DEST]')),
      "^commit|ci":
-@@ -4382,6 +4408,8 @@
+@@ -4387,6 +4413,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":
-@@ -4499,6 +4527,8 @@
+@@ -4504,6 +4532,8 @@
             _('show active branchheads only (DEPRECATED)')),
            ('c', 'closed', False,
             _('show normal and closed branch heads')),
           ] + templateopts,
           _('[-ac] [-r STARTREV] [REV]...')),
      "help": (help_, [], _('[TOPIC]')),
-@@ -4542,6 +4572,7 @@
+@@ -4547,6 +4577,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]')),
-@@ -4574,6 +4605,7 @@
+@@ -4579,6 +4610,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')),
-@@ -4611,6 +4643,7 @@
+@@ -4616,6 +4648,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":
-@@ -4631,6 +4664,7 @@
+@@ -4636,6 +4669,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":
-@@ -4643,6 +4677,7 @@
+@@ -4648,6 +4682,7 @@
            ('b', 'branch', [],
             _('a specific branch you would like to push'), _('BRANCH')),
            ('', 'new-branch', False, _('allow pushing a new branch')),
          ui.status(_("no changes found\n"))
          return subreporecurse()
 @@ -493,7 +494,8 @@
+         revs = [repo.lookup(rev) for rev in revs]
  
      other = repository(remoteui(repo, opts), dest)
-     ui.status(_('comparing with %s\n') % url.hidepassword(dest))
 -    o = discovery.findoutgoing(repo, other, force=opts.get('force'))
 +    o = discovery.findoutgoing(repo, other, force=opts.get('force'),
 +            dead=opts.get('dead'), revs=revs)
          """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.
-@@ -1964,7 +1988,7 @@
+@@ -1960,7 +1984,7 @@
          finally:
              lock.release()
  
          '''clone remote repository.
  
          keyword arguments:
-@@ -1979,7 +2003,7 @@
+@@ -1975,7 +1999,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',)))
-@@ -1990,7 +2014,7 @@
+@@ -1986,7 +2010,7 @@
                  # if we support it, stream in and adjust our requirements
                  if not streamreqs - self.supportedformats:
                      return self.stream_in(remote, streamreqs)
  def descendants(repo, subset, x):
      """``descendants(set)``
      Changesets which are descendants of changesets in set.
-@@ -710,6 +732,7 @@
+@@ -708,6 +730,7 @@
      "closed": closed,
      "contains": contains,
      "date": date,