comparison mercurial-common/src/python/load-substates-command.py @ 714:78266f6904df

logging, date format changed
author eugene.petrenko@jetbrains.com
date Mon, 13 Jan 2014 15:35:44 +0100
parents 41013464149f
children be86907926ae
comparison
equal deleted inserted replaced
713:41013464149f 714:78266f6904df
39 return "=====" 39 return "====="
40 40
41 return base64.b64encode( x ) 41 return base64.b64encode( x )
42 42
43 def fetch_commits(): 43 def fetch_commits():
44 ui.write("Iterating over commits graph...") 44 ui.write("Iterating over commits...\n")
45 with open(outputFile + ".commits", "w", 5 * 1024 * 1024) as result: 45 with open(outputFile + ".commits", "w", 5 * 1024 * 1024) as result:
46 result.write("format: prefix commitID commitHash num_parents parent branch num_tags tag user message date [.hgsub]\n") 46 result.write("format: prefix commitID commitHash num_parents parent branch num_tags tag user message date [.hgsub]\n")
47 result.flush() 47 result.flush()
48 48
49 for r in list(repo.changelog): 49 for r in list(repo.changelog):
75 75
76 result.write(" ") # message 76 result.write(" ") # message
77 result.write( b64( node.description() ) ) 77 result.write( b64( node.description() ) )
78 78
79 result.write(" ") # date 79 result.write(" ") # date
80 result.write( util.datestr( node.date(), "%Y-%m-%dZ%H:%M:%ST%1:%2") ) 80 result.write( util.datestr( node.date(), "%Y-%m-%dZ%H:%M:%ST%1%2") )
81 81
82 if ".hgsub" in node.files() or ".hgsubstate" in node.files(): 82 if ".hgsub" in node.files() or ".hgsubstate" in node.files():
83 result.write(" .hgsub") 83 result.write(" .hgsub")
84 else:
85 result.write(" =====")
84 86
85 result.write("\n") 87 result.write("\n")
86 88
87 ui.write("Commits iteration completed") 89 ui.write("Commits iteration completed")
88 90
89 def fetch_file_revisions(filename): 91 def fetch_file_revisions(filename):
90 ui.write("All revisions of file " + filename + " are fetched\n") 92 ui.write("Fetching revisions of " + filename + " file\n")
91 with open(outputFile + filename, "w", 5 * 1024 * 1024) as result: 93 with open(outputFile + filename, "w", 5 * 1024 * 1024) as result:
92 result.write("format: prefix commitID base64(" + filename + ")\n") 94 result.write("format: prefix commitID base64(" + filename + ")\n")
93 result.flush() 95 result.flush()
94 96
95 log = repo.file(filename) 97 log = repo.file(filename)