# HG changeset patch # User mpm@selenic.com # Date 1118600312 28800 # Node ID b18ce742566a5c13a140b1177c39b577bee778ff # Parent c48d069163d693f7dbb8bce7f827fe523cd20024 hg commit: user and date options -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hg commit: user and date options - From Ted Ts'o manifest hash: f6ce29eed387664c6f0631b666158eb930876cb3 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCrHx4ywK+sNU5EO8RAp/uAKCEGhvm1tpBJ9Bub8BlalWaIpMeqgCfUejo IoevMbk4cjxQ5P3Zo2pSFs8= =Ibp3 -----END PGP SIGNATURE----- diff -r c48d069163d6 -r b18ce742566a mercurial/commands.py --- a/mercurial/commands.py Sun Jun 12 08:51:11 2005 -0800 +++ b/mercurial/commands.py Sun Jun 12 10:18:32 2005 -0800 @@ -178,7 +178,7 @@ try: text = open(opts['logfile']).read() except IOError: pass - repo.commit(relpath(repo, files), text) + repo.commit(relpath(repo, files), text, opts['user'], opts['date']) def debugaddchangegroup(ui, repo): data = sys.stdin.read() @@ -524,7 +524,9 @@ "cat|dump": (cat, [], 'hg cat [rev]'), "commit|ci": (commit, [('t', 'text', "", 'commit text'), - ('l', 'logfile', "", 'commit text file')], + ('l', 'logfile', "", 'commit text file'), + ('d', 'date', "", 'data'), + ('u', 'user', "", 'user')], 'hg commit [files]'), "debugaddchangegroup": (debugaddchangegroup, [], 'debugaddchangegroup'), "debugchangegroup": (debugchangegroup, [], 'debugchangegroup [roots]'), diff -r c48d069163d6 -r b18ce742566a mercurial/hg.py --- a/mercurial/hg.py Sun Jun 12 08:51:11 2005 -0800 +++ b/mercurial/hg.py Sun Jun 12 10:18:32 2005 -0800 @@ -462,7 +462,7 @@ n = self.changelog.add(mnode, files, text, tr, p1, p2, user, date) tr.close() - def commit(self, files = None, text = ""): + def commit(self, files = None, text = "", user = None, date = None): commit = [] remove = [] if files: @@ -529,7 +529,7 @@ return 1 text = edittext - n = self.changelog.add(mn, new, text, tr, p1, p2) + n = self.changelog.add(mn, new, text, tr, p1, p2, user, date) tr.close() self.dirstate.setparents(n) diff -r c48d069163d6 -r b18ce742566a mercurial/mdiff.py --- a/mercurial/mdiff.py Sun Jun 12 08:51:11 2005 -0800 +++ b/mercurial/mdiff.py Sun Jun 12 10:18:32 2005 -0800 @@ -67,7 +67,11 @@ for i in a: p.append(p[-1] + len(i)) if sorted: - d = sortdiff(a, b) + try: + d = sortdiff(a, b) + except: + print a, b + raise else: d = difflib.SequenceMatcher(None, a, b).get_matching_blocks() la = 0