# HG changeset patch # User Thomas Arendsen Hein # Date 2005-07-29 05:43:21 # Node ID 445970ccf57a2fd39b95397c5e94c7f08c1fbad7 # Parent 49ec802b4a165d94ffc8b77fbd9ad88626a725c0 # Parent f199e1887889f208806f70d348678c617839bbb2 Merge with upstream diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -9,7 +9,7 @@ from demandload import demandload demandload(globals(), "os re sys signal shutil") demandload(globals(), "fancyopts ui hg util") demandload(globals(), "fnmatch hgweb mdiff random signal time traceback") -demandload(globals(), "errno socket version struct") +demandload(globals(), "errno socket version struct atexit") class UnknownCommand(Exception): """Exception raised if command is not in the command table.""" @@ -217,24 +217,30 @@ def show_changeset(ui, repo, rev=0, chan changes = changelog.read(changenode) - parents = [(log.rev(parent), hg.hex(parent)) - for parent in log.parents(node) - if ui.debugflag or parent != hg.nullid] + parents = [(log.rev(p), ui.verbose and hg.hex(p) or hg.short(p)) + for p in log.parents(node) + if ui.debugflag or p != hg.nullid] if not ui.debugflag and len(parents) == 1 and parents[0][0] == rev-1: parents = [] - ui.write("changeset: %d:%s\n" % (changerev, hg.hex(changenode))) + if ui.verbose: + ui.write("changeset: %d:%s\n" % (changerev, hg.hex(changenode))) + else: + ui.write("changeset: %d:%s\n" % (changerev, hg.short(changenode))) + for tag in repo.nodetags(changenode): ui.status("tag: %s\n" % tag) for parent in parents: ui.write("parent: %d:%s\n" % parent) if filelog: ui.debug("file rev: %d:%s\n" % (filerev, hg.hex(filenode))) - ui.note("manifest: %d:%s\n" % (repo.manifest.rev(changes[0]), + + ui.debug("manifest: %d:%s\n" % (repo.manifest.rev(changes[0]), hg.hex(changes[0]))) ui.status("user: %s\n" % changes[1]) ui.status("date: %s\n" % time.asctime( time.localtime(float(changes[2].split(' ')[0])))) + if ui.debugflag: files = repo.changes(changelog.parents(changenode)[0], changenode) for key, value in zip(["files:", "files+:", "files-:"], files): @@ -242,6 +248,7 @@ def show_changeset(ui, repo, rev=0, chan ui.note("%-12s %s\n" % (key, " ".join(value))) else: ui.note("files: %s\n" % " ".join(changes[3])) + description = changes[4].strip() if description: if ui.verbose: @@ -379,17 +386,23 @@ def annotate(ui, repo, *pats, **opts): change = repo.changelog.read(node) mmap = repo.manifest.read(change[0]) for src, abs, rel in walk(repo, pats, opts): + if abs not in mmap: + ui.warn("warning: %s is not in the repository!\n" % rel) + continue + lines = repo.file(abs).annotate(mmap[abs]) pieces = [] for o, f in opmap: if opts[o]: l = [f(n) for n, dummy in lines] - m = max(map(len, l)) - pieces.append(["%*s" % (m, x) for x in l]) + if l: + m = max(map(len, l)) + pieces.append(["%*s" % (m, x) for x in l]) - for p, l in zip(zip(*pieces), lines): - ui.write("%s: %s" % (" ".join(p), l[1])) + if pieces: + for p, l in zip(zip(*pieces), lines): + ui.write("%s: %s" % (" ".join(p), l[1])) def cat(ui, repo, file1, rev=None, **opts): """output the latest or given revision of a file""" @@ -767,6 +780,19 @@ def parents(ui, repo, rev=None): if n != hg.nullid: show_changeset(ui, repo, changenode=n) +def paths(ui, repo, search = None): + """show path or list of available paths""" + if search: + for name, path in ui.configitems("paths"): + if name == search: + ui.write("%s\n" % path) + return + ui.warn("not found!\n") + return 1 + else: + for name, path in ui.configitems("paths"): + ui.write("%s = %s\n" % (name, path)) + def pull(ui, repo, source="default", **opts): """pull changes from the specified source""" source = ui.expandpath(source) @@ -1155,6 +1181,7 @@ table = { 'hg log [-r REV1 [-r REV2]] [-p] [FILE]'), "manifest": (manifest, [], 'hg manifest [REV]'), "parents": (parents, [], 'hg parents [REV]'), + "paths": (paths, [], 'hg paths [name]'), "^pull": (pull, [('u', 'update', None, 'update working directory')], @@ -1220,6 +1247,7 @@ globalopts = [('v', 'verbose', None, 've ('', 'traceback', None, 'print traceback on exception'), ('y', 'noninteractive', None, 'run non-interactively'), ('', 'version', None, 'output version information and exit'), + ('', 'time', None, 'time how long the command takes'), ] norepo = "clone init version help debugindex debugindexdot" @@ -1303,6 +1331,20 @@ def dispatch(args): help_(u) sys.exit(1) + if options["time"]: + def get_times(): + t = os.times() + if t[4] == 0.0: # Windows leaves this as zero, so use time.clock() + t = (t[0], t[1], t[2], t[3], time.clock()) + return t + s = get_times() + def print_time(): + t = get_times() + u = ui.ui() + u.warn("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n" % + (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3])) + atexit.register(print_time) + u = ui.ui(options["verbose"], options["debug"], options["quiet"], not options["noninteractive"]) @@ -1343,7 +1385,7 @@ def dispatch(args): if hasattr(inst, "code"): u.warn("abort: %s\n" % inst) elif hasattr(inst, "reason"): - u.warn("abort: error %d: %s\n" % (inst.reason[0], inst.reason[1])) + u.warn("abort: error: %s\n" % inst.reason[1]) elif hasattr(inst, "args") and inst[0] == errno.EPIPE: if u.debugflag: u.warn("broken pipe\n") else: diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -16,8 +16,22 @@ demandload(globals(), "bisect select") class filelog(revlog): def __init__(self, opener, path): revlog.__init__(self, opener, - os.path.join("data", path + ".i"), - os.path.join("data", path + ".d")) + os.path.join("data", self.encodedir(path + ".i")), + os.path.join("data", self.encodedir(path + ".d"))) + + # This avoids a collision between a file named foo and a dir named + # foo.i or foo.d + def encodedir(self, path): + path.replace(".hg/", ".hg.hg/") + path.replace(".i/", ".i.hg/") + path.replace(".d/", ".i.hg/") + return path + + def decodedir(self, path): + path.replace(".d.hg/", ".d/") + path.replace(".i.hg/", ".i/") + path.replace(".hg.hg/", ".hg/") + return path def read(self, node): t = self.revision(node) @@ -675,11 +689,15 @@ class localrepository: ds = self.opener("dirstate").read() except IOError: ds = "" - self.opener("undo.dirstate", "w").write(ds) + self.opener("journal.dirstate", "w").write(ds) - return transaction.transaction(self.ui.warn, - self.opener, self.join("journal"), - self.join("undo")) + def after(): + util.rename(self.join("journal"), self.join("undo")) + util.rename(self.join("journal.dirstate"), + self.join("undo.dirstate")) + + return transaction.transaction(self.ui.warn, self.opener, + self.join("journal"), after) def recover(self): lock = self.lock() @@ -959,9 +977,9 @@ class localrepository: def copy(self, source, dest): p = self.wjoin(dest) - if not os.path.exists(dest): + if not os.path.exists(p): self.ui.warn("%s does not exist!\n" % dest) - elif not os.path.isfile(dest): + elif not os.path.isfile(p): self.ui.warn("copy failed: %s is not a file\n" % dest) else: if self.dirstate.state(dest) == '?': @@ -1278,7 +1296,7 @@ class localrepository: mo = self.manifest.addgroup(getgroup(), revmap, tr) # process the files - self.ui.status("adding file revisions\n") + self.ui.status("adding file changes\n") while 1: f = getchunk() if not f: break @@ -1289,11 +1307,15 @@ class localrepository: revisions += fl.count() - o files += 1 - self.ui.status(("modified %d files, added %d changesets" + - " and %d new revisions\n") - % (files, changesets, revisions)) + self.ui.status(("added %d changesets" + + " with %d changes to %d files\n") + % (changesets, revisions, files)) tr.close() + + if not self.hook("changegroup"): + return 1 + return def update(self, node, allow=False, force=False, choose=None, diff --git a/mercurial/transaction.py b/mercurial/transaction.py --- a/mercurial/transaction.py +++ b/mercurial/transaction.py @@ -50,7 +50,7 @@ class transaction: self.file.close() self.entries = [] if self.after: - util.rename(self.journal, self.after) + self.after() else: os.unlink(self.journal) self.journal = None diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -18,19 +18,6 @@ def unique(g): class CommandError(Exception): pass -def explain_exit(code): - """return a 2-tuple (desc, code) describing a process's status""" - if os.WIFEXITED(code): - val = os.WEXITSTATUS(code) - return "exited with status %d" % val, val - elif os.WIFSIGNALED(code): - val = os.WTERMSIG(code) - return "killed by signal %d" % val, val - elif os.WIFSTOPPED(code): - val = os.WSTOPSIG(code) - return "stopped by signal %d" % val, val - raise ValueError("invalid exit code") - def always(fn): return True def never(fn): return False @@ -166,6 +153,9 @@ if os.name == 'nt': makelock = _makelock_file readlock = _readlock_file + def explain_exit(code): + return "exited with status %d" % code, code + else: nulldev = '/dev/null' @@ -205,3 +195,16 @@ else: return _readlock_file(pathname) else: raise + + def explain_exit(code): + """return a 2-tuple (desc, code) describing a process's status""" + if os.WIFEXITED(code): + val = os.WEXITSTATUS(code) + return "exited with status %d" % val, val + elif os.WIFSIGNALED(code): + val = os.WTERMSIG(code) + return "killed by signal %d" % val, val + elif os.WIFSTOPPED(code): + val = os.STOPSIG(code) + return "stopped by signal %d" % val, val + raise ValueError("invalid exit code") diff --git a/templates/changelogentry-rss.tmpl b/templates/changelogentry-rss.tmpl --- a/templates/changelogentry-rss.tmpl +++ b/templates/changelogentry-rss.tmpl @@ -1,7 +1,7 @@ #desc|firstline|escape# #url#?cmd=changeset;node=#node# - #desc|escape|addbreaks# + #author|obfuscate# #date|rfc822date# diff --git a/templates/filelogentry-rss.tmpl b/templates/filelogentry-rss.tmpl --- a/templates/filelogentry-rss.tmpl +++ b/templates/filelogentry-rss.tmpl @@ -1,7 +1,7 @@ #desc|firstline|escape# #url#?cmd=file;file=#file#;filenode=#filenode# - #desc|escape|addbreaks# + #author|obfuscate# #date|rfc822date#> diff --git a/tests/README b/tests/README --- a/tests/README +++ b/tests/README @@ -28,7 +28,8 @@ writing tests: - diff will show the current time - use hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" to strip dates + use hg diff | sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" to strip + dates - set -x and pipelines don't generate stable output diff --git a/tests/run-tests b/tests/run-tests --- a/tests/run-tests +++ b/tests/run-tests @@ -47,7 +47,7 @@ function run_one { rm -f $1.err export TZ=GMT - D=`mktemp -d` + D=`mktemp -d ${TMP-/tmp}/tmp.XXXXXX` if [ "$D" = "" ] ; then echo mktemp failed! fi diff --git a/tests/test-bad-pull.out b/tests/test-bad-pull.out --- a/tests/test-bad-pull.out +++ b/tests/test-bad-pull.out @@ -1,6 +1,6 @@ + hg clone http://localhost:20059/ copy requesting all changes -abort: error 111: Connection refused +abort: error: Connection refused + echo 255 255 + ls copy diff --git a/tests/test-basic.out b/tests/test-basic.out --- a/tests/test-basic.out +++ b/tests/test-basic.out @@ -5,7 +5,7 @@ + hg add a + hg commit -m test -d '0 0' + hg history -changeset: 0:acb14030fe0a21b60322c440ad2d20cf7685a376 +changeset: 0:acb14030fe0a tag: tip user: test date: Thu Jan 1 00:00:00 1970 diff --git a/tests/test-clone-failure.out b/tests/test-clone-failure.out --- a/tests/test-clone-failure.out +++ b/tests/test-clone-failure.out @@ -4,7 +4,7 @@ abort: repository a/.hg not found! 255 + hg clone http://127.0.0.1:3121/a b requesting all changes -abort: error 111: Connection refused +abort: error: Connection refused + echo 255 255 + rm -rf b diff --git a/tests/test-copy.out b/tests/test-copy.out --- a/tests/test-copy.out +++ b/tests/test-copy.out @@ -13,19 +13,19 @@ A b b b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 + hg history -changeset: 1:3b5b84850bbed12e8ff8c1b87b32dc93c59ae6d8 +changeset: 1:3b5b84850bbe tag: tip user: test date: Thu Jan 1 00:00:00 1970 summary: 2 -changeset: 0:c19d34741b0a4ced8e4ba74bb834597d5193851e +changeset: 0:c19d34741b0a user: test date: Thu Jan 1 00:00:00 1970 summary: 1 + hg log a -changeset: 0:c19d34741b0a4ced8e4ba74bb834597d5193851e +changeset: 0:c19d34741b0a user: test date: Thu Jan 1 00:00:00 1970 summary: 1 diff --git a/tests/test-diffdir b/tests/test-diffdir --- a/tests/test-diffdir +++ b/tests/test-diffdir @@ -7,6 +7,6 @@ hg ci -m "a" -d "0 0" echo 123 > b hg add b -hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" +hg diff | sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" -hg diff -r tip | sed "s/\(\(---\|+++\).*\)\t.*/\1/" +hg diff -r tip | sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" diff --git a/tests/test-flags.out b/tests/test-flags.out --- a/tests/test-flags.out +++ b/tests/test-flags.out @@ -14,8 +14,8 @@ pulling from ../test1 requesting all changes adding changesets adding manifests -adding file revisions -modified 2 files, added 1 changesets and 2 new revisions +adding file changes +added 1 changesets with 2 changes to 2 files (run 'hg update' to get a working copy) + hg co + chmod +x a @@ -28,36 +28,36 @@ pulling from ../test2 searching for changes adding changesets adding manifests -adding file revisions -modified 1 files, added 1 changesets and 1 new revisions +adding file changes +added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) + hg heads -changeset: 2:3ef54330565526bebf37a0d9bf540c283fd133a1 +changeset: 2:3ef543305655 tag: tip -parent: 0:22a449e20da501ca558394c083ca470e9c81b9f7 +parent: 0:22a449e20da5 user: test date: Thu Jan 1 00:00:00 1970 summary: chmod +x a -changeset: 1:c6ecefc45368ed556d965f1c1086c6561a8b2ac5 +changeset: 1:c6ecefc45368 user: test date: Thu Jan 1 00:00:00 1970 summary: a updated + hg history -changeset: 2:3ef54330565526bebf37a0d9bf540c283fd133a1 +changeset: 2:3ef543305655 tag: tip -parent: 0:22a449e20da501ca558394c083ca470e9c81b9f7 +parent: 0:22a449e20da5 user: test date: Thu Jan 1 00:00:00 1970 summary: chmod +x a -changeset: 1:c6ecefc45368ed556d965f1c1086c6561a8b2ac5 +changeset: 1:c6ecefc45368 user: test date: Thu Jan 1 00:00:00 1970 summary: a updated -changeset: 0:22a449e20da501ca558394c083ca470e9c81b9f7 +changeset: 0:22a449e20da5 user: test date: Thu Jan 1 00:00:00 1970 summary: added a b diff --git a/tests/test-hup.out b/tests/test-hup.out --- a/tests/test-hup.out +++ b/tests/test-hup.out @@ -7,4 +7,4 @@ rollback completed 00changelog.d 00changelog.i data -undo.dirstate +journal.dirstate diff --git a/tests/test-merge6.out b/tests/test-merge6.out --- a/tests/test-merge6.out +++ b/tests/test-merge6.out @@ -27,8 +27,8 @@ pulling from ../B1 searching for changes adding changesets adding manifests -adding file revisions -modified 1 files, added 1 changesets and 1 new revisions +adding file changes +added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) + hg update -m + hg commit -m 'commit test' -d '0 0' @@ -42,8 +42,8 @@ pulling from ../A2 searching for changes adding changesets adding manifests -adding file revisions -modified 0 files, added 1 changesets and 0 new revisions +adding file changes +added 1 changesets with 0 changes to 0 files (run 'hg update' to get a working copy) + hg update -m + hg commit -m 'commit test' -d '0 0' diff --git a/tests/test-pull.out b/tests/test-pull.out --- a/tests/test-pull.out +++ b/tests/test-pull.out @@ -7,8 +7,8 @@ 1 files, 1 changesets, 1 total revisions requesting all changes adding changesets adding manifests -adding file revisions -modified 1 files, added 1 changesets and 1 new revisions +adding file changes +added 1 changesets with 1 changes to 1 files checking changesets checking manifests crosschecking files in changesets and manifests diff --git a/tests/test-rawcommit1.out b/tests/test-rawcommit1.out --- a/tests/test-rawcommit1.out +++ b/tests/test-rawcommit1.out @@ -15,7 +15,7 @@ 05f9e54f4c9b86b09099803d8b49a50edcb4eaab 54837d97f2932a8194e69745a280a2c11e61ff9c 644 b 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 644 c + hg parents -changeset: 2:9f827976dae422d883af3cedc7a849c3e41a9b96 +changeset: 2:9f827976dae4 tag: tip user: test date: Thu Jan 1 00:00:00 1970 @@ -27,7 +27,7 @@ summary: 2 05f9e54f4c9b86b09099803d8b49a50edcb4eaab 644 a 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 644 c + hg parents -changeset: 3:c8225a10618652ed2048e5ec0e917a92e50b9032 +changeset: 3:c8225a106186 tag: tip user: test date: Thu Jan 1 00:00:00 1970 @@ -39,7 +39,7 @@ summary: 3 d6e3c4976c13feb1728cd3ac851abaf7256a5c23 644 a 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 644 c + hg parents -changeset: 4:8dfeee82a94bbe13e5f3ca5eee08058269af87c1 +changeset: 4:8dfeee82a94b tag: tip user: test date: Thu Jan 1 00:00:00 1970 @@ -52,7 +52,7 @@ 05f9e54f4c9b86b09099803d8b49a50edcb4eaab 54837d97f2932a8194e69745a280a2c11e61ff9c 644 b 3570202ceac2b52517df64ebd0a062cb0d8fe33a 644 c + hg parents -changeset: 4:8dfeee82a94bbe13e5f3ca5eee08058269af87c1 +changeset: 4:8dfeee82a94b user: test date: Thu Jan 1 00:00:00 1970 summary: 4 @@ -62,10 +62,10 @@ summary: 4 d6e3c4976c13feb1728cd3ac851abaf7256a5c23 644 a 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 644 c + hg parents -changeset: 6:c0e932ecae5eb7d8d2af2659f3ab03dbe4a9ff7c +changeset: 6:c0e932ecae5e tag: tip -parent: 4:8dfeee82a94bbe13e5f3ca5eee08058269af87c1 -parent: 5:a7925a42d0df7b35e14ecd7bf12ed6bbc776e9df +parent: 4:8dfeee82a94b +parent: 5:a7925a42d0df user: test date: Thu Jan 1 00:00:00 1970 summary: 6 @@ -75,7 +75,7 @@ summary: 6 d6e3c4976c13feb1728cd3ac851abaf7256a5c23 644 a 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 644 c + hg parents -changeset: 7:3a157da4365dc1966cf9a032b0113fd8613d7865 +changeset: 7:3a157da4365d tag: tip user: test date: Thu Jan 1 00:00:00 1970 diff --git a/tests/test-simple-update.out b/tests/test-simple-update.out --- a/tests/test-simple-update.out +++ b/tests/test-simple-update.out @@ -22,8 +22,8 @@ pulling from ../branch searching for changes adding changesets adding manifests -adding file revisions -modified 1 files, added 1 changesets and 1 new revisions +adding file changes +added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) + hg verify checking changesets diff --git a/tests/test-tag.out b/tests/test-tag.out --- a/tests/test-tag.out +++ b/tests/test-tag.out @@ -3,7 +3,7 @@ + hg add a + hg commit -m test -d '0 0' + hg history -changeset: 0:acb14030fe0a21b60322c440ad2d20cf7685a376 +changeset: 0:acb14030fe0a tag: tip user: test date: Thu Jan 1 00:00:00 1970 @@ -11,13 +11,13 @@ summary: test + hg tag -d '0 0' bleah + hg history -changeset: 1:863197ef03781c4fc00276d83eb66c4cb9cd91df +changeset: 1:863197ef0378 tag: tip user: test date: Thu Jan 1 00:00:00 1970 summary: Added tag bleah for changeset acb14030fe0a21b60322c440ad2d20cf7685a376 -changeset: 0:acb14030fe0a21b60322c440ad2d20cf7685a376 +changeset: 0:acb14030fe0a tag: bleah user: test date: Thu Jan 1 00:00:00 1970 diff --git a/tests/test-undo.out b/tests/test-undo.out --- a/tests/test-undo.out +++ b/tests/test-undo.out @@ -11,7 +11,7 @@ crosschecking files in changesets and ma checking files 1 files, 1 changesets, 1 total revisions + hg parents -changeset: 0:acb14030fe0a21b60322c440ad2d20cf7685a376 +changeset: 0:acb14030fe0a tag: tip user: test date: Thu Jan 1 00:00:00 1970 diff --git a/tests/test-unrelated-pull.out b/tests/test-unrelated-pull.out --- a/tests/test-unrelated-pull.out +++ b/tests/test-unrelated-pull.out @@ -3,16 +3,16 @@ searching for changes warning: pulling from an unrelated repository! adding changesets adding manifests -adding file revisions -modified 1 files, added 1 changesets and 1 new revisions +adding file changes +added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) -changeset: 1:9a79c33a9db37480e40fbd2a65d62ebd2a3c441c +changeset: 1:9a79c33a9db3 tag: tip user: a date: Thu Jan 1 00:00:00 1970 summary: a -changeset: 0:01f8062b2de51c0fa6428c5db1d1b3ea780189df +changeset: 0:01f8062b2de5 user: b date: Thu Jan 1 00:00:00 1970 summary: b diff --git a/tests/test-up-local-change b/tests/test-up-local-change --- a/tests/test-up-local-change +++ b/tests/test-up-local-change @@ -13,7 +13,7 @@ cd ../r2 hg up echo abc > a hg diff > ../d -sed "s/\(\(---\|+++\).*\)\t.*/\1/" < ../d +sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" < ../d cd ../r1 echo b > b @@ -29,5 +29,5 @@ hg --debug up -m hg parents hg -v history hg diff > ../d -sed "s/\(\(---\|+++\).*\)\t.*/\1/" < ../d +sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" < ../d diff --git a/tests/test-up-local-change.out b/tests/test-up-local-change.out --- a/tests/test-up-local-change.out +++ b/tests/test-up-local-change.out @@ -10,7 +10,7 @@ adding a + hg up + echo abc + hg diff -+ sed 's/\(\(---\|+++\).*\)\t.*/\1/' ++ sed 's/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/' diff -r c19d34741b0a a --- a/a +++ b/a @@ -42,7 +42,7 @@ resolving manifests force None allow 1 moddirstate True linear True ancestor 1165e8bd193e local 1165e8bd193e remote 1165e8bd193e + hg parents -changeset: 1:1e71731e6fbb5b35fae293120dea6964371c13c6 +changeset: 1:1e71731e6fbb tag: tip user: test date: Thu Jan 1 00:00:00 1970 @@ -51,7 +51,6 @@ summary: 2 + hg -v history changeset: 1:1e71731e6fbb5b35fae293120dea6964371c13c6 tag: tip -manifest: 1:1165e8bd193e17ad7d321d846fcf27ff3f412758 user: test date: Thu Jan 1 00:00:00 1970 files: a b @@ -60,7 +59,6 @@ 2 changeset: 0:c19d34741b0a4ced8e4ba74bb834597d5193851e -manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 user: test date: Thu Jan 1 00:00:00 1970 files: a @@ -69,7 +67,7 @@ 1 + hg diff -+ sed 's/\(\(---\|+++\).*\)\t.*/\1/' ++ sed 's/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/' diff -r 1e71731e6fbb a --- a/a +++ b/a