anchor.diff:              Url ++ "/"
       end.
   
  -
  -get_checkpoint_log_id(#db{name = DbName0}, LogId0) ->
  -    get_checkpoint_log_id(?b2l(DbName0), LogId0);
  -get_checkpoint_log_id(#httpdb{url = DbUrl0}, LogId0) ->
  -    [_, _, DbName0] = string:tokens(DbUrl0, "/"),
  -    get_checkpoint_log_id(couch_httpd:unquote(DbName0), LogId0);
  -get_checkpoint_log_id(DbName0, LogId0) ->
  -    {DbName, _UUID} = split_uuid(DbName0),
  -    {_, VBucket} = split_dbname(DbName),
  -    ?l2b([?LOCAL_DOC_PREFIX, integer_to_list(VBucket), "-", LogId0]).
  -
  -get_master_db(#db{name = DbName}) ->
  -    ?l2b(get_master_db(?b2l(DbName)));
  -get_master_db(#httpdb{url=DbUrl0}=Http) ->
  -    [Scheme, Host, DbName0] = string:tokens(DbUrl0, "/"),
  -    DbName = get_master_db(couch_httpd:unquote(DbName0)),
  -
  -    DbUrl = Scheme ++ "//" ++ Host ++ "/" ++ couch_httpd:quote(DbName) ++ "/",
  -    Http#httpdb{url = DbUrl};
  -get_master_db(DbName0) ->
  -    {DbName, UUID} = split_uuid(DbName0),
  -    {Bucket, _} = split_dbname(DbName),
  -    MasterDbName = Bucket ++ "/master",
  -    unsplit_uuid({MasterDbName, UUID}).
  -
   split_bucket_name_out_of_target_url(Url) ->
       [Scheme, Host, DbName0] = string:tokens(couch_util:to_list(Url), "/"),
       DbName = couch_httpd:unquote(DbName0),
       {RawDbName, UUID} = split_uuid(DbName),
       [BucketName, VBString] = string:tokens(RawDbName, "/"),
       {Scheme ++ "//" ++ Host ++ "/", BucketName, UUID, VBString}.
  -
  -split_dbname(DbName) ->
  -    %% couchbase does not support slashes in bucket names; thus we can have only
  -    %% two items in this list
  -    [BucketName, VBucketStr] = string:tokens(DbName, [$/]),
  -    {BucketName, list_to_integer(VBucketStr)}.
   
   split_uuid(DbName) ->
       case string:tokens(DbName, [$;]) of
  
positive.code:         _ ->
              {DbName, undefined}
      end.
  
  unsplit_uuid({DbName, undefined}) ->
      DbName;
  unsplit_uuid({DbName, UUID}) ->
      DbName ++ ";" ++ UUID.
  
  sanitize_url(Url) when is_binary(Url) ->
      ?l2b(sanitize_url(?b2l(Url)));
  
negative.code: %% locally access it.
  local_couch_uri_for_vbucket(BucketName, VbucketId) ->
      iolist_to_binary([BucketName, $/, integer_to_list(VbucketId)]).
  
  %% Given a bucket config, this function computes a list of active vbuckets
  %% currently owned by the executing node.
  