Commits

Jens Alfke  committed b1a6e60

Automatic detection of repository changes was broken due to change in relative paths returned by DirectoryWatcher (they no longer end in "/".) Fixed.

  • Participants
  • Parent commits 80efc51

Comments (0)

Files changed (1)

File Source/HgRepository.m

 {
     NSString *path=event.relativePath;
     if( [path hasPrefix: @".hg/"] )
-        path = @".hg/";
+        path = @".hg";
     if( [_changedPaths containsObject: path] )
         return;                                     // we're already going to update this dir
     for( NSString *changedPath in _changedPaths ) {
         if( [path hasPrefix: changedPath] )
             return;                                 // ...or an ancestor of it
     }
-    LogTo(HgRepository, @"dir changed: %@", event.path);
+    LogTo(HgRepository, @"dir changed: %@ (%@)", path, event.path);
     if( _changedPaths.count==0 )
         [self performSelector: @selector(_updateChangedDirs) withObject: nil afterDelay: 0.25];
     [_changedPaths addObject: path];
     NSSet *changedPaths = _changedPaths;
     _changedPaths = [NSMutableSet set];
     
-    if( [changedPaths containsObject: @".hg/"] )
+    if( [changedPaths containsObject: @".hg"] )
         if( [self _checkRevisions] )                   // Hg metadata changed, so do a full update
             return;
 
     int curTip = tipRevision ?tipRevision.localNumber :-1;
     if( tip != curTip ) {
         // Revisions have changed!
-        LogTo(HgRepository,@"_checkRevisions: Tip changed from %i to %i ... updating revisions", curTip,tip);
+        LogTo(HgRepository,@"_checkRevisions: Tip changed from %i to %i (cur=%i) ... updating revisions", curTip,tip, curRevNo);
 
         // Run "hg log" to get all revisions of this repository:
         if (!_revisions)