 # TODO add comments
 class RemoteWatcher
     constructor: (@couch, @merge, @pouch) ->
+        @pending = 0
 
     # First time replication
     #

        delete doc.name
        delete doc.binary
        delete doc.clearance
        if @merge.invalidId doc
            log.error "Invalid id"
            log.error doc

                callback err

    # Listen to the Couchdb changes feed for files and folders updates
    # TODO add integration tests
    # TODO use a view instead of a filter
    listenToChanges: (options, callback) =>
        @pouch.getRemoteSeq (err, seq) =>
            return callback err if err
