# HG changeset patch # User Matt Mackall # Date 1407180754 18000 # Node ID 6be1e1dbe6a0319d394e5a8a0c7c918ae6946ecd # Parent bdb6d97f0a048dabd19f79d545ccd882aa0597de# Parent aca137619a455dcd3d7ed86b2a05fa28d53be0cd merge with stable diff -r aca137619a45 -r 6be1e1dbe6a0 hgext/keyword.py --- a/hgext/keyword.py Fri Aug 01 13:09:06 2014 -0500 +++ b/hgext/keyword.py Mon Aug 04 14:32:34 2014 -0500 @@ -1,6 +1,6 @@ # keyword.py - $Keyword$ expansion for Mercurial # -# Copyright 2007-2012 Christian Ebert +# Copyright 2007-2014 Christian Ebert # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. @@ -87,7 +87,7 @@ from mercurial import scmutil, pathutil from mercurial.hgweb import webcommands from mercurial.i18n import _ -import os, re, shutil, tempfile +import os, re, tempfile cmdtable = {} command = cmdutil.command(cmdtable) @@ -450,7 +450,12 @@ repo.commit(text=msg) ui.status(_('\n\tkeywords expanded\n')) ui.write(repo.wread(fn)) - shutil.rmtree(tmpdir, ignore_errors=True) + for root, dirs, files in os.walk(tmpdir, topdown=False): + for f in files: + util.unlink(os.path.join(root, f)) + for d in dirs: + os.rmdir(os.path.join(root, d)) + os.rmdir(tmpdir) @command('kwexpand', commands.walkopts, diff -r aca137619a45 -r 6be1e1dbe6a0 hgext/purge.py --- a/hgext/purge.py Fri Aug 01 13:09:06 2014 -0500 +++ b/hgext/purge.py Mon Aug 04 14:32:34 2014 -0500 @@ -95,17 +95,6 @@ else: ui.write('%s%s' % (name, eol)) - def removefile(path): - try: - os.remove(path) - except OSError: - # read-only files cannot be unlinked under Windows - s = os.stat(path) - if (s.st_mode & stat.S_IWRITE) != 0: - raise - os.chmod(path, stat.S_IMODE(s.st_mode) | stat.S_IWRITE) - os.remove(path) - directories = [] match = scmutil.match(repo[None], dirs, opts) match.explicitdir = match.traversedir = directories.append @@ -115,7 +104,7 @@ for f in sorted(status[4] + status[5]): if act: ui.note(_('removing file %s\n') % f) - remove(removefile, f) + remove(util.unlink, f) if removedirs: for f in sorted(directories, reverse=True): diff -r aca137619a45 -r 6be1e1dbe6a0 mercurial/commands.py --- a/mercurial/commands.py Fri Aug 01 13:09:06 2014 -0500 +++ b/mercurial/commands.py Mon Aug 04 14:32:34 2014 -0500 @@ -3054,6 +3054,7 @@ ('c', 'continue', False, _('resume interrupted graft')), ('e', 'edit', False, _('invoke editor on commit messages')), ('', 'log', None, _('append graft info to log message')), + ('f', 'force', False, _('force graft')), ('D', 'currentdate', False, _('record the current date as commit date')), ('U', 'currentuser', False, @@ -3077,6 +3078,10 @@ (grafted from CHANGESETHASH) + If --force is specified, revisions will be grafted even if they + are already ancestors of or have been grafted to the destination. + This is useful when the revisions have since been backed out. + If a graft merge results in conflicts, the graft process is interrupted so that the current merge can be manually resolved. Once all conflicts are addressed, the graft process can be @@ -3084,7 +3089,8 @@ .. note:: - The -c/--continue option does not reapply earlier options. + The -c/--continue option does not reapply earlier options, except + for --force. .. container:: verbose @@ -3150,52 +3156,59 @@ if not revs: return -1 - # check for ancestors of dest branch - crev = repo['.'].rev() - ancestors = repo.changelog.ancestors([crev], inclusive=True) - # Cannot use x.remove(y) on smart set, this has to be a list. - # XXX make this lazy in the future - revs = list(revs) - # don't mutate while iterating, create a copy - for rev in list(revs): - if rev in ancestors: - ui.warn(_('skipping ancestor revision %s\n') % rev) - # XXX remove on list is slow - revs.remove(rev) - if not revs: - return -1 - - # analyze revs for earlier grafts - ids = {} - for ctx in repo.set("%ld", revs): - ids[ctx.hex()] = ctx.rev() - n = ctx.extra().get('source') - if n: - ids[n] = ctx.rev() - - # check ancestors for earlier grafts - ui.debug('scanning for duplicate grafts\n') - - for rev in repo.changelog.findmissingrevs(revs, [crev]): - ctx = repo[rev] - n = ctx.extra().get('source') - if n in ids: - r = repo[n].rev() - if r in revs: - ui.warn(_('skipping revision %s (already grafted to %s)\n') - % (r, rev)) + # Don't check in the --continue case, in effect retaining --force across + # --continues. That's because without --force, any revisions we decided to + # skip would have been filtered out here, so they wouldn't have made their + # way to the graftstate. With --force, any revisions we would have otherwise + # skipped would not have been filtered out, and if they hadn't been applied + # already, they'd have been in the graftstate. + if not (cont or opts.get('force')): + # check for ancestors of dest branch + crev = repo['.'].rev() + ancestors = repo.changelog.ancestors([crev], inclusive=True) + # Cannot use x.remove(y) on smart set, this has to be a list. + # XXX make this lazy in the future + revs = list(revs) + # don't mutate while iterating, create a copy + for rev in list(revs): + if rev in ancestors: + ui.warn(_('skipping ancestor revision %s\n') % rev) + # XXX remove on list is slow + revs.remove(rev) + if not revs: + return -1 + + # analyze revs for earlier grafts + ids = {} + for ctx in repo.set("%ld", revs): + ids[ctx.hex()] = ctx.rev() + n = ctx.extra().get('source') + if n: + ids[n] = ctx.rev() + + # check ancestors for earlier grafts + ui.debug('scanning for duplicate grafts\n') + + for rev in repo.changelog.findmissingrevs(revs, [crev]): + ctx = repo[rev] + n = ctx.extra().get('source') + if n in ids: + r = repo[n].rev() + if r in revs: + ui.warn(_('skipping revision %s (already grafted to %s)\n') + % (r, rev)) + revs.remove(r) + elif ids[n] in revs: + ui.warn(_('skipping already grafted revision %s ' + '(%s also has origin %d)\n') % (ids[n], rev, r)) + revs.remove(ids[n]) + elif ctx.hex() in ids: + r = ids[ctx.hex()] + ui.warn(_('skipping already grafted revision %s ' + '(was grafted from %d)\n') % (r, rev)) revs.remove(r) - elif ids[n] in revs: - ui.warn(_('skipping already grafted revision %s ' - '(%s also has origin %d)\n') % (ids[n], rev, r)) - revs.remove(ids[n]) - elif ctx.hex() in ids: - r = ids[ctx.hex()] - ui.warn(_('skipping already grafted revision %s ' - '(was grafted from %d)\n') % (r, rev)) - revs.remove(r) - if not revs: - return -1 + if not revs: + return -1 wlock = repo.wlock() try: @@ -4027,11 +4040,11 @@ rev = scmutil.revsingle(repo, opts.get('rev'), None).node() ret = 1 - m = scmutil.match(repo[rev], pats, opts, default='relglob') + ctx = repo[rev] + m = scmutil.match(ctx, pats, opts, default='relglob') m.bad = lambda x, y: False - for abs in repo[rev].walk(m): - if not rev and abs not in repo.dirstate: - continue + + for abs in ctx.matches(m): if opts.get('fullpath'): ui.write(repo.wjoin(abs), end) else: diff -r aca137619a45 -r 6be1e1dbe6a0 mercurial/context.py --- a/mercurial/context.py Fri Aug 01 13:09:06 2014 -0500 +++ b/mercurial/context.py Mon Aug 04 14:32:34 2014 -0500 @@ -598,6 +598,9 @@ continue match.bad(fn, _('no such file in rev %s') % self) + def matches(self, match): + return self.walk(match) + class basefilectx(object): """A filecontext object represents the common logic for its children: filectx: read-only access to a filerevision that is already present @@ -1144,6 +1147,9 @@ return sorted(self._repo.dirstate.walk(match, sorted(self.substate), True, False)) + def matches(self, match): + return sorted(self._repo.dirstate.matches(match)) + def ancestors(self): for a in self._repo.changelog.ancestors( [p.rev() for p in self._parents]): diff -r aca137619a45 -r 6be1e1dbe6a0 mercurial/dirstate.py --- a/mercurial/dirstate.py Fri Aug 01 13:09:06 2014 -0500 +++ b/mercurial/dirstate.py Mon Aug 04 14:32:34 2014 -0500 @@ -873,3 +873,21 @@ return (lookup, modified, added, removed, deleted, unknown, ignored, clean) + + def matches(self, match): + ''' + return files in the dirstate (in whatever state) filtered by match + ''' + dmap = self._map + if match.always(): + return dmap.keys() + files = match.files() + if match.matchfn == match.exact: + # fast path -- filter the other way around, since typically files is + # much smaller than dmap + return [f for f in files if f in dmap] + if not match.anypats() and util.all(fn in dmap for fn in files): + # fast path -- all the values are known to be files, so just return + # that + return list(files) + return [f for f in dmap if match(f)] diff -r aca137619a45 -r 6be1e1dbe6a0 mercurial/exchange.py --- a/mercurial/exchange.py Fri Aug 01 13:09:06 2014 -0500 +++ b/mercurial/exchange.py Mon Aug 04 14:32:34 2014 -0500 @@ -726,9 +726,13 @@ The implementation is at a very early stage and will get massive rework when the API of bundle is refined. """ - # build changegroup bundle here. - cg = changegroup.getbundle(repo, source, heads=heads, - common=common, bundlecaps=bundlecaps) + cg = None + if kwargs.get('cg', True): + # build changegroup bundle here. + cg = changegroup.getbundle(repo, source, heads=heads, + common=common, bundlecaps=bundlecaps) + elif 'HG2X' not in bundlecaps: + raise ValueError(_('request for bundle10 must include changegroup')) if bundlecaps is None or 'HG2X' not in bundlecaps: if kwargs: raise ValueError(_('unsupported getbundle arguments: %s') diff -r aca137619a45 -r 6be1e1dbe6a0 mercurial/i18n.py --- a/mercurial/i18n.py Fri Aug 01 13:09:06 2014 -0500 +++ b/mercurial/i18n.py Mon Aug 04 14:32:34 2014 -0500 @@ -6,7 +6,7 @@ # GNU General Public License version 2 or any later version. import encoding -import gettext, sys, os +import gettext, sys, os, locale # modelled after templater.templatepath: if getattr(sys, 'frozen', None) is not None: @@ -20,7 +20,25 @@ if os.path.isdir(localedir): break -t = gettext.translation('hg', localedir, fallback=True) +_languages = None +if (os.name == 'nt' + and 'LANGUAGE' not in os.environ + and 'LC_ALL' not in os.environ + and 'LC_MESSAGES' not in os.environ + and 'LANG' not in os.environ): + # Try to detect UI language by "User Interface Language Management" API + # if no locale variables are set. Note that locale.getdefaultlocale() + # uses GetLocaleInfo(), which may be different from UI language. + # (See http://msdn.microsoft.com/en-us/library/dd374098(v=VS.85).aspx ) + try: + import ctypes + langid = ctypes.windll.kernel32.GetUserDefaultUILanguage() + _languages = [locale.windows_locale[langid]] + except (ImportError, AttributeError, KeyError): + # ctypes not found or unknown langid + pass + +t = gettext.translation('hg', localedir, _languages, fallback=True) def gettext(message): """Translate message. diff -r aca137619a45 -r 6be1e1dbe6a0 mercurial/localrepo.py --- a/mercurial/localrepo.py Fri Aug 01 13:09:06 2014 -0500 +++ b/mercurial/localrepo.py Mon Aug 04 14:32:34 2014 -0500 @@ -182,7 +182,9 @@ bundle2caps = {'HG2X': (), 'b2x:listkeys': (), - 'b2x:pushkey': ()} + 'b2x:pushkey': (), + 'b2x:changegroup': (), + } # a list of (ui, featureset) functions. # only functions defined in module of enabled extensions are invoked diff -r aca137619a45 -r 6be1e1dbe6a0 mercurial/wireproto.py --- a/mercurial/wireproto.py Fri Aug 01 13:09:06 2014 -0500 +++ b/mercurial/wireproto.py Mon Aug 04 14:32:34 2014 -0500 @@ -203,7 +203,8 @@ gboptsmap = {'heads': 'nodes', 'common': 'nodes', 'bundlecaps': 'csv', - 'listkeys': 'csv'} + 'listkeys': 'csv', + 'cg': 'boolean'} # client side @@ -349,6 +350,8 @@ value = encodelist(value) elif keytype == 'csv': value = ','.join(value) + elif keytype == 'boolean': + value = bool(value) elif keytype != 'plain': raise KeyError('unknown getbundle option type %s' % keytype) @@ -652,6 +655,8 @@ opts[k] = decodelist(v) elif keytype == 'csv': opts[k] = set(v.split(',')) + elif keytype == 'boolean': + opts[k] = '%i' % bool(v) elif keytype != 'plain': raise KeyError('unknown getbundle option type %s' % keytype) diff -r aca137619a45 -r 6be1e1dbe6a0 tests/run-tests.py --- a/tests/run-tests.py Fri Aug 01 13:09:06 2014 -0500 +++ b/tests/run-tests.py Mon Aug 04 14:32:34 2014 -0500 @@ -1077,6 +1077,7 @@ self.times = [] self._started = {} + self._stopped = {} def addFailure(self, test, reason): self.failures.append((test, reason)) @@ -1167,17 +1168,28 @@ def startTest(self, test): super(TestResult, self).startTest(test) - self._started[test.name] = time.time() + # os.times module computes the user time and system time spent by + # child's processes along with real elapsed time taken by a process. + # This module has one limitation. It can only work for Linux user + # and not for Windows. + self._started[test.name] = os.times() def stopTest(self, test, interrupted=False): super(TestResult, self).stopTest(test) - self.times.append((test.name, time.time() - self._started[test.name])) + self._stopped[test.name] = os.times() + + starttime = self._started[test.name] + endtime = self._stopped[test.name] + self.times.append((test.name, endtime[2] - starttime[2], + endtime[3] - starttime[3], endtime[4] - starttime[4])) + del self._started[test.name] + del self._stopped[test.name] if interrupted: self.stream.writeln('INTERRUPTED: %s (after %d seconds)' % ( - test.name, self.times[-1][1])) + test.name, self.times[-1][3])) class TestSuite(unittest.TestSuite): """Custom unitest TestSuite that knows how to execute Mercurial tests.""" @@ -1348,11 +1360,12 @@ def printtimes(self, times): self.stream.writeln('# Producing time report') - times.sort(key=lambda t: (t[1], t[0]), reverse=True) - cols = '%7.3f %s' - self.stream.writeln('%-7s %s' % ('Time', 'Test')) - for test, timetaken in times: - self.stream.writeln(cols % (timetaken, test)) + times.sort(key=lambda t: (t[3])) + cols = '%7.3f %7.3f %7.3f %s' + self.stream.writeln('%-7s %-7s %-7s %s' % ('cuser', 'csys', 'real', + 'Test')) + for test, cuser, csys, real in times: + self.stream.writeln(cols % (cuser, csys, real, test)) class TestRunner(object): """Holds context for executing tests. diff -r aca137619a45 -r 6be1e1dbe6a0 tests/test-completion.t --- a/tests/test-completion.t Fri Aug 01 13:09:06 2014 -0500 +++ b/tests/test-completion.t Mon Aug 04 14:32:34 2014 -0500 @@ -257,7 +257,7 @@ debugsuccessorssets: debugwalk: include, exclude debugwireargs: three, four, five, ssh, remotecmd, insecure - graft: rev, continue, edit, log, currentdate, currentuser, date, user, tool, dry-run + graft: rev, continue, edit, log, force, currentdate, currentuser, date, user, tool, dry-run grep: print0, all, text, follow, ignore-case, files-with-matches, line-number, rev, user, date, include, exclude heads: rev, topo, active, closed, style, template help: extension, command, keyword diff -r aca137619a45 -r 6be1e1dbe6a0 tests/test-graft.t --- a/tests/test-graft.t Fri Aug 01 13:09:06 2014 -0500 +++ b/tests/test-graft.t Mon Aug 04 14:32:34 2014 -0500 @@ -631,3 +631,50 @@ grafting revision 13 grafting revision 19 merging b + +graft with --force (still doesn't graft merges) + + $ hg graft 19 0 6 + skipping ungraftable merge revision 6 + skipping ancestor revision 0 + skipping already grafted revision 19 (22 also has origin 2) + [255] + $ hg graft 19 0 6 --force + skipping ungraftable merge revision 6 + grafting revision 19 + merging b + grafting revision 0 + +graft --force after backout + + $ echo abc > a + $ hg ci -m 28 + $ hg backout 28 + reverting a + changeset 29:484c03b8dfa4 backs out changeset 28:6c56f0f7f033 + $ hg graft 28 + skipping ancestor revision 28 + [255] + $ hg graft 28 --force + grafting revision 28 + merging a + $ cat a + abc + +graft --continue after --force + + $ hg backout 30 + reverting a + changeset 31:3b96c18b7a1b backs out changeset 30:8f539994be33 + $ hg graft 28 --force --tool internal:fail + grafting revision 28 + abort: unresolved conflicts, can't continue + (use hg resolve and hg graft --continue) + [255] + $ hg resolve --all + merging a + (no more unresolved files) + $ hg graft -c + grafting revision 28 + $ cat a + abc diff -r aca137619a45 -r 6be1e1dbe6a0 tests/test-obsolete.t --- a/tests/test-obsolete.t Fri Aug 01 13:09:06 2014 -0500 +++ b/tests/test-obsolete.t Mon Aug 04 14:32:34 2014 -0500 @@ -2,6 +2,8 @@ > [phases] > # public changeset are not obsolete > publish=false + > [ui] + > logtemplate="{rev}:{node|short} ({phase}) [{tags} {bookmarks}] {desc|firstline}\n" > EOF $ mkcommit() { > echo "$1" > "$1" @@ -58,11 +60,7 @@ $ hg up null --quiet # having 0 as parent prevents it to be hidden $ hg tip - changeset: -1:000000000000 - tag: tip - user: - date: Thu Jan 01 00:00:00 1970 +0000 - + -1:000000000000 (public) [tip ] $ hg up --hidden tip --quiet $ cd .. @@ -125,59 +123,22 @@ Check that graphlog detect that a changeset is obsolete: $ hg log -G - @ changeset: 5:5601fb93a350 - | tag: tip - | parent: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add new_3_c + @ 5:5601fb93a350 (draft) [tip ] add new_3_c | - o changeset: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add b + o 1:7c3bad9141dc (draft) [ ] add b | - o changeset: 0:1f0dee641bb7 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add a + o 0:1f0dee641bb7 (draft) [ ] add a check that heads does not report them $ hg heads - changeset: 5:5601fb93a350 - tag: tip - parent: 1:7c3bad9141dc - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add new_3_c - + 5:5601fb93a350 (draft) [tip ] add new_3_c $ hg heads --hidden - changeset: 5:5601fb93a350 - tag: tip - parent: 1:7c3bad9141dc - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add new_3_c - - changeset: 4:ca819180edb9 - parent: 1:7c3bad9141dc - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add new_2_c - - changeset: 3:cdbce2fbb163 - parent: 1:7c3bad9141dc - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add new_c - - changeset: 2:245bde4270cd - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add original_c - + 5:5601fb93a350 (draft) [tip ] add new_3_c + 4:ca819180edb9 (draft) [ ] add new_2_c + 3:cdbce2fbb163 (draft) [ ] add new_c + 2:245bde4270cd (draft) [ ] add original_c check that summary does not report them @@ -204,13 +165,7 @@ check that various commands work well with filtering $ hg tip - changeset: 5:5601fb93a350 - tag: tip - parent: 1:7c3bad9141dc - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add new_3_c - + 5:5601fb93a350 (draft) [tip ] add new_3_c $ hg log -r 6 abort: unknown revision '6'! [255] @@ -222,27 +177,13 @@ $ hg --hidden phase --public 2 $ hg log -G - @ changeset: 5:5601fb93a350 - | tag: tip - | parent: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add new_3_c + @ 5:5601fb93a350 (draft) [tip ] add new_3_c | - | o changeset: 2:245bde4270cd - |/ user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add original_c + | o 2:245bde4270cd (public) [ ] add original_c + |/ + o 1:7c3bad9141dc (public) [ ] add b | - o changeset: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add b - | - o changeset: 0:1f0dee641bb7 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add a + o 0:1f0dee641bb7 (public) [ ] add a And that bumped changeset are detected @@ -253,13 +194,7 @@ the public changeset $ hg log --hidden -r 'bumped()' - changeset: 5:5601fb93a350 - tag: tip - parent: 1:7c3bad9141dc - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add new_3_c - + 5:5601fb93a350 (draft) [tip ] add new_3_c And that we can't push bumped changeset @@ -289,27 +224,13 @@ $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` $ hg log -r 'bumped()' $ hg log -G - @ changeset: 6:6f9641995072 - | tag: tip - | parent: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add n3w_3_c + @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | - | o changeset: 2:245bde4270cd - |/ user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add original_c + | o 2:245bde4270cd (public) [ ] add original_c + |/ + o 1:7c3bad9141dc (public) [ ] add b | - o changeset: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add b - | - o changeset: 0:1f0dee641bb7 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add a + o 0:1f0dee641bb7 (public) [ ] add a @@ -328,28 +249,10 @@ $ cd tmpc $ hg incoming ../tmpb comparing with ../tmpb - changeset: 0:1f0dee641bb7 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add a - - changeset: 1:7c3bad9141dc - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add b - - changeset: 2:245bde4270cd - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add original_c - - changeset: 6:6f9641995072 - tag: tip - parent: 1:7c3bad9141dc - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add n3w_3_c - + 0:1f0dee641bb7 (public) [ ] add a + 1:7c3bad9141dc (public) [ ] add b + 2:245bde4270cd (public) [ ] add original_c + 6:6f9641995072 (draft) [tip ] add n3w_3_c Try to pull markers (extinct changeset are excluded but marker are pushed) @@ -426,45 +329,19 @@ updating to branch default 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg -R clone-dest log -G --hidden - @ changeset: 6:6f9641995072 - | tag: tip - | parent: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add n3w_3_c - | - | x changeset: 5:5601fb93a350 - |/ parent: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add new_3_c - | - | x changeset: 4:ca819180edb9 - |/ parent: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add new_2_c + @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | - | x changeset: 3:cdbce2fbb163 - |/ parent: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add new_c + | x 5:5601fb93a350 (draft) [ ] add new_3_c + |/ + | x 4:ca819180edb9 (draft) [ ] add new_2_c + |/ + | x 3:cdbce2fbb163 (draft) [ ] add new_c + |/ + | o 2:245bde4270cd (public) [ ] add original_c + |/ + o 1:7c3bad9141dc (public) [ ] add b | - | o changeset: 2:245bde4270cd - |/ user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add original_c - | - o changeset: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add b - | - o changeset: 0:1f0dee641bb7 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add a + o 0:1f0dee641bb7 (public) [ ] add a $ hg -R clone-dest debugobsolete 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'} @@ -519,27 +396,13 @@ $ hg log -G - o changeset: 3:6f9641995072 - | tag: tip - | parent: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add n3w_3_c + o 3:6f9641995072 (draft) [tip ] add n3w_3_c | - | o changeset: 2:245bde4270cd - |/ user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add original_c + | o 2:245bde4270cd (public) [ ] add original_c + |/ + o 1:7c3bad9141dc (public) [ ] add b | - o changeset: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add b - | - o changeset: 0:1f0dee641bb7 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add a + o 0:1f0dee641bb7 (public) [ ] add a $ hg up 'desc("n3w_3_c")' 3 files updated, 0 files merged, 0 files removed, 0 files unresolved @@ -547,38 +410,17 @@ $ mkcommit original_e $ hg debugobsolete `getid original_d` -d '0 0' $ hg log -r 'obsolete()' - changeset: 4:94b33453f93b - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add original_d - + 4:94b33453f93b (draft) [ ] add original_d $ hg log -G -r '::unstable()' - @ changeset: 5:cda648ca50f5 - | tag: tip - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add original_e + @ 5:cda648ca50f5 (draft) [tip ] add original_e + | + x 4:94b33453f93b (draft) [ ] add original_d | - x changeset: 4:94b33453f93b - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add original_d + o 3:6f9641995072 (draft) [ ] add n3w_3_c | - o changeset: 3:6f9641995072 - | parent: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add n3w_3_c + o 1:7c3bad9141dc (public) [ ] add b | - o changeset: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add b - | - o changeset: 0:1f0dee641bb7 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add a + o 0:1f0dee641bb7 (public) [ ] add a refuse to push obsolete changeset @@ -607,38 +449,12 @@ $ hg out ../tmpf comparing with ../tmpf searching for changes - changeset: 0:1f0dee641bb7 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add a - - changeset: 1:7c3bad9141dc - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add b - - changeset: 2:245bde4270cd - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add original_c - - changeset: 3:6f9641995072 - parent: 1:7c3bad9141dc - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add n3w_3_c - - changeset: 4:94b33453f93b - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add original_d - - changeset: 5:cda648ca50f5 - tag: tip - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add original_e - + 0:1f0dee641bb7 (public) [ ] add a + 1:7c3bad9141dc (public) [ ] add b + 2:245bde4270cd (public) [ ] add original_c + 3:6f9641995072 (draft) [ ] add n3w_3_c + 4:94b33453f93b (draft) [ ] add original_d + 5:cda648ca50f5 (draft) [tip ] add original_e $ hg push ../tmpf -f # -f because be push unstable too pushing to ../tmpf searching for changes @@ -658,37 +474,17 @@ Do not warn about new head when the new head is a successors of a remote one $ hg log -G - @ changeset: 5:cda648ca50f5 - | tag: tip - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add original_e + @ 5:cda648ca50f5 (draft) [tip ] add original_e | - x changeset: 4:94b33453f93b - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add original_d + x 4:94b33453f93b (draft) [ ] add original_d + | + o 3:6f9641995072 (draft) [ ] add n3w_3_c | - o changeset: 3:6f9641995072 - | parent: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add n3w_3_c + | o 2:245bde4270cd (public) [ ] add original_c + |/ + o 1:7c3bad9141dc (public) [ ] add b | - | o changeset: 2:245bde4270cd - |/ user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add original_c - | - o changeset: 1:7c3bad9141dc - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add b - | - o changeset: 0:1f0dee641bb7 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add a + o 0:1f0dee641bb7 (public) [ ] add a $ hg up -q 'desc(n3w_3_c)' $ mkcommit obsolete_e @@ -697,13 +493,7 @@ $ hg outgoing ../tmpf # parasite hg outgoing testin comparing with ../tmpf searching for changes - changeset: 6:3de5eca88c00 - tag: tip - parent: 3:6f9641995072 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add obsolete_e - + 6:3de5eca88c00 (draft) [tip ] add obsolete_e $ hg push ../tmpf pushing to ../tmpf searching for changes @@ -773,13 +563,7 @@ $ echo "obs=!" >> $HGRCPATH $ hg log -r tip obsolete feature not enabled but 68 markers found! - changeset: 68:c15e9edfca13 - tag: tip - parent: 7:50c51b361e60 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: add celestine - + 68:c15e9edfca13 (draft) [tip ] add celestine reenable for later test @@ -805,40 +589,19 @@ $ hg ci --amend $ cd ../other-issue3805 $ hg log -G - @ changeset: 0:193e9254ce7e - tag: tip - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: A + @ 0:193e9254ce7e (draft) [tip ] A $ hg log -G -R ../repo-issue3805 - @ changeset: 2:3816541e5485 - tag: tip - parent: -1:000000000000 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: A + @ 2:3816541e5485 (draft) [tip ] A $ hg incoming comparing with $TESTTMP/tmpe/repo-issue3805 (glob) searching for changes - changeset: 2:3816541e5485 - tag: tip - parent: -1:000000000000 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: A - + 2:3816541e5485 (draft) [tip ] A $ hg incoming --bundle ../issue3805.hg comparing with $TESTTMP/tmpe/repo-issue3805 (glob) searching for changes - changeset: 2:3816541e5485 - tag: tip - parent: -1:000000000000 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: A - + 2:3816541e5485 (draft) [tip ] A $ hg outgoing comparing with $TESTTMP/tmpe/repo-issue3805 (glob) searching for changes @@ -853,13 +616,7 @@ $ hg incoming http://localhost:$HGPORT comparing with http://localhost:$HGPORT/ searching for changes - changeset: 1:3816541e5485 - tag: tip - parent: -1:000000000000 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: A - + 1:3816541e5485 (public) [tip ] A $ hg outgoing http://localhost:$HGPORT comparing with http://localhost:$HGPORT/ searching for changes @@ -894,18 +651,9 @@ $ hg tag -l visible -r 0 --hidden $ hg log -G - @ changeset: 2:3816541e5485 - tag: tip - parent: -1:000000000000 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: A + @ 2:3816541e5485 (draft) [tip ] A - x changeset: 0:193e9254ce7e - tag: visible - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: A + x 0:193e9254ce7e (draft) [visible ] A Test that removing a local tag does not cause some commands to fail diff -r aca137619a45 -r 6be1e1dbe6a0 tests/test-run-tests.t --- a/tests/test-run-tests.t Fri Aug 01 13:09:06 2014 -0500 +++ b/tests/test-run-tests.t Mon Aug 04 14:32:34 2014 -0500 @@ -201,3 +201,23 @@ # Ran 2 tests, 0 skipped, 0 warned, 1 failed. python hash seed: * (glob) [1] + +test for --time +================== + + $ $TESTDIR/run-tests.py --with-hg=`which hg` test-success.t --time + . + # Ran 1 tests, 0 skipped, 0 warned, 0 failed. + # Producing time report + cuser csys real Test + \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) + +test for --time with --job enabled +==================================== + + $ $TESTDIR/run-tests.py --with-hg=`which hg` test-success.t --time --jobs 2 + . + # Ran 1 tests, 0 skipped, 0 warned, 0 failed. + # Producing time report + cuser csys real Test + \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re)