[PATCH 2 of 7 c-hglib] hg_read_header: better name for unexpected channels
Giovanni Gherdovich
g.gherdovich at gmail.com
Sun Nov 23 11:54:46 CST 2014
# HG changeset patch
# User Giovanni Gherdovich <g.gherdovich at gmail.com>
# Date 1416479957 -3600
# Thu Nov 20 11:39:17 2014 +0100
# Branch refactor examples
# Node ID e7ee8936e3389c091036ccc1790eb140d1cafaa1
# Parent 0dc61b8b4a873ba6174f3c56937d4ba4c960088c
hg_read_header: better name for unexpected channels
If c-hglib sees any channel name other than 'o', 'e', 'I', 'L', 'r'
it must ignore it.
This "catch-all case" was named "wrong_channel".
Since there is nothing "wrong" with an unexpected name,
it's just unsupported, this patch renames it to "unknown_channel".
diff -r 0dc61b8b4a87 -r e7ee8936e338 hglib/client.c
--- a/hglib/client.c Sat Nov 22 11:14:37 2014 +0100
+++ b/hglib/client.c Thu Nov 20 11:39:17 2014 +0100
@@ -51,7 +51,7 @@
handle->header->channel = L;
break;
default:
- handle->header->channel = wrong_channel;
+ handle->header->channel = unknown_channel;
break;
}
return handle->header;
diff -r 0dc61b8b4a87 -r e7ee8936e338 hglib/client.h
--- a/hglib/client.h Sat Nov 22 11:14:37 2014 +0100
+++ b/hglib/client.h Thu Nov 20 11:39:17 2014 +0100
@@ -15,7 +15,7 @@
r = 'r',
I = 'I',
L = 'L',
- wrong_channel
+ unknown_channel
};
/**
More information about the Mercurial-devel
mailing list