hgext/hgk.py
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 26 Dec 2006 03:26:23 +0100
changeset 3978 ee5663cb4406
parent 3963 ba45041827a2
child 3979 e0d13267f7a4
permissions -rw-r--r--
hgk: remove unused code, node2 is always set
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
     1
# Minimal support for git commands on an hg repository
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
     2
#
2859
345bac2bc4ec update copyrights.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2744
diff changeset
     3
# Copyright 2005, 2006 Chris Mason <mason@suse.com>
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
     4
#
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
     5
# This software may be used and distributed according to the terms
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
     6
# of the GNU General Public License, incorporated herein by reference.
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
     7
3963
ba45041827a2 remove various unused import
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3877
diff changeset
     8
import sys, os
3877
abaee83ce0a6 Replace demandload with new demandimport
Matt Mackall <mpm@selenic.com>
parents: 3800
diff changeset
     9
from mercurial import hg, fancyopts, commands, ui, util, patch, revlog
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    10
3063
aa1cee5b8afb hgk.py: add an optional file list to debug-diff-tree
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3059
diff changeset
    11
def difftree(ui, repo, node1=None, node2=None, *files, **opts):
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    12
    """diff trees from two commits"""
3063
aa1cee5b8afb hgk.py: add an optional file list to debug-diff-tree
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3059
diff changeset
    13
    def __difftree(repo, node1, node2, files=[]):
3978
ee5663cb4406 hgk: remove unused code, node2 is always set
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3963
diff changeset
    14
        assert node2 is not None
ee5663cb4406 hgk: remove unused code, node2 is always set
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3963
diff changeset
    15
        change = repo.changelog.read(node2)
ee5663cb4406 hgk: remove unused code, node2 is always set
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3963
diff changeset
    16
        mmap2 = repo.manifest.read(change[0])
ee5663cb4406 hgk: remove unused code, node2 is always set
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3963
diff changeset
    17
        status = repo.status(node1, node2, files=files)[:5]
ee5663cb4406 hgk: remove unused code, node2 is always set
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3963
diff changeset
    18
        modified, added, removed, deleted, unknown = status
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
    19
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
    20
        change = repo.changelog.read(node1)
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
    21
        mmap = repo.manifest.read(change[0])
3069
c6bfe536a1f9 hgk.py: fix for a bug introduced in 32fd512ca7c0
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3067
diff changeset
    22
        empty = hg.short(hg.nullid)
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
    23
1618
ff339dd21976 Renamed c, a, d, u to modified, added, removed, unknown for users of changes()
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1614
diff changeset
    24
        for f in modified:
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
    25
            # TODO get file permissions
3059
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
    26
            print ":100664 100664 %s %s M\t%s\t%s" % (hg.short(mmap[f]),
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
    27
                                                      hg.short(mmap2[f]),
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
    28
                                                      f, f)
1618
ff339dd21976 Renamed c, a, d, u to modified, added, removed, unknown for users of changes()
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1614
diff changeset
    29
        for f in added:
3069
c6bfe536a1f9 hgk.py: fix for a bug introduced in 32fd512ca7c0
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3067
diff changeset
    30
            print ":000000 100664 %s %s N\t%s\t%s" % (empty,
3059
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
    31
                                                      hg.short(mmap2[f]),
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
    32
                                                      f, f)
1618
ff339dd21976 Renamed c, a, d, u to modified, added, removed, unknown for users of changes()
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1614
diff changeset
    33
        for f in removed:
3059
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
    34
            print ":100664 000000 %s %s D\t%s\t%s" % (hg.short(mmap[f]),
3069
c6bfe536a1f9 hgk.py: fix for a bug introduced in 32fd512ca7c0
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3067
diff changeset
    35
                                                      empty,
3059
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
    36
                                                      f, f)
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
    37
    ##
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
    38
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    39
    while True:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    40
        if opts['stdin']:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    41
            try:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    42
                line = raw_input().split(' ')
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    43
                node1 = line[0]
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    44
                if len(line) > 1:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    45
                    node2 = line[1]
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    46
                else:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    47
                    node2 = None
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    48
            except EOFError:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    49
                break
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    50
        node1 = repo.lookup(node1)
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    51
        if node2:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    52
            node2 = repo.lookup(node2)
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    53
        else:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    54
            node2 = node1
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    55
            node1 = repo.changelog.parents(node1)[0]
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    56
        if opts['patch']:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    57
            if opts['pretty']:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    58
                catcommit(repo, node2, "")
