Show More
@@ -178,7 +178,7 b' def commit(ui, repo, *files, **opts):' | |||||
178 | try: text = open(opts['logfile']).read() |
|
178 | try: text = open(opts['logfile']).read() | |
179 | except IOError: pass |
|
179 | except IOError: pass | |
180 |
|
180 | |||
181 | repo.commit(relpath(repo, files), text) |
|
181 | repo.commit(relpath(repo, files), text, opts['user'], opts['date']) | |
182 |
|
182 | |||
183 | def debugaddchangegroup(ui, repo): |
|
183 | def debugaddchangegroup(ui, repo): | |
184 | data = sys.stdin.read() |
|
184 | data = sys.stdin.read() | |
@@ -524,7 +524,9 b' table = {' | |||||
524 | "cat|dump": (cat, [], 'hg cat <file> [rev]'), |
|
524 | "cat|dump": (cat, [], 'hg cat <file> [rev]'), | |
525 | "commit|ci": (commit, |
|
525 | "commit|ci": (commit, | |
526 | [('t', 'text', "", 'commit text'), |
|
526 | [('t', 'text', "", 'commit text'), | |
527 |
('l', 'logfile', "", 'commit text file') |
|
527 | ('l', 'logfile', "", 'commit text file'), | |
|
528 | ('d', 'date', "", 'data'), | |||
|
529 | ('u', 'user', "", 'user')], | |||
528 | 'hg commit [files]'), |
|
530 | 'hg commit [files]'), | |
529 | "debugaddchangegroup": (debugaddchangegroup, [], 'debugaddchangegroup'), |
|
531 | "debugaddchangegroup": (debugaddchangegroup, [], 'debugaddchangegroup'), | |
530 | "debugchangegroup": (debugchangegroup, [], 'debugchangegroup [roots]'), |
|
532 | "debugchangegroup": (debugchangegroup, [], 'debugchangegroup [roots]'), |
@@ -462,7 +462,7 b' class localrepository:' | |||||
462 | n = self.changelog.add(mnode, files, text, tr, p1, p2, user, date) |
|
462 | n = self.changelog.add(mnode, files, text, tr, p1, p2, user, date) | |
463 | tr.close() |
|
463 | tr.close() | |
464 |
|
464 | |||
465 | def commit(self, files = None, text = ""): |
|
465 | def commit(self, files = None, text = "", user = None, date = None): | |
466 | commit = [] |
|
466 | commit = [] | |
467 | remove = [] |
|
467 | remove = [] | |
468 | if files: |
|
468 | if files: | |
@@ -529,7 +529,7 b' class localrepository:' | |||||
529 | return 1 |
|
529 | return 1 | |
530 | text = edittext |
|
530 | text = edittext | |
531 |
|
531 | |||
532 | n = self.changelog.add(mn, new, text, tr, p1, p2) |
|
532 | n = self.changelog.add(mn, new, text, tr, p1, p2, user, date) | |
533 | tr.close() |
|
533 | tr.close() | |
534 |
|
534 | |||
535 | self.dirstate.setparents(n) |
|
535 | self.dirstate.setparents(n) |
@@ -67,7 +67,11 b' def diff(a, b, sorted=0):' | |||||
67 | for i in a: p.append(p[-1] + len(i)) |
|
67 | for i in a: p.append(p[-1] + len(i)) | |
68 |
|
68 | |||
69 | if sorted: |
|
69 | if sorted: | |
70 | d = sortdiff(a, b) |
|
70 | try: | |
|
71 | d = sortdiff(a, b) | |||
|
72 | except: | |||
|
73 | print a, b | |||
|
74 | raise | |||
71 | else: |
|
75 | else: | |
72 | d = difflib.SequenceMatcher(None, a, b).get_matching_blocks() |
|
76 | d = difflib.SequenceMatcher(None, a, b).get_matching_blocks() | |
73 | la = 0 |
|
77 | la = 0 |
General Comments 0
You need to be logged in to leave comments.
Login now