public static void find (File dir) {
		File[] list = dir.listFiles();
		Arrays.sort(list);
		
		for (File f : list) {
			if (f.isDirectory()) {
				if (f.getName().equals(".hg")) {
					final MercurialRepository rep = new MercurialRepository(f);
					SwingUtilities.invokeLater(new Runnable() {
						@Override
						public void run () {
							watcherFrame.addRepository(rep);
							commandLater(rep, Repository.Command.REFRESH);
						}
					});
					
					// catch repository changing events
					if (watchService != null) {
						try {
							Path p = f.toPath().toAbsolutePath();
							println("find: watch path " + p);
							p.register(watchService, StandardWatchEventKinds.ENTRY_MODIFY);
						} catch (Exception e) {
							e.printStackTrace();
						}
					}
					
					// no need to go further
					return;
					
				} else if (!f.getName().startsWith(".")) {
					find(f);
				}
			}
		}
	}