3067
fbd3f9fd645d hgk.py: use mercurial.patch functions when possible
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3065
diff changeset
    59
            patch.diff(repo, node1, node2,
fbd3f9fd645d hgk.py: use mercurial.patch functions when possible
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3065
diff changeset
    60
                       files=files,
fbd3f9fd645d hgk.py: use mercurial.patch functions when possible
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3065
diff changeset
    61
                       opts=patch.diffopts(ui, {'git': True}))
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    62
        else:
3063
aa1cee5b8afb hgk.py: add an optional file list to debug-diff-tree
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3059
diff changeset
    63
            __difftree(repo, node1, node2, files=files)
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    64
        if not opts['stdin']:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    65
            break
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
    66
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    67
def catcommit(repo, n, prefix, changes=None):
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
    68
    nlprefix = '\n' + prefix;
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
    69
    (p1, p2) = repo.changelog.parents(n)
3059
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
    70
    (h, h1, h2) = map(hg.short, (n, p1, p2))
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
    71
    (i1, i2) = map(repo.changelog.rev, (p1, p2))
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    72
    if not changes:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    73
        changes = repo.changelog.read(n)
3059
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
    74
    print "tree %s" % (hg.short(changes[0]))
3578
3b4e00cba57a Define and use nullrev (revision of nullid) instead of -1.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3473
diff changeset
    75
    if i1 != hg.nullrev: print "parent %s" % (h1)
3b4e00cba57a Define and use nullrev (revision of nullid) instead of -1.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3473
diff changeset
    76
    if i2 != hg.nullrev: print "parent %s" % (h2)
1344
ca0e27e05de3 Fix hgk for date handling changes
mpm@selenic.com
parents: 1308
diff changeset
    77
    date_ar = changes[2]
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
    78
    date = int(float(date_ar[0]))
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    79
    lines = changes[4].splitlines()
2525
c49dc6f38a19 hgk: Don't choke on empty changelogs
Brendan Cully <brendan@kublai.com>
parents: 2432
diff changeset
    80
    if lines and lines[-1].startswith('committer:'):
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    81
        committer = lines[-1].split(': ')[1].rstrip()
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    82
    else:
1950
5f581f337b05 hgk "committer:" bug
Hollis Blanchard <hollisb@us.ibm.com>
parents: 1626
diff changeset
    83
        committer = changes[1]
1308
2073e5a71008 Cleanup of tabs and trailing spaces.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1278
diff changeset
    84
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    85
    print "author %s %s %s" % (changes[1], date, date_ar[1])
1950
5f581f337b05 hgk "committer:" bug
Hollis Blanchard <hollisb@us.ibm.com>
parents: 1626
diff changeset
    86
    print "committer %s %s %s" % (committer, date, date_ar[1])
3092
d0fcce3728d1 hgk: add revision numbers
Brendan Cully <brendan@kublai.com>
parents: 3069
diff changeset
    87
    print "revision %d" % repo.changelog.rev(n)
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    88
    print ""
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
    89
    if prefix != "":
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
    90
        print "%s%s" % (prefix, changes[4].replace('\n', nlprefix).strip())
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
    91
    else:
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
    92
        print changes[4]
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    93
    if prefix:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    94
        sys.stdout.write('\0')
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
    95
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    96
def base(ui, repo, node1, node2):
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    97
    """Output common ancestor information"""
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    98
    node1 = repo.lookup(node1)
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
    99
    node2 = repo.lookup(node2)
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   100
    n = repo.changelog.ancestor(node1, node2)
3059
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
   101
    print hg.short(n)
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   102
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   103
def catfile(ui, repo, type=None, r=None, **opts):
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   104
    """cat a specific revision"""
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   105
    # in stdin mode, every line except the commit is prefixed with two
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   106
    # spaces.  This way the our caller can find the commit without magic
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   107
    # strings
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   108
    #
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   109
    prefix = ""
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   110
    if opts['stdin']:
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   111
        try:
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   112
            (type, r) = raw_input().split(' ');
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   113
            prefix = "    "
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   114
        except EOFError:
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   115
            return
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   116
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   117
    else:
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   118
        if not type or not r:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   119
            ui.warn("cat-file: type or revision not supplied\n")
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   120
            commands.help_(ui, 'cat-file')
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   121
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   122
    while r:
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   123
        if type != "commit":
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   124
            sys.stderr.write("aborting hg cat-file only understands commits\n")
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   125
            sys.exit(1);
