Show More
@@ -0,0 +1,26 b'' | |||||
|
1 | #!/bin/sh | |||
|
2 | ||||
|
3 | set -e | |||
|
4 | ||||
|
5 | if test x"$1" != x ; then | |||
|
6 | cd $1 | |||
|
7 | fi | |||
|
8 | ||||
|
9 | if [ ! -d ".hg" ]; then | |||
|
10 | echo "${1:-.} is not a mercurial repository" 1>&2 | |||
|
11 | echo "Aborting" 1>&2 | |||
|
12 | exit 1 | |||
|
13 | fi | |||
|
14 | if [ ! -d ".git" ]; then | |||
|
15 | mkdir -v ".git" | |||
|
16 | fi | |||
|
17 | if [ -e ".git/HEAD" ]; then | |||
|
18 | if [ ! -e ".git/HEAD.hg-viz-save" ]; then | |||
|
19 | mv -v ".git/HEAD" ".git/HEAD.hg-viz-save" | |||
|
20 | else | |||
|
21 | rm -vf ".git/HEAD" | |||
|
22 | fi | |||
|
23 | fi | |||
|
24 | hg history | head -1 | awk -F: '{print $3}' > .git/HEAD | |||
|
25 | git-viz | |||
|
26 |
@@ -38,12 +38,12 b' def difftree(args, ui, repo):' | |||||
38 |
|
38 | |||
39 | for f in c: |
|
39 | for f in c: | |
40 | # TODO get file permissions |
|
40 | # TODO get file permissions | |
41 |
print ":100664 100664 %s %s |
|
41 | print ":100664 100664 %s %s M\t%s\t%s" % (hg.hex(mmap[f]), | |
42 | hg.hex(mmap2[f]), f, f) |
|
42 | hg.hex(mmap2[f]), f, f) | |
43 | for f in a: |
|
43 | for f in a: | |
44 |
print ":000000 100664 %s %s |
|
44 | print ":000000 100664 %s %s N\t%s\t%s" % (empty, hg.hex(mmap2[f]), f, f) | |
45 | for f in d: |
|
45 | for f in d: | |
46 |
print ":100664 000000 %s %s |
|
46 | print ":100664 000000 %s %s D\t%s\t%s" % (hg.hex(mmap[f]), empty, f, f) | |
47 | ## |
|
47 | ## | |
48 |
|
48 | |||
49 | revs = [] |
|
49 | revs = [] |
General Comments 0
You need to be logged in to leave comments.
Login now