From 8b42f5ae545d494463e72430fd81a0c0c558c881 Mon Sep 17 00:00:00 2001 From: Aneesh Kumar Date: Fri, 24 Feb 2006 14:02:32 +0530 Subject: [PATCH 1/6] gitview: Fix DeprecationWarning DeprecationWarning: integer argument expected, got float Signed-off-by: Aneesh Kumar K.V Signed-off-by: Junio C Hamano --- contrib/gitview/gitview | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/gitview/gitview b/contrib/gitview/gitview index b04df74162..4a6b44842d 100755 --- a/contrib/gitview/gitview +++ b/contrib/gitview/gitview @@ -154,7 +154,7 @@ class CellRendererGraph(gtk.GenericCellRenderer): cols = self.node[0] for start, end, colour in self.in_lines + self.out_lines: - cols = max(cols, start, end) + cols = int(max(cols, start, end)) (column, colour, names) = self.node names_len = 0 From 20d23f554d6cd40ffa0d41ccc9416bca867667e0 Mon Sep 17 00:00:00 2001 From: Aneesh Kumar Date: Fri, 24 Feb 2006 14:08:35 +0530 Subject: [PATCH 2/6] gitview: Bump the rev Make the 0.7 release Signed-off-by: Aneesh Kumar K.V Signed-off-by: Junio C Hamano --- contrib/gitview/gitview | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/gitview/gitview b/contrib/gitview/gitview index 4a6b44842d..02e2445fc6 100755 --- a/contrib/gitview/gitview +++ b/contrib/gitview/gitview @@ -422,7 +422,7 @@ class DiffWindow: class GitView: """ This is the main class """ - version = "0.6" + version = "0.7" def __init__(self, with_diff=0): self.with_diff = with_diff From 43f72af1bc754f164071140a073d35dad21d2e4e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 24 Feb 2006 16:16:10 -0800 Subject: [PATCH 3/6] Build and install git-mailinfo. The merge 712b1dd389ad5bcdbaab0279641f0970702fc1f1 was done incorrectly, and lost this program from Makefile. Big thanks go to Tony Luck for noticing it, and Linus for diagnosing it. Signed-off-by: Junio C Hamano --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e79aa96cc3..6c59cee414 100644 --- a/Makefile +++ b/Makefile @@ -153,8 +153,8 @@ PROGRAMS = \ git-convert-objects$X git-diff-files$X \ git-diff-index$X git-diff-stages$X \ git-diff-tree$X git-fetch-pack$X git-fsck-objects$X \ - git-hash-object$X git-index-pack$X git-init-db$X \ - git-local-fetch$X git-ls-files$X git-ls-tree$X git-merge-base$X \ + git-hash-object$X git-index-pack$X git-init-db$X git-local-fetch$X \ + git-ls-files$X git-ls-tree$X git-mailinfo$X git-merge-base$X \ git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \ git-peek-remote$X git-prune-packed$X git-read-tree$X \ git-receive-pack$X git-rev-list$X git-rev-parse$X \ From 1e3584053d56157549c01114f9550d1db7014a3e Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Fri, 24 Feb 2006 17:02:34 -0500 Subject: [PATCH 4/6] git ls files recursively show ignored files Make git-ls-files --others --ignored recurse into non-excluded subdirectories. Typically when asking git-ls-files to display all files which are ignored by one or more exclude patterns one would want it to recurse into subdirectories which are not themselves excluded to see if there are any excluded files contained within those subdirectories. Signed-off-by: Junio C Hamano --- ls-files.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ls-files.c b/ls-files.c index 90b289f03d..df25c8c012 100644 --- a/ls-files.c +++ b/ls-files.c @@ -279,8 +279,11 @@ static void read_directory(const char *path, const char *base, int baselen) continue; len = strlen(de->d_name); memcpy(fullname + baselen, de->d_name, len+1); - if (excluded(fullname) != show_ignored) - continue; + if (excluded(fullname) != show_ignored) { + if (!show_ignored || DTYPE(de) != DT_DIR) { + continue; + } + } switch (DTYPE(de)) { struct stat st; From 6ee9240f63f1756cf23a63aa188cfcdf255a5d55 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Fri, 24 Feb 2006 17:51:15 -0500 Subject: [PATCH 5/6] Add missing programs to ignore list Added recently added programs to the default exclude list. Signed-off-by: Junio C Hamano --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 94f66d5a1e..5be239a4aa 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ GIT-VERSION-FILE git git-add git-am +git-annotate git-apply git-applymbox git-applypatch @@ -22,6 +23,7 @@ git-convert-objects git-count-objects git-cvsexportcommit git-cvsimport +git-cvsserver git-daemon git-diff git-diff-files @@ -53,6 +55,7 @@ git-mailsplit git-merge git-merge-base git-merge-index +git-merge-tree git-merge-octopus git-merge-one-file git-merge-ours @@ -60,6 +63,7 @@ git-merge-recursive git-merge-resolve git-merge-stupid git-mktag +git-mktree git-name-rev git-mv git-pack-redundant From 9e4f522da7da8bf5f9018927c82b12e6b02b9058 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Fri, 24 Feb 2006 21:49:54 +0530 Subject: [PATCH 6/6] gitview: Code cleanup Rearrange the code little bit so that it is easier to read Signed-off-by: Aneesh Kumar K.V Signed-off-by: Junio C Hamano --- contrib/gitview/gitview | 48 ++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/contrib/gitview/gitview b/contrib/gitview/gitview index 02e2445fc6..2cde71e30d 100755 --- a/contrib/gitview/gitview +++ b/contrib/gitview/gitview @@ -870,21 +870,22 @@ class GitView: # Reset nodepostion if (last_nodepos > 5): - last_nodepos = 0 + last_nodepos = -1 # Add the incomplete lines of the last cell in this try: colour = self.colours[commit.commit_sha1] except KeyError: - last_colour +=1 - self.colours[commit.commit_sha1] = last_colour - colour = last_colour + self.colours[commit.commit_sha1] = last_colour+1 + last_colour = self.colours[commit.commit_sha1] + colour = self.colours[commit.commit_sha1] + try: node_pos = self.nodepos[commit.commit_sha1] except KeyError: - last_nodepos +=1 - self.nodepos[commit.commit_sha1] = last_nodepos - node_pos = last_nodepos + self.nodepos[commit.commit_sha1] = last_nodepos+1 + last_nodepos = self.nodepos[commit.commit_sha1] + node_pos = self.nodepos[commit.commit_sha1] #The first parent always continue on the same line try: @@ -895,32 +896,25 @@ class GitView: self.nodepos[commit.parent_sha1[0]] = node_pos for sha1 in self.incomplete_line.keys(): - if ( sha1 != commit.commit_sha1): + if (sha1 != commit.commit_sha1): self.draw_incomplete_line(sha1, node_pos, out_line, in_line, index) else: del self.incomplete_line[sha1] - in_line.append((node_pos, self.nodepos[commit.parent_sha1[0]], - self.colours[commit.parent_sha1[0]])) - - self.add_incomplete_line(commit.parent_sha1[0], index+1) - - if (len(commit.parent_sha1) > 1): - for parent_id in commit.parent_sha1[1:]: - try: - tmp_node_pos = self.nodepos[parent_id] - except KeyError: - last_colour += 1; - self.colours[parent_id] = last_colour - last_nodepos +=1 - self.nodepos[parent_id] = last_nodepos - - in_line.append((node_pos, self.nodepos[parent_id], - self.colours[parent_id])) - self.add_incomplete_line(parent_id, index+1) + for parent_id in commit.parent_sha1: + try: + tmp_node_pos = self.nodepos[parent_id] + except KeyError: + self.colours[parent_id] = last_colour+1 + last_colour = self.colours[parent_id] + self.nodepos[parent_id] = last_nodepos+1 + last_nodepos = self.nodepos[parent_id] + in_line.append((node_pos, self.nodepos[parent_id], + self.colours[parent_id])) + self.add_incomplete_line(parent_id) try: branch_tag = self.bt_sha1[commit.commit_sha1] @@ -935,7 +929,7 @@ class GitView: return (in_line, last_colour, last_nodepos) - def add_incomplete_line(self, sha1, index): + def add_incomplete_line(self, sha1): try: self.incomplete_line[sha1].append(self.nodepos[sha1]) except KeyError: