summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-07-23 20:56:19 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-07-23 20:56:19 +0000
commitd636a33af586b2f55428ca08d20c6b7095938439 (patch)
tree86de8658d557088df6d3b9659ecd374c868d3ccd /src
parentf9f79c82c8c08bc219adcdbb9b624a61b7ceb2e8 (diff)
Corrected misleading parameter name (Logs => DbList) and removed unnecessary tuple parameter extraction and reconstruction.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@967262 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_rep.erl20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl
index cb19852d..3818a448 100644
--- a/src/couchdb/couch_rep.erl
+++ b/src/couchdb/couch_rep.erl
@@ -506,32 +506,32 @@ get_rep_endpoint(_UserCtx, <<"https://",_/binary>>=Url) ->
get_rep_endpoint(UserCtx, <<DbName/binary>>) ->
{local, DbName, UserCtx}.
-find_replication_logs(Logs, RepId, {Props}, UserCtx) ->
+find_replication_logs(DbList, RepId, RepProps, UserCtx) ->
LogId = ?l2b(?LOCAL_DOC_PREFIX ++ RepId),
- fold_replication_logs(Logs, ?REP_ID_VERSION,
- LogId, LogId, {Props}, UserCtx, []).
+ fold_replication_logs(DbList, ?REP_ID_VERSION,
+ LogId, LogId, RepProps, UserCtx, []).
% Accumulate the replication logs
% Falls back to older log document ids and migrates them
-fold_replication_logs([], _Vsn, _LogId, _NewId, {_Props}, _UserCtx, Acc) ->
+fold_replication_logs([], _Vsn, _LogId, _NewId, _RepProps, _UserCtx, Acc) ->
lists:reverse(Acc);
fold_replication_logs([Db|Rest]=Dbs, Vsn, LogId, NewId,
- {Props}, UserCtx, Acc) ->
+ RepProps, UserCtx, Acc) ->
case open_replication_log(Db, LogId) of
{error, not_found} when Vsn > 1 ->
- OldRepId = make_replication_id({Props}, UserCtx, Vsn - 1),
+ OldRepId = make_replication_id(RepProps, UserCtx, Vsn - 1),
fold_replication_logs(Dbs, Vsn - 1,
- ?l2b(?LOCAL_DOC_PREFIX ++ OldRepId), NewId, {Props}, UserCtx, Acc);
+ ?l2b(?LOCAL_DOC_PREFIX ++ OldRepId), NewId, RepProps, UserCtx, Acc);
{error, not_found} ->
fold_replication_logs(Rest, ?REP_ID_VERSION, NewId, NewId,
- {Props}, UserCtx, [#doc{id=NewId}|Acc]);
+ RepProps, UserCtx, [#doc{id=NewId}|Acc]);
{ok, Doc} when LogId =:= NewId ->
fold_replication_logs(Rest, ?REP_ID_VERSION, NewId, NewId,
- {Props}, UserCtx, [Doc|Acc]);
+ RepProps, UserCtx, [Doc|Acc]);
{ok, Doc} ->
MigratedLog = #doc{id=NewId,body=Doc#doc.body},
fold_replication_logs(Rest, ?REP_ID_VERSION, NewId, NewId,
- {Props}, UserCtx, [MigratedLog|Acc])
+ RepProps, UserCtx, [MigratedLog|Acc])
end.
open_replication_log(#http_db{}=Db, DocId) ->