720
095dd8c757e0 Change hgit revision lookup to use repo.lookup
mason@suse.com
parents: 719
diff changeset
   126
        n = repo.lookup(r)
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   127
        catcommit(repo, n, prefix)
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   128
        if opts['stdin']:
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   129
            try:
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   130
                (type, r) = raw_input().split(' ');
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   131
            except EOFError:
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   132
                break
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   133
        else:
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   134
            break
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   135
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   136
# git rev-tree is a confusing thing.  You can supply a number of
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   137
# commit sha1s on the command line, and it walks the commit history
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   138
# telling you which commits are reachable from the supplied ones via
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   139
# a bitmask based on arg position.
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   140
# you can specify a commit to stop at by starting the sha1 with ^
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   141
def revtree(args, repo, full="tree", maxnr=0, parents=False):
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   142
    def chlogwalk():
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   143
        ch = repo.changelog
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   144
        count = ch.count()
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   145
        i = count
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   146
        l = [0] * 100
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   147
        chunk = 100
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   148
        while True:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   149
            if chunk > i:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   150
                chunk = i
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   151
                i = 0
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   152
            else:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   153
                i -= chunk
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   154
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   155
            for x in xrange(0, chunk):
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   156
                if i + x >= count:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   157
                    l[chunk - x:] = [0] * (chunk - x)
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   158
                    break
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   159
                if full != None:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   160
                    l[x] = ch.read(ch.node(i + x))
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   161
                else:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   162
                    l[x] = 1
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   163
            for x in xrange(chunk-1, -1, -1):
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   164
                if l[x] != 0:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   165
                    yield (i + x, full != None and l[x] or None)
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   166
            if i == 0:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   167
                break
1308
2073e5a71008 Cleanup of tabs and trailing spaces.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1278
diff changeset
   168
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   169
    # calculate and return the reachability bitmask for sha
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   170
    def is_reachable(ar, reachable, sha):
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   171
        if len(ar) == 0:
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   172
            return 1
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   173
        mask = 0
3473
0e68608bd11d use xrange instead of range
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3180
diff changeset
   174
        for i in xrange(len(ar)):
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   175
            if sha in reachable[i]:
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   176
                mask |= 1 << i
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   177
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   178
        return mask
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   179
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   180
    reachable = []
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   181
    stop_sha1 = []
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   182
    want_sha1 = []
356
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   183
    count = 0
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   184
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   185
    # figure out which commits they are asking for and which ones they
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   186
    # want us to stop on
3473
0e68608bd11d use xrange instead of range
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3180
diff changeset
   187
    for i in xrange(len(args)):
720
095dd8c757e0 Change hgit revision lookup to use repo.lookup
mason@suse.com
parents: 719
diff changeset
   188
        if args[i].startswith('^'):
095dd8c757e0 Change hgit revision lookup to use repo.lookup
mason@suse.com
parents: 719
diff changeset
   189
            s = repo.lookup(args[i][1:])
095dd8c757e0 Change hgit revision lookup to use repo.lookup
mason@suse.com
parents: 719
diff changeset
   190
            stop_sha1.append(s)
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   191
            want_sha1.append(s)
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   192
        elif args[i] != 'HEAD':
720
095dd8c757e0 Change hgit revision lookup to use repo.lookup
mason@suse.com
parents: 719
diff changeset
   193
            want_sha1.append(repo.lookup(args[i]))
356
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   194
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   195
    # calculate the graph for the supplied commits
3473
0e68608bd11d use xrange instead of range
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3180
diff changeset
   196
    for i in xrange(len(want_sha1)):
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   197
        reachable.append({});
720
095dd8c757e0 Change hgit revision lookup to use repo.lookup
mason@suse.com
parents: 719
diff changeset
   198
        n = want_sha1[i];
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   199
        visit = [n];
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   200
        reachable[i][n] = 1
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   201
        while visit:
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   202
            n = visit.pop(0)
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   203
            if n in stop_sha1:
