hg site extension
 
(Arne Babenhauserheide)
2011-10-20: FIX: also add dirs to the dircache which were already online.

FIX: also add dirs to the dircache which were already online.

diff --git a/static.py b/static.py
--- a/static.py
+++ b/static.py
@@ -364,6 +364,8 @@ def upload(ui, repo, target, ftpstring):
                         _ftpdircache.add(sd)
                     except ftplib.error_perm, resp:
                         ui.warn("could not create directory ", sd, ": " , resp, "\n")
+                    else: _ftpdircache.add(sd)
+
                 for sdp in serverdirparts[1:]:
                     sdold = sd
                     sd = join(sd, sdp)
@@ -376,6 +378,8 @@ def upload(ui, repo, target, ftpstring):
                             _ftpdircache.add(sd)
                         except ftplib.error_perm, resp:
                             ui.warn("could not create directory ", sd, ": " , resp, "\n")
+                    else: _ftpdircache.add(sd)
+
 
                 if not serverfile in ftp.nlst(serverdir):
                     ui.status("uploading ", serverfile, " because it is not yet online.\n")