hg site extension
 
(Arne Babenhauserheide)
2011-11-23: bug change: we can only check contents, not incoming. We don’t know

bug change: we can only check contents, not incoming. We don’t know how much changed and we can’t be sure that there will be a HTTP source.

diff --git a/.bugs/bugs b/.bugs/bugs
--- a/.bugs/bugs
+++ b/.bugs/bugs
@@ -4,7 +4,7 @@ Add a list of branches, heads and tags t
 if b is used: a bugtracker: issue/<id>/<name>                                                                                              | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:1d631d51ff06b3bdca50e21da3d6a00bcb801c85, time:1319147632.52
 get mtimes from the repo instead of querying the FTP server. We know which files were changed.                                             | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:29210503551d0eafca67dda8d6fffbd40bf837dc, time:1319213074.57
 FIX: revision 0 is omitted: change that :)                                                                                                 | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:29396f1753e45b5a37ffa0ce04d96c876d6b6722, time:1319209563.68
-only write .statichgrepo print.css style.css and index.html when there are changes in the repo \(or \-\-force\).                           | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:4f02149269a60fca85aa040116b2789d98c906f2, time:1319212903.98
+only write .statichgrepo print.css style.css and index.html when their data changed \(or \-\-force\) → read them and compare the contents. | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:4f02149269a60fca85aa040116b2789d98c906f2, time:1319212903.98
 add proper caching of every ftp directory listing.                                                                                         | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:750692931106d78ffc38c1ed63013c4dac4099dd, time:1319175393.07
 fork-/clone-info for each entry in [paths] with its incoming data (if it has some):                                                        | owner:, open:True, id:8621575e4016752e8987c8b294dfa9166f77eff3, time:1319147671.39
 More complex Readme parsing.                                                                                                               | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:94fbade896adbf6f696cfdb331021437dff3f30e, time:1319147671.39
diff --git a/.bugs/details/4f02149269a60fca85aa040116b2789d98c906f2.txt b/.bugs/details/4f02149269a60fca85aa040116b2789d98c906f2.txt
new file mode 100644
--- /dev/null
+++ b/.bugs/details/4f02149269a60fca85aa040116b2789d98c906f2.txt
@@ -0,0 +1,26 @@
+# Lines starting with u'#' and sections without content
+# are not displayed by a call to u'details'
+#
+[paths]
+# Paths related to this bug.
+# suggested format: REPO_PATH:LINENUMBERS
+
+
+[details]
+# Additional details
+we can only check contents, not incoming. We don’t know how much changed and we can’t be sure that there will be a HTTP source.
+
+[expected]
+# The expected result
+
+
+[actual]
+# What happened instead
+
+
+[reproduce]
+# Reproduction steps
+
+
+[comments]
+# Comments and updates - leave your name
diff --git a/site.py b/site.py
--- a/site.py
+++ b/site.py
@@ -269,8 +269,8 @@ def parsesite(ui, repo, target, **opts):
         if not isfile(idfile):
             if not ui.prompt("The target folder exists is no static repo. Really use it?", default="n").lower() in ["y", "yes"]:
                 return
-    with open(idfile, "w") as i:
-        i.write("")
+            with open(idfile, "w") as i:
+                i.write("")
 
     if opts["name"]:
         name = opts["name"]
@@ -311,9 +311,6 @@ def addrepo(ui, repo, target):
     except mercurial.error.RepoError, e:
         # already exists
         pass
-    other = hg.peer(repo, {}, target)
-    common, outheads = discovery.findcommonoutgoing(repo, other, revs, force=True)
-    o = repo.changelog.findmissing(common, outheads)
 
     ui.pushbuffer()
     commands.push(ui, repo, dest=target, bookmark=repo._bookmarks)
@@ -428,9 +425,9 @@ def staticsite(ui, repo, target=None, **
         ui.warn(_("static target repo can’t be the current repo"))
         return
     if not target: target = "static"
-    print repo["."].branch()
+    #print repo["."].branch()
     # add the hg repo to the static site
-    print addrepo(ui, repo, target)
+    addrepo(ui, repo, target)
     # first: just create the site.
     parsesite(ui, repo, target, **opts)
     if opts["upload"]: