Revision 383339336564 () - Diff

Link to this snippet: https://friendpaste.com/6aWgbQaBjMeR9pIshWr5rl
Embed:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/src/couch_replicator/src/couch_replicator_api_wrap.erl b/src/couch_replicator/src/couch_replicator_api_wrap.erl
index 42f393e..b20ff72 100644
--- a/src/couch_replicator/src/couch_replicator_api_wrap.erl
+++ b/src/couch_replicator/src/couch_replicator_api_wrap.erl
@@ -314,7 +314,7 @@ changes_since(#httpdb{headers = Headers1} = HttpDb, Style, StartSeq,
true ->
[{"feed", "continuous"}]
end ++ [
- {"style", atom_to_list(Style)}, {"since", couch_util:to_list(StartSeq)},
+ {"style", atom_to_list(Style)}, {"since", seq_to_string(StartSeq)},
{"heartbeat", integer_to_list(HeartBeat)}
],
DocIds = get_value(doc_ids, Options),
@@ -383,6 +383,12 @@ changes_since(Db, Style, StartSeq, UserFun, Options) ->
% internal functions
+seq_to_string([Num, Bin]) when is_integer(Num), is_binary(Bin) ->
+ % BigCouch
+ integer_to_list(Num) ++ "-" ++ ?b2l(Bin);
+seq_to_string(Seq) ->
+ couch_util:to_list(Seq).
+
maybe_add_changes_filter_q_args(BaseQS, Options) ->
case get_value(filter, Options) of
undefined ->