Esempio n. 1
0
 void
 init(const DirEntry & src)
 {
   name = src.name();
   kind = src.kind();
   size = src.size();
   hasProps = src.hasProps();
   createdRev = src.createdRev();
   time = src.time();
   lastAuthor = src.lastAuthor();
   lockToken = src.lockToken();
   lockOwner = src.lockOwner();
   lockComment = src.lockComment();
 }
Esempio n. 2
0
  static Status
  dirEntryToStatus(const char * path, const DirEntry & dirEntry)
  {
    Pool pool;

    svn_wc_entry_t * e =
      static_cast<svn_wc_entry_t *>(
        apr_pcalloc(pool, sizeof(svn_wc_entry_t)));

    // path in in encoded form, but for our use it has to
    // be decoded
    std::string url(Url::unescape(path));
    url += "/";
    url += dirEntry.name();

    e->name = dirEntry.name();
    e->revision = dirEntry.createdRev();
    e->url = url.c_str();
    e->kind = dirEntry.kind();
    e->schedule = svn_wc_schedule_normal;
    e->text_time = dirEntry.time();
    e->prop_time = dirEntry.time();
    e->cmt_rev = dirEntry.createdRev();
    e->cmt_date = dirEntry.time();
    e->cmt_author = dirEntry.lastAuthor();

    bool locked = !isEmpty(dirEntry.lockToken());
    if (locked)
    {
      e->lock_token = dirEntry.lockToken();
      e->lock_owner = dirEntry.lockOwner();
      e->lock_comment = dirEntry.lockComment();
    }

    svn_wc_status2_t * s =
      static_cast<svn_wc_status2_t *>(
        apr_pcalloc(pool, sizeof(svn_wc_status2_t)));
    s->entry = e;
    s->text_status = svn_wc_status_normal;
    s->prop_status = svn_wc_status_normal;
    s->locked = 0;
    s->switched = 0;
    s->repos_text_status = svn_wc_status_normal;
    s->repos_prop_status = svn_wc_status_normal;

    return Status(url.c_str(), s);
  }