# # # patch "README" # from [8560b56e067258943ba977fcd3af2d016191e51a] # to [46ffe1ce5080c9fd0081574ae8a8da30c3df65dc] # # patch "TODO" # from [49091bf048c27f3e3b7b507f930d803c91a71fa0] # to [2ca97a19c1baa2f2de56b7f314b3a153658e37cc] # # patch "manifest.psp" # from [783c5152b37268b96a803fa8490dcc0eb007d26a] # to [359ab37292121fc7ce029ca53216da8c43203795] # # patch "revision.psp" # from [5149daa0704f81b0581d6ab9d7ee8fd24b0641cb] # to [1517bd776db3bcdf0119021d92d419a63501aae0] # # patch "tests/automate.py" # from [7098bbdbd9dd69720d48c6dfb5e2ed2c59b51995] # to [450a10277f7c31855022fa79213db13de7b3612d] # ============================================================ --- README 8560b56e067258943ba977fcd3af2d016191e51a +++ README 46ffe1ce5080c9fd0081574ae8a8da30c3df65dc @@ -55,3 +55,8 @@ please go ahead - perhaps let me know so I can keep track and let you know if the item is already done but not committed. +As monotone is a distributed version control system, feel free to +grab a copy of viewmtn, commit to your local DB, etc. If you want to +send me your commits, email me (or catch me in #monotone) and we'll +work something out. + ============================================================ --- TODO 49091bf048c27f3e3b7b507f930d803c91a71fa0 +++ TODO 2ca97a19c1baa2f2de56b7f314b3a153658e37cc @@ -5,21 +5,103 @@ a link to each ancestor in which the file is different from the revision we are displaying + * for some reason enscript on MacOS isn't doing colour highlighting + + * seen at: + http://glamdring.local/~grahame/viewmtn/revision.psp?id=ea14ea3aadb3a02ffe5041e0a98db15306cbcd81 + Add file client/plugins/debiansecurity.py with revision [client/plugins/address@hidden + + * seen at: + http://glamdring.local/~grahame/viewmtn/manifest.psp?id=b80c8b2f6faa12d11cde7ccb967a1bf90ff67190&path=client + some changes not being found in the history, and this case not being handled that well + TODO: + * support for translation, and see if we can get some people to help with that + モノトネ + + * some sort of contest for a logo (with some sort of cool prize, perhaps + con someone into putting one up on offer or pay up myself.) + * Use monotone automate graph to do the ancestry graphing, and show some future information. Perhaps cache based on the mtime of the db viewmtn is looking at? Might be good enough. + Show dotted lines for propogates (with that information on the arc) + + Show lines leading off from the boxes at either end of the graph (if + applicable) to give context that the image being shown is part of a + large overall graph. + * Show information when mousing over long hex strings. Also, it might be more readable if the hex strings are in [ ] as they tend to merge together when looking at them. This is how MT presents the data a lot of the time, anyway. + * Colour and format diffs (files are already done). + + * Magically make http:// ftp:// etc links inside files clickable + + * In the file diff view, link to the both revisions and to the general + diff of those revisions (all changes.) + + * In the file diff view for multiple files, show the same change set + information that is available in the revision view - this will help + explain what's happened. For bonus points, index into the diff so you + can click on a file that changed and jump to that section in the diff. + + * Patch lines in revision.psp, "Patch file ChangeLog from ..." make + "ChangeLog" a link to the file. + + * Improve the file listing; use data from the new rosters branch + to get a better idea of when a given file was last touched. + + * When viewing a file, give a list of revisions in which that file + was recently changed. Include in the list a link to diff with each + revision. + + * actually do commit messages / ChangeLog formally. + + * generally clean up table formatting code; things like + list_of_branches() + list_of_tags() + revision_certs() + revision_details() + use a generic method to output the tables + + * the revision details links in "revision.psp" need review. The data could + perhaps be shown in a more intelligent way; either way the links themselves + are wrong. + + * rewrite the basic_io parser; make sure code outside of Monotone.py + isn't accessing those structures directly. + +AJAX ideas: + * When hovering over nodes in the ancestry graph, display the ChangeLog. - * Colour diffs (files are already done) + * When hovering over branch links, show heads and other information + * When hovering over revisions, show author / date + + * When hovering over diff links + + * turn line numbering in file / diff view (etc) on and off + * file viewer; treat merges as a special case and show the side which actually has the resultant file (no change on that edge) + * file viewer / diff viewer / anywhere showing info related to a rev + magic box that downloads and inserts + revision stuff. + + * we need some concept of selecting two points revisions for diffs or other + comparison. This is the main strength ViewCVS seems to have over us. + +LONG TERM: + + * provide some option for people without apache2 / mod_python to run the + thing; even if it's running the program from a standalone python webserver. + Would settle for a solution that required a cgi capable webserver rather than + specifically mod_python (and thus apache2) while still supporting mod_python + acceleration if present. ============================================================ --- manifest.psp 783c5152b37268b96a803fa8490dcc0eb007d26a +++ manifest.psp 359ab37292121fc7ce029ca53216da8c43203795 @@ -112,8 +112,12 @@ now = datetime.datetime.utcnow() for filename in file_to_rev.keys(): rev = file_to_rev[filename] - if revinfo.has_key(rev): continue - certs = mt.certs(rev) + + if rev == None: + certs = [] + else: + certs = mt.certs(rev) + ago, author, certdate, quicklog = None, None, None, None for cert in certs: name, value = None, None @@ -159,7 +163,7 @@ icon_code = '' rev = file_to_rev.get(file, None) if not rev: - tr.write('%s%s' % (icon_code, link("file", [revision_id, file], name))) + tr.write('%s %s' % (icon_code, link("file", [id, file], name))) else: age, author, quicklog = revinfo[rev] author = hq(author or "").replace(' ', ' ') ============================================================ --- revision.psp 5149daa0704f81b0581d6ab9d7ee8fd24b0641cb +++ revision.psp 1517bd776db3bcdf0119021d92d419a63501aae0 @@ -96,7 +96,7 @@ if not from_id: value += 'Add file %s with revision %s
' % (hq(fname), link("file", [id, fname])) else: - # possible bug here; we might need N diff links where N is the number of ancestors + # FIXME; possible bug here; we might need N diff links where N is the number of ancestors value += 'Patch file %s from %s to %s (%s)
' % (hq(fname), link("download", [from_id, fname]), link("download", [to_id, fname]), link("diff", [old_revision, id, fname])) elif type == "old_revision": old_revision, old_manifest = stanza[0][1], stanza[1][1] ============================================================ --- tests/automate.py 7098bbdbd9dd69720d48c6dfb5e2ed2c59b51995 +++ tests/automate.py 450a10277f7c31855022fa79213db13de7b3612d @@ -34,19 +34,33 @@ """Test huge (silly) arguments""" #ancestors = mt.heads(config.test_branch) ancestors = mt.ancestors(mt.heads(config.test_branch)) - while len(ancestors) < 100000: - print "size of list:", len(ancestors) + while len(ancestors) < 1000: result = mt.toposort(ancestors) - print "result length:", len(result) open('command.txt', 'w').write(config.monotone + 'automate ancestors ' + ' '.join(ancestors)) ancestors *= 2 +def test_error_string(mt): + """Test what happens when we do something wrong resulting in an error""" + try: + heads = mt.certs('0000000000000000000000000000000000000000') + raise Exception("No error occurred.") + except Exception: pass + +def test_invalid_data(mt): + """Test what happens when we do something which is invalid""" + try: + mt.certs('0000') # too short + raise Exception("No error occurred.") + except Exception: pass + tests = [ test_branches, test_tags, test_heads, test_certs, test_crazy_toposort, + test_error_string, + test_invalid_data, ] def test(): @@ -54,7 +68,9 @@ def log(s): print "#%-3d %s" % (idx, s) log(test.__doc__) - try: test(mt) + try: + if mt.automate.process: print "Child process is: %d" % mt.automate.process.pid + test(mt) except: log ("Test FAILED; traceback follows") traceback.print_exc() @@ -62,10 +78,12 @@ if __name__ == "__main__": mt = monotone.Monotone(config.monotone, config.dbfile) - while 1: + if len(sys.argv) == 2: + attempts = int(sys.argv[1]) + else: + attempts = 1 + + while attempts > 0: test() - break - print "** Test run complete." + attempts -= 1 mt.automate.stop() - -