1243
9d10f89b75a5 Fix hgit revtree bug with stop revision handling
root@coffee.suse.com
parents: 1239
diff changeset
   204
                continue
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   205
            for p in repo.changelog.parents(n):
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   206
                if p not in reachable[i]:
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   207
                    reachable[i][p] = 1
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   208
                    visit.append(p)
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   209
                if p in stop_sha1:
1243
9d10f89b75a5 Fix hgit revtree bug with stop revision handling
root@coffee.suse.com
parents: 1239
diff changeset
   210
                    continue
356
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   211
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   212
    # walk the repository looking for commits that are in our
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   213
    # reachability graph
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   214
    for i, changes in chlogwalk():
334
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   215
        n = repo.changelog.node(i)
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   216
        mask = is_reachable(want_sha1, reachable, n)
290574209284 hgit: remove tabs
mpm@selenic.com
parents: 280
diff changeset
   217
        if mask:
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   218
            parentstr = ""
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   219
            if parents:
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   220
                pp = repo.changelog.parents(n)
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   221
                if pp[0] != hg.nullid:
3059
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
   222
                    parentstr += " " + hg.short(pp[0])
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   223
                if pp[1] != hg.nullid:
3059
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
   224
                    parentstr += " " + hg.short(pp[1])
356
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   225
            if not full:
3059
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
   226
                print hg.short(n) + parentstr
3064
fe5c92529d1c hgk.py: fix warnings from pychecker
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3063
diff changeset
   227
            elif full == "commit":
3059
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
   228
                print hg.short(n) + parentstr
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   229
                catcommit(repo, n, '    ', changes)
356
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   230
            else:
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   231
                (p1, p2) = repo.changelog.parents(n)
3059
3dab573a4330 hgk: use short changeset hashes
TK Soh <teekaysoh@yahoo.com>
parents: 3012
diff changeset
   232
                (h, h1, h2) = map(hg.short, (n, p1, p2))
356
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   233
                (i1, i2) = map(repo.changelog.rev, (p1, p2))
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   234
1344
ca0e27e05de3 Fix hgk for date handling changes
mpm@selenic.com
parents: 1308
diff changeset
   235
                date = changes[2][0]
356
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   236
                print "%s %s:%s" % (date, h, mask),
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   237
                mask = is_reachable(want_sha1, reachable, p1)
3578
3b4e00cba57a Define and use nullrev (revision of nullid) instead of -1.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3473
diff changeset
   238
                if i1 != hg.nullrev and mask > 0:
356
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   239
                    print "%s:%s " % (h1, mask),
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   240
                mask = is_reachable(want_sha1, reachable, p2)
3578
3b4e00cba57a Define and use nullrev (revision of nullid) instead of -1.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3473
diff changeset
   241
                if i2 != hg.nullrev and mask > 0:
356
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   242
                    print "%s:%s " % (h2, mask),
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   243
                print ""
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   244
            if maxnr and count >= maxnr:
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   245
                break
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   246
            count += 1
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   247
3093
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   248
def revparse(ui, repo, *revs, **opts):
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   249
    """Parse given revisions"""
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   250
    def revstr(rev):
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   251
        if rev == 'HEAD':
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   252
            rev = 'tip'
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   253
        return revlog.hex(repo.lookup(rev))
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   254
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   255
    for r in revs:
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   256
        revrange = r.split(':', 1)
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   257
        ui.write('%s\n' % revstr(revrange[0]))
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   258
        if len(revrange) == 2:
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   259
            ui.write('^%s\n' % revstr(revrange[1]))
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   260
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   261
# git rev-list tries to order things by date, and has the ability to stop
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   262
# at a given commit without walking the whole repo.  TODO add the stop
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   263
# parameter
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   264
def revlist(ui, repo, *revs, **opts):
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   265
    """print revisions"""
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   266
    if opts['header']:
356
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   267
        full = "commit"
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   268
    else:
7dec9a46d82a hgit rev-list support
mpm@selenic.com
parents: 350
diff changeset
   269
        full = None
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   270
    copy = [x for x in revs]
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   271
    revtree(copy, repo, full, opts['max_count'], opts['parents'])
