Merge branch 'cvsserver' of http://locke.catalyst.net.nz/git/git-martinlanghoff; branch 'master' into next
Conflicts: Documentation/git-cvsserver.txt git-cvsserver.perl Originally Martin's tree was based on "next", which meant that all the other things that I am not ready to push out to "master" were contained in it. His changes looked good, and I wanted to have them in "master". So, here is what I did: - fetch Martin's tree into a temporary topic branch. $ git fetch $URL $remote:ml/cvsserver $ git checkout ml/cvsserver - rebase it on top of "master". $ git rebase --onto master next - pull that master into "next", recording Martin's head as well. $ git pull --append . master Since I have apply.whitespace=strip in my configuration file, the rebased cvsserver changes have trailing whitespaces introduced by Martin's tree cleansed out. Hence the above conflicts. The reason I made this octopus is to make sure that next time Martin pulls from my "next" branch, it results in a fast forward. There is no reason to force him do the same conflict resolution I did with this merge. Signed-off-by: Junio C Hamano <junkio@cox.net>maint
commit
6ecc321ba5
|
@ -54,6 +54,30 @@ INSTALLATION
|
||||||
of branches in git).
|
of branches in git).
|
||||||
$ cvs co -d mylocaldir master
|
$ cvs co -d mylocaldir master
|
||||||
|
|
||||||
|
Eclipse CVS Client Notes
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
To get a checkout with the Eclipse CVS client:
|
||||||
|
|
||||||
|
1. Create a new project from CVS checkout, giving it repository and module
|
||||||
|
2. Context Menu->Team->Share Project...
|
||||||
|
3. Enter the repository and module information again and click Finish
|
||||||
|
4. The Synchronize view appears. Untick "launch commit wizard" to avoid
|
||||||
|
committing the .project file, and select HEAD as the tag to synchronize to.
|
||||||
|
Update all incoming changes.
|
||||||
|
|
||||||
|
Note that most versions of Eclipse ignore CVS_SERVER (which you can set in
|
||||||
|
the Preferences->Team->CVS->ExtConnection pane), so you may have to
|
||||||
|
rename, alias or symlink git-cvsserver to 'cvs' on the server.
|
||||||
|
|
||||||
|
Clients known to work
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
CVS 1.12.9 on Debian
|
||||||
|
CVS 1.11.17 on MacOSX (from Fink package)
|
||||||
|
Eclipse 3.0, 3.1.2 on MacOSX (see Eclipse CVS Client Notes)
|
||||||
|
TortoiseCVS
|
||||||
|
|
||||||
Operations supported
|
Operations supported
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
|
12
Makefile
12
Makefile
|
@ -223,11 +223,15 @@ ifeq ($(uname_S),Darwin)
|
||||||
NEEDS_SSL_WITH_CRYPTO = YesPlease
|
NEEDS_SSL_WITH_CRYPTO = YesPlease
|
||||||
NEEDS_LIBICONV = YesPlease
|
NEEDS_LIBICONV = YesPlease
|
||||||
## fink
|
## fink
|
||||||
ALL_CFLAGS += -I/sw/include
|
ifeq ($(shell test -d /sw/lib && echo y),y)
|
||||||
ALL_LDFLAGS += -L/sw/lib
|
ALL_CFLAGS += -I/sw/include
|
||||||
|
ALL_LDFLAGS += -L/sw/lib
|
||||||
|
endif
|
||||||
## darwinports
|
## darwinports
|
||||||
ALL_CFLAGS += -I/opt/local/include
|
ifeq ($(shell test -d /opt/local/lib && echo y),y)
|
||||||
ALL_LDFLAGS += -L/opt/local/lib
|
ALL_CFLAGS += -I/opt/local/include
|
||||||
|
ALL_LDFLAGS += -L/opt/local/lib
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(uname_S),SunOS)
|
ifeq ($(uname_S),SunOS)
|
||||||
NEEDS_SOCKET = YesPlease
|
NEEDS_SOCKET = YesPlease
|
||||||
|
|
|
@ -239,20 +239,23 @@ class CellRendererGraph(gtk.GenericCellRenderer):
|
||||||
box_size / 4, 0, 2 * math.pi)
|
box_size / 4, 0, 2 * math.pi)
|
||||||
|
|
||||||
|
|
||||||
|
self.set_colour(ctx, colour, 0.0, 0.5)
|
||||||
|
ctx.stroke_preserve()
|
||||||
|
|
||||||
|
self.set_colour(ctx, colour, 0.5, 1.0)
|
||||||
|
ctx.fill_preserve()
|
||||||
|
|
||||||
if (len(names) != 0):
|
if (len(names) != 0):
|
||||||
name = " "
|
name = " "
|
||||||
for item in names:
|
for item in names:
|
||||||
name = name + item + " "
|
name = name + item + " "
|
||||||
|
|
||||||
ctx.select_font_face("Monospace")
|
|
||||||
ctx.set_font_size(13)
|
ctx.set_font_size(13)
|
||||||
ctx.text_path(name)
|
if (flags & 1):
|
||||||
|
self.set_colour(ctx, colour, 0.5, 1.0)
|
||||||
self.set_colour(ctx, colour, 0.0, 0.5)
|
else:
|
||||||
ctx.stroke_preserve()
|
self.set_colour(ctx, colour, 0.0, 0.5)
|
||||||
|
ctx.show_text(name)
|
||||||
self.set_colour(ctx, colour, 0.5, 1.0)
|
|
||||||
ctx.fill()
|
|
||||||
|
|
||||||
class Commit:
|
class Commit:
|
||||||
""" This represent a commit object obtained after parsing the git-rev-list
|
""" This represent a commit object obtained after parsing the git-rev-list
|
||||||
|
@ -365,7 +368,7 @@ class DiffWindow:
|
||||||
save_menu.connect("activate", self.save_menu_response, "save")
|
save_menu.connect("activate", self.save_menu_response, "save")
|
||||||
save_menu.show()
|
save_menu.show()
|
||||||
menu_bar.append(save_menu)
|
menu_bar.append(save_menu)
|
||||||
vbox.pack_start(menu_bar, False, False, 2)
|
vbox.pack_start(menu_bar, expand=False, fill=True)
|
||||||
menu_bar.show()
|
menu_bar.show()
|
||||||
|
|
||||||
scrollwin = gtk.ScrolledWindow()
|
scrollwin = gtk.ScrolledWindow()
|
||||||
|
@ -479,19 +482,10 @@ class GitView:
|
||||||
|
|
||||||
def construct(self):
|
def construct(self):
|
||||||
"""Construct the window contents."""
|
"""Construct the window contents."""
|
||||||
|
vbox = gtk.VBox()
|
||||||
paned = gtk.VPaned()
|
paned = gtk.VPaned()
|
||||||
paned.pack1(self.construct_top(), resize=False, shrink=True)
|
paned.pack1(self.construct_top(), resize=False, shrink=True)
|
||||||
paned.pack2(self.construct_bottom(), resize=False, shrink=True)
|
paned.pack2(self.construct_bottom(), resize=False, shrink=True)
|
||||||
self.window.add(paned)
|
|
||||||
paned.show()
|
|
||||||
|
|
||||||
|
|
||||||
def construct_top(self):
|
|
||||||
"""Construct the top-half of the window."""
|
|
||||||
vbox = gtk.VBox(spacing=6)
|
|
||||||
vbox.set_border_width(12)
|
|
||||||
vbox.show()
|
|
||||||
|
|
||||||
menu_bar = gtk.MenuBar()
|
menu_bar = gtk.MenuBar()
|
||||||
menu_bar.set_pack_direction(gtk.PACK_DIRECTION_RTL)
|
menu_bar.set_pack_direction(gtk.PACK_DIRECTION_RTL)
|
||||||
help_menu = gtk.MenuItem("Help")
|
help_menu = gtk.MenuItem("Help")
|
||||||
|
@ -503,8 +497,20 @@ class GitView:
|
||||||
help_menu.set_submenu(menu)
|
help_menu.set_submenu(menu)
|
||||||
help_menu.show()
|
help_menu.show()
|
||||||
menu_bar.append(help_menu)
|
menu_bar.append(help_menu)
|
||||||
vbox.pack_start(menu_bar, False, False, 2)
|
|
||||||
menu_bar.show()
|
menu_bar.show()
|
||||||
|
vbox.pack_start(menu_bar, expand=False, fill=True)
|
||||||
|
vbox.pack_start(paned, expand=True, fill=True)
|
||||||
|
self.window.add(vbox)
|
||||||
|
paned.show()
|
||||||
|
vbox.show()
|
||||||
|
|
||||||
|
|
||||||
|
def construct_top(self):
|
||||||
|
"""Construct the top-half of the window."""
|
||||||
|
vbox = gtk.VBox(spacing=6)
|
||||||
|
vbox.set_border_width(12)
|
||||||
|
vbox.show()
|
||||||
|
|
||||||
|
|
||||||
scrollwin = gtk.ScrolledWindow()
|
scrollwin = gtk.ScrolledWindow()
|
||||||
scrollwin.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
|
scrollwin.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
|
||||||
|
@ -520,6 +526,9 @@ class GitView:
|
||||||
self.treeview.show()
|
self.treeview.show()
|
||||||
|
|
||||||
cell = CellRendererGraph()
|
cell = CellRendererGraph()
|
||||||
|
# Set the default width to 265
|
||||||
|
# This make sure that we have nice display with large tag names
|
||||||
|
cell.set_property("width", 265)
|
||||||
column = gtk.TreeViewColumn()
|
column = gtk.TreeViewColumn()
|
||||||
column.set_resizable(True)
|
column.set_resizable(True)
|
||||||
column.pack_start(cell, expand=True)
|
column.pack_start(cell, expand=True)
|
||||||
|
|
|
@ -58,6 +58,10 @@ static int should_break(struct diff_filespec *src,
|
||||||
if (!S_ISREG(src->mode) || !S_ISREG(dst->mode))
|
if (!S_ISREG(src->mode) || !S_ISREG(dst->mode))
|
||||||
return 0; /* leave symlink rename alone */
|
return 0; /* leave symlink rename alone */
|
||||||
|
|
||||||
|
if (src->sha1_valid && dst->sha1_valid &&
|
||||||
|
!memcmp(src->sha1, dst->sha1, 20))
|
||||||
|
return 0; /* they are the same */
|
||||||
|
|
||||||
if (diff_populate_filespec(src, 0) || diff_populate_filespec(dst, 0))
|
if (diff_populate_filespec(src, 0) || diff_populate_filespec(dst, 0))
|
||||||
return 0; /* error but caught downstream */
|
return 0; /* error but caught downstream */
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ my $methods = {
|
||||||
'Entry' => \&req_Entry,
|
'Entry' => \&req_Entry,
|
||||||
'Modified' => \&req_Modified,
|
'Modified' => \&req_Modified,
|
||||||
'Unchanged' => \&req_Unchanged,
|
'Unchanged' => \&req_Unchanged,
|
||||||
|
'Questionable' => \&req_Questionable,
|
||||||
'Argument' => \&req_Argument,
|
'Argument' => \&req_Argument,
|
||||||
'Argumentx' => \&req_Argument,
|
'Argumentx' => \&req_Argument,
|
||||||
'expand-modules' => \&req_expandmodules,
|
'expand-modules' => \&req_expandmodules,
|
||||||
|
@ -63,6 +64,7 @@ my $methods = {
|
||||||
'ci' => \&req_ci,
|
'ci' => \&req_ci,
|
||||||
'diff' => \&req_diff,
|
'diff' => \&req_diff,
|
||||||
'log' => \&req_log,
|
'log' => \&req_log,
|
||||||
|
'rlog' => \&req_log,
|
||||||
'tag' => \&req_CATCHALL,
|
'tag' => \&req_CATCHALL,
|
||||||
'status' => \&req_status,
|
'status' => \&req_status,
|
||||||
'admin' => \&req_CATCHALL,
|
'admin' => \&req_CATCHALL,
|
||||||
|
@ -459,6 +461,22 @@ sub req_Unchanged
|
||||||
#$log->debug("req_Unchanged : $data");
|
#$log->debug("req_Unchanged : $data");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Questionable filename \n
|
||||||
|
# Response expected: no. Additional data: no.
|
||||||
|
# Tell the server to check whether filename should be ignored,
|
||||||
|
# and if not, next time the server sends responses, send (in
|
||||||
|
# a M response) `?' followed by the directory and filename.
|
||||||
|
# filename must not contain `/'; it needs to be a file in the
|
||||||
|
# directory named by the most recent Directory request.
|
||||||
|
sub req_Questionable
|
||||||
|
{
|
||||||
|
my ( $cmd, $data ) = @_;
|
||||||
|
|
||||||
|
$state->{entries}{$state->{directory}.$data}{questionable} = 1;
|
||||||
|
|
||||||
|
#$log->debug("req_Questionable : $data");
|
||||||
|
}
|
||||||
|
|
||||||
# Argument text \n
|
# Argument text \n
|
||||||
# Response expected: no. Save argument for use in a subsequent command.
|
# Response expected: no. Save argument for use in a subsequent command.
|
||||||
# Arguments accumulate until an argument-using command is given, at which
|
# Arguments accumulate until an argument-using command is given, at which
|
||||||
|
@ -568,7 +586,7 @@ sub req_co
|
||||||
|
|
||||||
# print some information to the client
|
# print some information to the client
|
||||||
print "MT +updated\n";
|
print "MT +updated\n";
|
||||||
print "MT text U\n";
|
print "MT text U \n";
|
||||||
if ( defined ( $git->{dir} ) and $git->{dir} ne "./" )
|
if ( defined ( $git->{dir} ) and $git->{dir} ne "./" )
|
||||||
{
|
{
|
||||||
print "MT fname $checkout_path/$git->{dir}$git->{name}\n";
|
print "MT fname $checkout_path/$git->{dir}$git->{name}\n";
|
||||||
|
@ -579,9 +597,9 @@ sub req_co
|
||||||
print "MT -updated\n";
|
print "MT -updated\n";
|
||||||
|
|
||||||
# instruct client we're sending a file to put in this path
|
# instruct client we're sending a file to put in this path
|
||||||
print "Created $checkout_path/" . ( defined ( $git->{dir} ) ? $git->{dir} . "/" : "" ) . "\n";
|
print "Created $checkout_path/" . ( defined ( $git->{dir} ) and $git->{dir} ne "./" ? $git->{dir} . "/" : "" ) . "\n";
|
||||||
|
|
||||||
print $state->{CVSROOT} . "/$module/" . ( defined ( $git->{dir} ) ? $git->{dir} . "/" : "" ) . "$git->{name}\n";
|
print $state->{CVSROOT} . "/$module/" . ( defined ( $git->{dir} ) and $git->{dir} ne "./" ? $git->{dir} . "/" : "" ) . "$git->{name}\n";
|
||||||
|
|
||||||
# this is an "entries" line
|
# this is an "entries" line
|
||||||
print "/$git->{name}/1.$git->{revision}///\n";
|
print "/$git->{name}/1.$git->{revision}///\n";
|
||||||
|
@ -612,6 +630,26 @@ sub req_update
|
||||||
|
|
||||||
argsplit("update");
|
argsplit("update");
|
||||||
|
|
||||||
|
#
|
||||||
|
# It may just be a client exploring the available heads/modukles
|
||||||
|
# in that case, list them as top level directories and leave it
|
||||||
|
# at that. Eclipse uses this technique to offer you a list of
|
||||||
|
# projects (heads in this case) to checkout.
|
||||||
|
#
|
||||||
|
if ($state->{module} eq '') {
|
||||||
|
print "E cvs update: Updating .\n";
|
||||||
|
opendir HEADS, $state->{CVSROOT} . '/refs/heads';
|
||||||
|
while (my $head = readdir(HEADS)) {
|
||||||
|
if (-f $state->{CVSROOT} . '/refs/heads/' . $head) {
|
||||||
|
print "E cvs update: New directory `$head'\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir HEADS;
|
||||||
|
print "ok\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Grab a handle to the SQLite db and do any necessary updates
|
# Grab a handle to the SQLite db and do any necessary updates
|
||||||
my $updater = GITCVS::updater->new($state->{CVSROOT}, $state->{module}, $log);
|
my $updater = GITCVS::updater->new($state->{CVSROOT}, $state->{module}, $log);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue