removing debug code and minor fixes

pull/40/head
Nestal Wan 2012-06-05 23:08:03 +08:00
parent cbf40e9b90
commit 8ff04683a8
2 changed files with 5 additions and 8 deletions

View File

@ -143,7 +143,7 @@ void Resource::FromRemoteFile( const Entry& remote, const DateTime& last_sync )
{
Log( "file %1% parent %2% recursively in %3% (%4%)", path,
( m_parent->m_state == remote_new || m_parent->m_state == local_new ) ? "created" : "deleted",
( m_parent->m_state == remote_new || m_parent->m_state == remote_deleted ) ? "remode" : "local",
( m_parent->m_state == remote_new || m_parent->m_state == remote_deleted ) ? "remote" : "local",
m_parent->m_state ) ;
m_state = m_parent->m_state ;
@ -156,7 +156,9 @@ void Resource::FromRemoteFile( const Entry& remote, const DateTime& last_sync )
if ( remote.MTime() > last_sync || remote.ChangeStamp() > 0 )
{
Log( "file %1% is created in remote", path, log::verbose ) ;
Log( "file %1% is created in remote (change %2%)", path,
remote.ChangeStamp(), log::verbose ) ;
m_state = remote_new ;
}
else

View File

@ -133,15 +133,10 @@ std::size_t State::TryResolveEntry()
void State::FromChange( const Entry& e )
{
// entries in the change feed is always treated as remote newer,
// entries in the change feed is always treated as newer in remote,
// so we override the last sync time to 0
if ( Resource *res = m_res.FindByHref( e.AltSelf() ) )
{
Log( "found %1% in change %2%", res->Name(), e.ChangeStamp() ) ;
m_res.Update( res, e, DateTime() ) ;
}
else
Log( "can't found %1% %2%", e.Filename(), e.SelfHref() ) ;
}
bool State::Update( const Entry& e )