267
497aa6d276d2 Initial import of hgit and hgk
mpm@selenic.com
parents:
diff changeset
   272
3093
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   273
def view(ui, repo, *etc, **opts):
1278
6a0d373d3126 hgit -> hgk.py
mpm@selenic.com
parents: 1243
diff changeset
   274
    "start interactive history viewer"
6a0d373d3126 hgit -> hgk.py
mpm@selenic.com
parents: 1243
diff changeset
   275
    os.chdir(repo.root)
3180
eb0906ebba81 hgk: fix mixup of --limit and REVRANGE in hgk call
TK Soh <teekaysoh@yahoo.com>
parents: 3093
diff changeset
   276
    optstr = ' '.join(['--%s %s' % (k, v) for k, v in opts.iteritems() if v])
eb0906ebba81 hgk: fix mixup of --limit and REVRANGE in hgk call
TK Soh <teekaysoh@yahoo.com>
parents: 3093
diff changeset
   277
    cmd = ui.config("hgk", "path", "hgk") + " %s %s" % (optstr, " ".join(etc))
eb0906ebba81 hgk: fix mixup of --limit and REVRANGE in hgk call
TK Soh <teekaysoh@yahoo.com>
parents: 3093
diff changeset
   278
    ui.debug("running %s\n" % cmd)
eb0906ebba81 hgk: fix mixup of --limit and REVRANGE in hgk call
TK Soh <teekaysoh@yahoo.com>
parents: 3093
diff changeset
   279
    os.system(cmd)
1278
6a0d373d3126 hgit -> hgk.py
mpm@selenic.com
parents: 1243
diff changeset
   280
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   281
cmdtable = {
3800
792e61e9a00a hgk: show view in short command list
Matt Mackall <mpm@selenic.com>
parents: 3578
diff changeset
   282
    "^view": (view,
3093
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   283
             [('l', 'limit', '', 'limit number of changes displayed')],
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   284
             'hg view [-l LIMIT] [REVRANGE]'),
1278
6a0d373d3126 hgit -> hgk.py
mpm@selenic.com
parents: 1243
diff changeset
   285
    "debug-diff-tree": (difftree, [('p', 'patch', None, 'generate patch'),
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   286
                            ('r', 'recursive', None, 'recursive'),
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   287
                            ('P', 'pretty', None, 'pretty'),
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   288
                            ('s', 'stdin', None, 'stdin'),
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   289
                            ('C', 'copy', None, 'detect copies'),
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   290
                            ('S', 'search', "", 'search')],
3063
aa1cee5b8afb hgk.py: add an optional file list to debug-diff-tree
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3059
diff changeset
   291
                            "hg git-diff-tree [options] node1 node2 [files...]"),
1278
6a0d373d3126 hgit -> hgk.py
mpm@selenic.com
parents: 1243
diff changeset
   292
    "debug-cat-file": (catfile, [('s', 'stdin', None, 'stdin')],
6a0d373d3126 hgit -> hgk.py
mpm@selenic.com
parents: 1243
diff changeset
   293
                 "hg debug-cat-file [options] type file"),
6a0d373d3126 hgit -> hgk.py
mpm@selenic.com
parents: 1243
diff changeset
   294
    "debug-merge-base": (base, [], "hg debug-merge-base node node"),
3093
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   295
    'debug-rev-parse': (revparse,
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   296
                        [('', 'default', '', 'ignored')],
edefbb3a3b08 hgk: add --limit, and revranges
Brendan Cully <brendan@kublai.com>
parents: 3092
diff changeset
   297
                        "hg debug-rev-parse rev"),
1278
6a0d373d3126 hgit -> hgk.py
mpm@selenic.com
parents: 1243
diff changeset
   298
    "debug-rev-list": (revlist, [('H', 'header', None, 'header'),
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   299
                           ('t', 'topo-order', None, 'topo-order'),
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   300
                           ('p', 'parents', None, 'parents'),
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   301
                           ('n', 'max-count', 0, 'max-count')],
1278
6a0d373d3126 hgit -> hgk.py
mpm@selenic.com
parents: 1243
diff changeset
   302
                 "hg debug-rev-list [options] revs"),
1239
29f17e083e84 Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com
parents: 740
diff changeset
   303
}