##// END OF EJS Templates
merge with crew
Benoit Boissinot -
r7135:06ca0338 merge default
parent child Browse files
Show More
@@ -5,7 +5,7 b''
5 #
5 #
6 # This software may be used and distributed according to the terms
6 # This software may be used and distributed according to the terms
7 # of the GNU General Public License, incorporated herein by reference.
7 # of the GNU General Public License, incorporated herein by reference.
8 '''allow graphing the number of lines (or count of revisions) grouped by template'''
8 '''command to show certain statistics about revision history'''
9
9
10 from mercurial.i18n import _
10 from mercurial.i18n import _
11 from mercurial import patch, cmdutil, util, templater
11 from mercurial import patch, cmdutil, util, templater
@@ -180,5 +180,5 b' cmdtable = {'
180 ('s', 'sort', False, _('sort by key (default: sort by count)')),
180 ('s', 'sort', False, _('sort by key (default: sort by count)')),
181 ('', 'aliases', '', _('file with email aliases')),
181 ('', 'aliases', '', _('file with email aliases')),
182 ('', 'progress', None, _('show progress'))],
182 ('', 'progress', None, _('show progress'))],
183 _("hg stats [-d DATE] [-r REV] [--aliases FILE] [--progress] [FILE]")),
183 _("hg churn [-d DATE] [-r REV] [--aliases FILE] [--progress] [FILE]")),
184 }
184 }
@@ -1,4 +1,4 b''
1 """a mercurial extension for syntax highlighting in hgweb
1 """syntax highlighting in hgweb, based on Pygments
2
2
3 It depends on the pygments syntax highlighting library:
3 It depends on the pygments syntax highlighting library:
4 http://pygments.org/
4 http://pygments.org/
@@ -4,66 +4,65 b''
4 #
4 #
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7 #
7
8 # hook extension to email notifications to people when changesets are
8 '''hook extension to email notifications on commits/pushes
9 # committed to a repo they subscribe to.
9
10 #
10 Subscriptions can be managed through hgrc. Default mode is to print
11 # default mode is to print messages to stdout, for testing and
11 messages to stdout, for testing and configuring.
12 # configuring.
12
13 #
13 To use, configure notify extension and enable in hgrc like this:
14 # to use, configure notify extension and enable in hgrc like this:
14
15 #
15 [extensions]
16 # [extensions]
16 hgext.notify =
17 # hgext.notify =
17
18 #
18 [hooks]
19 # [hooks]
19 # one email for each incoming changeset
20 # # one email for each incoming changeset
20 incoming.notify = python:hgext.notify.hook
21 # incoming.notify = python:hgext.notify.hook
21 # batch emails when many changesets incoming at one time
22 # # batch emails when many changesets incoming at one time
22 changegroup.notify = python:hgext.notify.hook
23 # changegroup.notify = python:hgext.notify.hook
23
24 #
24 [notify]
25 # [notify]
25 # config items go in here
26 # # config items go in here
26
27 #
27 config items:
28 # config items:
28
29 #
29 REQUIRED:
30 # REQUIRED:
30 config = /path/to/file # file containing subscriptions
31 # config = /path/to/file # file containing subscriptions
31
32 #
32 OPTIONAL:
33 # OPTIONAL:
33 test = True # print messages to stdout for testing
34 # test = True # print messages to stdout for testing
34 strip = 3 # number of slashes to strip for url paths
35 # strip = 3 # number of slashes to strip for url paths
35 domain = example.com # domain to use if committer missing domain
36 # domain = example.com # domain to use if committer missing domain
36 style = ... # style file to use when formatting email
37 # style = ... # style file to use when formatting email
37 template = ... # template to use when formatting email
38 # template = ... # template to use when formatting email
38 incoming = ... # template to use when run as incoming hook
39 # incoming = ... # template to use when run as incoming hook
39 changegroup = ... # template when run as changegroup hook
40 # changegroup = ... # template when run as changegroup hook
40 maxdiff = 300 # max lines of diffs to include (0=none, -1=all)
41 # maxdiff = 300 # max lines of diffs to include (0=none, -1=all)
41 maxsubject = 67 # truncate subject line longer than this
42 # maxsubject = 67 # truncate subject line longer than this
42 diffstat = True # add a diffstat before the diff content
43 # diffstat = True # add a diffstat before the diff content
43 sources = serve # notify if source of incoming changes in this list
44 # sources = serve # notify if source of incoming changes in this list
44 # (serve == ssh or http, push, pull, bundle)
45 # # (serve == ssh or http, push, pull, bundle)
45 [email]
46 # [email]
46 from = user@host.com # email address to send as if none given
47 # from = user@host.com # email address to send as if none given
47 [web]
48 # [web]
48 baseurl = http://hgserver/... # root of hg web site for browsing commits
49 # baseurl = http://hgserver/... # root of hg web site for browsing commits
49
50 #
50 notify config file has same format as regular hgrc. it has two
51 # notify config file has same format as regular hgrc. it has two
51 sections so you can express subscriptions in whatever way is handier
52 # sections so you can express subscriptions in whatever way is handier
52 for you.
53 # for you.
53
54 #
54 [usersubs]
55 # [usersubs]
55 # key is subscriber email, value is ","-separated list of glob patterns
56 # # key is subscriber email, value is ","-separated list of glob patterns
56 user@host = pattern
57 # user@host = pattern
57
58 #
58 [reposubs]
59 # [reposubs]
59 # key is glob pattern, value is ","-separated list of subscriber emails
60 # # key is glob pattern, value is ","-separated list of subscriber emails
60 pattern = user@host
61 # pattern = user@host
61
62 #
62 glob patterns are matched against path to repo root.
63 # glob patterns are matched against path to repo root.
63
64 #
64 if you like, you can put notify config file in repo that users can
65 # if you like, you can put notify config file in repo that users can
65 push changes to, they can manage their own subscriptions.'''
66 # push changes to, they can manage their own subscriptions.
67
66
68 from mercurial.i18n import _
67 from mercurial.i18n import _
69 from mercurial.node import bin, short
68 from mercurial.node import bin, short
@@ -5,7 +5,7 b''
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 ''' Rebasing feature
8 '''move sets of revisions to a different ancestor
9
9
10 This extension lets you rebase changesets in an existing Mercurial repository.
10 This extension lets you rebase changesets in an existing Mercurial repository.
11
11
@@ -105,6 +105,8 b' def rebase(ui, repo, **opts):'
105
105
106 clearstatus(repo)
106 clearstatus(repo)
107 ui.status(_("rebase completed\n"))
107 ui.status(_("rebase completed\n"))
108 if os.path.exists(repo.sjoin('undo')):
109 util.unlink(repo.sjoin('undo'))
108 if skipped:
110 if skipped:
109 ui.note(_("%d revisions have been skipped\n") % len(skipped))
111 ui.note(_("%d revisions have been skipped\n") % len(skipped))
110 finally:
112 finally:
@@ -94,12 +94,12 b' def annotate(ui, repo, *pats, **opts):'
94 ('follow', lambda x: x[0].path()),
94 ('follow', lambda x: x[0].path()),
95 ]
95 ]
96
96
97 if (not opts['user'] and not opts['changeset'] and not opts['date']
97 if (not opts.get('user') and not opts.get('changeset') and not opts.get('date')
98 and not opts['follow']):
98 and not opts.get('follow')):
99 opts['number'] = 1
99 opts['number'] = 1
100
100
101 linenumber = opts.get('line_number') is not None
101 linenumber = opts.get('line_number') is not None
102 if (linenumber and (not opts['changeset']) and (not opts['number'])):
102 if (linenumber and (not opts.get('changeset')) and (not opts.get('number'))):
103 raise util.Abort(_('at least one of -n/-c is required for -l'))
103 raise util.Abort(_('at least one of -n/-c is required for -l'))
104
104
105 funcmap = [func for op, func in opmap if opts.get(op)]
105 funcmap = [func for op, func in opmap if opts.get(op)]
@@ -107,12 +107,12 b' def annotate(ui, repo, *pats, **opts):'
107 lastfunc = funcmap[-1]
107 lastfunc = funcmap[-1]
108 funcmap[-1] = lambda x: "%s:%s" % (lastfunc(x), x[1])
108 funcmap[-1] = lambda x: "%s:%s" % (lastfunc(x), x[1])
109
109
110 ctx = repo[opts['rev']]
110 ctx = repo[opts.get('rev')]
111
111
112 m = cmdutil.match(repo, pats, opts)
112 m = cmdutil.match(repo, pats, opts)
113 for abs in ctx.walk(m):
113 for abs in ctx.walk(m):
114 fctx = ctx[abs]
114 fctx = ctx[abs]
115 if not opts['text'] and util.binary(fctx.data()):
115 if not opts.get('text') and util.binary(fctx.data()):
116 ui.write(_("%s: binary file\n") % ((pats and m.rel(abs)) or abs))
116 ui.write(_("%s: binary file\n") % ((pats and m.rel(abs)) or abs))
117 continue
117 continue
118
118
@@ -154,7 +154,7 b' def archive(ui, repo, dest, **opts):'
154 The default is the basename of the archive, with suffixes removed.
154 The default is the basename of the archive, with suffixes removed.
155 '''
155 '''
156
156
157 ctx = repo[opts['rev']]
157 ctx = repo[opts.get('rev')]
158 if not ctx:
158 if not ctx:
159 raise util.Abort(_('repository has no revisions'))
159 raise util.Abort(_('repository has no revisions'))
160 node = ctx.node()
160 node = ctx.node()
@@ -163,14 +163,14 b' def archive(ui, repo, dest, **opts):'
163 raise util.Abort(_('repository root cannot be destination'))
163 raise util.Abort(_('repository root cannot be destination'))
164 matchfn = cmdutil.match(repo, [], opts)
164 matchfn = cmdutil.match(repo, [], opts)
165 kind = opts.get('type') or 'files'
165 kind = opts.get('type') or 'files'
166 prefix = opts['prefix']
166 prefix = opts.get('prefix')
167 if dest == '-':
167 if dest == '-':
168 if kind == 'files':
168 if kind == 'files':
169 raise util.Abort(_('cannot archive plain files to stdout'))
169 raise util.Abort(_('cannot archive plain files to stdout'))
170 dest = sys.stdout
170 dest = sys.stdout
171 if not prefix: prefix = os.path.basename(repo.root) + '-%h'
171 if not prefix: prefix = os.path.basename(repo.root) + '-%h'
172 prefix = cmdutil.make_filename(repo, prefix, node)
172 prefix = cmdutil.make_filename(repo, prefix, node)
173 archival.archive(repo, dest, node, kind, not opts['no_decode'],
173 archival.archive(repo, dest, node, kind, not opts.get('no_decode'),
174 matchfn, prefix)
174 matchfn, prefix)
175
175
176 def backout(ui, repo, node=None, rev=None, **opts):
176 def backout(ui, repo, node=None, rev=None, **opts):
@@ -216,7 +216,7 b' def backout(ui, repo, node=None, rev=Non'
216 if p1 == nullid:
216 if p1 == nullid:
217 raise util.Abort(_('cannot back out a change with no parents'))
217 raise util.Abort(_('cannot back out a change with no parents'))
218 if p2 != nullid:
218 if p2 != nullid:
219 if not opts['parent']:
219 if not opts.get('parent'):
220 raise util.Abort(_('cannot back out a merge changeset without '
220 raise util.Abort(_('cannot back out a merge changeset without '
221 '--parent'))
221 '--parent'))
222 p = repo.lookup(opts['parent'])
222 p = repo.lookup(opts['parent'])
@@ -225,7 +225,7 b' def backout(ui, repo, node=None, rev=Non'
225 (short(p), short(node)))
225 (short(p), short(node)))
226 parent = p
226 parent = p
227 else:
227 else:
228 if opts['parent']:
228 if opts.get('parent'):
229 raise util.Abort(_('cannot use --parent on non-merge changeset'))
229 raise util.Abort(_('cannot use --parent on non-merge changeset'))
230 parent = p1
230 parent = p1
231
231
@@ -251,7 +251,7 b' def backout(ui, repo, node=None, rev=Non'
251 (nice(repo.changelog.tip()), nice(node)))
251 (nice(repo.changelog.tip()), nice(node)))
252 if op1 != node:
252 if op1 != node:
253 hg.clean(repo, op1, show_stats=False)
253 hg.clean(repo, op1, show_stats=False)
254 if opts['merge']:
254 if opts.get('merge'):
255 ui.status(_('merging with changeset %s\n') % nice(repo.changelog.tip()))
255 ui.status(_('merging with changeset %s\n') % nice(repo.changelog.tip()))
256 hg.merge(repo, hex(repo.changelog.tip()))
256 hg.merge(repo, hex(repo.changelog.tip()))
257 else:
257 else:
@@ -478,7 +478,7 b' def bundle(ui, repo, fname, dest=None, *'
478 dest, revs, checkout = hg.parseurl(
478 dest, revs, checkout = hg.parseurl(
479 ui.expandpath(dest or 'default-push', dest or 'default'), revs)
479 ui.expandpath(dest or 'default-push', dest or 'default'), revs)
480 other = hg.repository(ui, dest)
480 other = hg.repository(ui, dest)
481 o = repo.findoutgoing(other, force=opts['force'])
481 o = repo.findoutgoing(other, force=opts.get('force'))
482
482
483 if revs:
483 if revs:
484 cg = repo.changegroupsubset(o, revs, 'bundle')
484 cg = repo.changegroupsubset(o, revs, 'bundle')
@@ -508,11 +508,11 b' def cat(ui, repo, file1, *pats, **opts):'
508 %d dirname of file being printed, or '.' if in repo root
508 %d dirname of file being printed, or '.' if in repo root
509 %p root-relative path name of file being printed
509 %p root-relative path name of file being printed
510 """
510 """
511 ctx = repo[opts['rev']]
511 ctx = repo[opts.get('rev')]
512 err = 1
512 err = 1
513 m = cmdutil.match(repo, (file1,) + pats, opts)
513 m = cmdutil.match(repo, (file1,) + pats, opts)
514 for abs in ctx.walk(m):
514 for abs in ctx.walk(m):
515 fp = cmdutil.make_file(repo, opts['output'], ctx.node(), pathname=abs)
515 fp = cmdutil.make_file(repo, opts.get('output'), ctx.node(), pathname=abs)
516 data = ctx[abs].data()
516 data = ctx[abs].data()
517 if opts.get('decode'):
517 if opts.get('decode'):
518 data = repo.wwritedata(abs, data)
518 data = repo.wwritedata(abs, data)
@@ -566,10 +566,10 b' def clone(ui, source, dest=None, **opts)'
566 """
566 """
567 cmdutil.setremoteconfig(ui, opts)
567 cmdutil.setremoteconfig(ui, opts)
568 hg.clone(ui, source, dest,
568 hg.clone(ui, source, dest,
569 pull=opts['pull'],
569 pull=opts.get('pull'),
570 stream=opts['uncompressed'],
570 stream=opts.get('uncompressed'),
571 rev=opts['rev'],
571 rev=opts.get('rev'),
572 update=not opts['noupdate'])
572 update=not opts.get('noupdate'))
573
573
574 def commit(ui, repo, *pats, **opts):
574 def commit(ui, repo, *pats, **opts):
575 """commit the specified files or all outstanding changes
575 """commit the specified files or all outstanding changes
@@ -588,7 +588,7 b' def commit(ui, repo, *pats, **opts):'
588 See 'hg help dates' for a list of formats valid for -d/--date.
588 See 'hg help dates' for a list of formats valid for -d/--date.
589 """
589 """
590 def commitfunc(ui, repo, message, match, opts):
590 def commitfunc(ui, repo, message, match, opts):
591 return repo.commit(match.files(), message, opts['user'], opts['date'],
591 return repo.commit(match.files(), message, opts.get('user'), opts.get('date'),
592 match, force_editor=opts.get('force_editor'))
592 match, force_editor=opts.get('force_editor'))
593
593
594 node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
594 node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
@@ -651,7 +651,7 b' def debugancestor(ui, repo, *args):'
651 def debugcomplete(ui, cmd='', **opts):
651 def debugcomplete(ui, cmd='', **opts):
652 """returns the completion list associated with the given command"""
652 """returns the completion list associated with the given command"""
653
653
654 if opts['options']:
654 if opts.get('options'):
655 options = []
655 options = []
656 otables = [globalopts]
656 otables = [globalopts]
657 if cmd:
657 if cmd:
@@ -981,7 +981,7 b' def diff(ui, repo, *pats, **opts):'
981 it detects as binary. With -a, diff will generate a diff anyway,
981 it detects as binary. With -a, diff will generate a diff anyway,
982 probably with undesirable results.
982 probably with undesirable results.
983 """
983 """
984 node1, node2 = cmdutil.revpair(repo, opts['rev'])
984 node1, node2 = cmdutil.revpair(repo, opts.get('rev'))
985
985
986 m = cmdutil.match(repo, pats, opts)
986 m = cmdutil.match(repo, pats, opts)
987 patch.diff(repo, node1, node2, match=m, opts=patch.diffopts(ui, opts))
987 patch.diff(repo, node1, node2, match=m, opts=patch.diffopts(ui, opts))
@@ -1023,8 +1023,8 b' def export(ui, repo, *changesets, **opts'
1023 ui.note(_('exporting patches:\n'))
1023 ui.note(_('exporting patches:\n'))
1024 else:
1024 else:
1025 ui.note(_('exporting patch:\n'))
1025 ui.note(_('exporting patch:\n'))
1026 patch.export(repo, revs, template=opts['output'],
1026 patch.export(repo, revs, template=opts.get('output'),
1027 switch_parent=opts['switch_parent'],
1027 switch_parent=opts.get('switch_parent'),
1028 opts=patch.diffopts(ui, opts))
1028 opts=patch.diffopts(ui, opts))
1029
1029
1030 def grep(ui, repo, pattern, *pats, **opts):
1030 def grep(ui, repo, pattern, *pats, **opts):
@@ -1044,7 +1044,7 b' def grep(ui, repo, pattern, *pats, **opt'
1044 use the --all flag.
1044 use the --all flag.
1045 """
1045 """
1046 reflags = 0
1046 reflags = 0
1047 if opts['ignore_case']:
1047 if opts.get('ignore_case'):
1048 reflags |= re.I
1048 reflags |= re.I
1049 try:
1049 try:
1050 regexp = re.compile(pattern, reflags)
1050 regexp = re.compile(pattern, reflags)
@@ -1052,7 +1052,7 b' def grep(ui, repo, pattern, *pats, **opt'
1052 ui.warn(_("grep: invalid match pattern: %s\n") % inst)
1052 ui.warn(_("grep: invalid match pattern: %s\n") % inst)
1053 return None
1053 return None
1054 sep, eol = ':', '\n'
1054 sep, eol = ':', '\n'
1055 if opts['print0']:
1055 if opts.get('print0'):
1056 sep = eol = '\0'
1056 sep = eol = '\0'
1057
1057
1058 fcache = {}
1058 fcache = {}
@@ -1118,21 +1118,21 b' def grep(ui, repo, pattern, *pats, **opt'
1118 found = False
1118 found = False
1119 filerevmatches = {}
1119 filerevmatches = {}
1120 r = prev.get(fn, -1)
1120 r = prev.get(fn, -1)
1121 if opts['all']:
1121 if opts.get('all'):
1122 iter = difflinestates(states, prevstates)
1122 iter = difflinestates(states, prevstates)
1123 else:
1123 else:
1124 iter = [('', l) for l in prevstates]
1124 iter = [('', l) for l in prevstates]
1125 for change, l in iter:
1125 for change, l in iter:
1126 cols = [fn, str(r)]
1126 cols = [fn, str(r)]
1127 if opts['line_number']:
1127 if opts.get('line_number'):
1128 cols.append(str(l.linenum))
1128 cols.append(str(l.linenum))
1129 if opts['all']:
1129 if opts.get('all'):
1130 cols.append(change)
1130 cols.append(change)
1131 if opts['user']:
1131 if opts.get('user'):
1132 cols.append(ui.shortuser(get(r)[1]))
1132 cols.append(ui.shortuser(get(r)[1]))
1133 if opts.get('date'):
1133 if opts.get('date'):
1134 cols.append(datefunc(get(r)[2]))
1134 cols.append(datefunc(get(r)[2]))
1135 if opts['files_with_matches']:
1135 if opts.get('files_with_matches'):
1136 c = (fn, r)
1136 c = (fn, r)
1137 if c in filerevmatches:
1137 if c in filerevmatches:
1138 continue
1138 continue
@@ -1177,7 +1177,7 b' def grep(ui, repo, pattern, *pats, **opt'
1177 if fn in prev or fstate[fn]:
1177 if fn in prev or fstate[fn]:
1178 r = display(fn, rev, m, fstate[fn])
1178 r = display(fn, rev, m, fstate[fn])
1179 found = found or r
1179 found = found or r
1180 if r and not opts['all']:
1180 if r and not opts.get('all'):
1181 skip[fn] = True
1181 skip[fn] = True
1182 if copy:
1182 if copy:
1183 skip[copy] = True
1183 skip[copy] = True
@@ -1210,7 +1210,7 b' def heads(ui, repo, *branchrevs, **opts)'
1210 no child changesets with that tag. They are usually where
1210 no child changesets with that tag. They are usually where
1211 development on the given branch takes place.
1211 development on the given branch takes place.
1212 """
1212 """
1213 if opts['rev']:
1213 if opts.get('rev'):
1214 start = repo.lookup(opts['rev'])
1214 start = repo.lookup(opts['rev'])
1215 else:
1215 else:
1216 start = None
1216 start = None
@@ -1230,10 +1230,10 b' def heads(ui, repo, *branchrevs, **opts)'
1230 if branch != branchrev:
1230 if branch != branchrev:
1231 ui.warn(_("no changes on branch %s containing %s are "
1231 ui.warn(_("no changes on branch %s containing %s are "
1232 "reachable from %s\n")
1232 "reachable from %s\n")
1233 % (branch, branchrev, opts['rev']))
1233 % (branch, branchrev, opts.get('rev')))
1234 else:
1234 else:
1235 ui.warn(_("no changes on branch %s are reachable from %s\n")
1235 ui.warn(_("no changes on branch %s are reachable from %s\n")
1236 % (branch, opts['rev']))
1236 % (branch, opts.get('rev')))
1237 heads.extend(bheads)
1237 heads.extend(bheads)
1238 if not heads:
1238 if not heads:
1239 return 1
1239 return 1
@@ -1310,6 +1310,8 b' def help_(ui, name=None, with_version=Fa'
1310 f = c.split("|", 1)[0]
1310 f = c.split("|", 1)[0]
1311 if select and not select(f):
1311 if select and not select(f):
1312 continue
1312 continue
1313 if select is None and e[0].__module__ != __name__:
1314 continue
1313 if name == "shortlist" and not f.startswith("^"):
1315 if name == "shortlist" and not f.startswith("^"):
1314 continue
1316 continue
1315 f = f.lstrip("^")
1317 f = f.lstrip("^")
@@ -1335,6 +1337,19 b' def help_(ui, name=None, with_version=Fa'
1335 else:
1337 else:
1336 ui.write(' %-*s %s\n' % (m, f, h[f]))
1338 ui.write(' %-*s %s\n' % (m, f, h[f]))
1337
1339
1340 exts = list(extensions.extensions())
1341 if exts:
1342 ui.write(_('\nenabled extensions:\n\n'))
1343 maxlength = 0
1344 exthelps = []
1345 for ename, ext in exts:
1346 doc = (ext.__doc__ or _('(no help text available)'))
1347 ename = ename.split('.')[-1]
1348 maxlength = max(len(ename), maxlength)
1349 exthelps.append((ename, doc.splitlines(0)[0].strip()))
1350 for ename, text in exthelps:
1351 ui.write(_(' %s %s\n') % (ename.ljust(maxlength), text))
1352
1338 if not ui.quiet:
1353 if not ui.quiet:
1339 addglobalopts(True)
1354 addglobalopts(True)
1340
1355
@@ -1538,7 +1553,7 b' def import_(ui, repo, patch1, *patches, '
1538 if date:
1553 if date:
1539 opts['date'] = util.parsedate(date)
1554 opts['date'] = util.parsedate(date)
1540
1555
1541 if opts.get('exact') or not opts['force']:
1556 if opts.get('exact') or not opts.get('force'):
1542 cmdutil.bail_if_changed(repo)
1557 cmdutil.bail_if_changed(repo)
1543
1558
1544 d = opts["base"]
1559 d = opts["base"]
@@ -1633,7 +1648,7 b' def incoming(ui, repo, source="default",'
1633 See pull for valid source format details.
1648 See pull for valid source format details.
1634 """
1649 """
1635 limit = cmdutil.loglimit(opts)
1650 limit = cmdutil.loglimit(opts)
1636 source, revs, checkout = hg.parseurl(ui.expandpath(source), opts['rev'])
1651 source, revs, checkout = hg.parseurl(ui.expandpath(source), opts.get('rev'))
1637 cmdutil.setremoteconfig(ui, opts)
1652 cmdutil.setremoteconfig(ui, opts)
1638
1653
1639 other = hg.repository(ui, source)
1654 other = hg.repository(ui, source)
@@ -1668,7 +1683,7 b' def incoming(ui, repo, source="default",'
1668 other = bundlerepo.bundlerepository(ui, repo.root, fname)
1683 other = bundlerepo.bundlerepository(ui, repo.root, fname)
1669
1684
1670 o = other.changelog.nodesbetween(incoming, revs)[0]
1685 o = other.changelog.nodesbetween(incoming, revs)[0]
1671 if opts['newest_first']:
1686 if opts.get('newest_first'):
1672 o.reverse()
1687 o.reverse()
1673 displayer = cmdutil.show_changeset(ui, other, opts)
1688 displayer = cmdutil.show_changeset(ui, other, opts)
1674 count = 0
1689 count = 0
@@ -1676,7 +1691,7 b' def incoming(ui, repo, source="default",'
1676 if count >= limit:
1691 if count >= limit:
1677 break
1692 break
1678 parents = [p for p in other.changelog.parents(n) if p != nullid]
1693 parents = [p for p in other.changelog.parents(n) if p != nullid]
1679 if opts['no_merges'] and len(parents) == 2:
1694 if opts.get('no_merges') and len(parents) == 2:
1680 continue
1695 continue
1681 count += 1
1696 count += 1
1682 displayer.show(changenode=n)
1697 displayer.show(changenode=n)
@@ -1719,7 +1734,7 b' def locate(ui, repo, *pats, **opts):'
1719 This will avoid the problem of "xargs" treating single filenames
1734 This will avoid the problem of "xargs" treating single filenames
1720 that contain white space as multiple filenames.
1735 that contain white space as multiple filenames.
1721 """
1736 """
1722 end = opts['print0'] and '\0' or '\n'
1737 end = opts.get('print0') and '\0' or '\n'
1723 rev = opts.get('rev') or None
1738 rev = opts.get('rev') or None
1724
1739
1725 ret = 1
1740 ret = 1
@@ -1728,7 +1743,7 b' def locate(ui, repo, *pats, **opts):'
1728 for abs in repo[rev].walk(m):
1743 for abs in repo[rev].walk(m):
1729 if not rev and abs not in repo.dirstate:
1744 if not rev and abs not in repo.dirstate:
1730 continue
1745 continue
1731 if opts['fullpath']:
1746 if opts.get('fullpath'):
1732 ui.write(os.path.join(repo.root, abs), end)
1747 ui.write(os.path.join(repo.root, abs), end)
1733 else:
1748 else:
1734 ui.write(((pats and m.rel(abs)) or abs), end)
1749 ui.write(((pats and m.rel(abs)) or abs), end)
@@ -1772,8 +1787,8 b' def log(ui, repo, *pats, **opts):'
1772 limit = cmdutil.loglimit(opts)
1787 limit = cmdutil.loglimit(opts)
1773 count = 0
1788 count = 0
1774
1789
1775 if opts['copies'] and opts['rev']:
1790 if opts.get('copies') and opts.get('rev'):
1776 endrev = max(cmdutil.revrange(repo, opts['rev'])) + 1
1791 endrev = max(cmdutil.revrange(repo, opts.get('rev'))) + 1
1777 else:
1792 else:
1778 endrev = len(repo)
1793 endrev = len(repo)
1779 rcache = {}
1794 rcache = {}
@@ -1812,7 +1827,7 b' def log(ui, repo, *pats, **opts):'
1812 if opts["date"]:
1827 if opts["date"]:
1813 df = util.matchdate(opts["date"])
1828 df = util.matchdate(opts["date"])
1814
1829
1815 only_branches = opts['only_branch']
1830 only_branches = opts.get('only_branch')
1816
1831
1817 displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn)
1832 displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn)
1818 for st, rev, fns in changeiter:
1833 for st, rev, fns in changeiter:
@@ -1820,9 +1835,9 b' def log(ui, repo, *pats, **opts):'
1820 changenode = repo.changelog.node(rev)
1835 changenode = repo.changelog.node(rev)
1821 parents = [p for p in repo.changelog.parentrevs(rev)
1836 parents = [p for p in repo.changelog.parentrevs(rev)
1822 if p != nullrev]
1837 if p != nullrev]
1823 if opts['no_merges'] and len(parents) == 2:
1838 if opts.get('no_merges') and len(parents) == 2:
1824 continue
1839 continue
1825 if opts['only_merges'] and len(parents) != 2:
1840 if opts.get('only_merges') and len(parents) != 2:
1826 continue
1841 continue
1827
1842
1828 if only_branches:
1843 if only_branches:
@@ -1835,7 +1850,7 b' def log(ui, repo, *pats, **opts):'
1835 if not df(changes[2][0]):
1850 if not df(changes[2][0]):
1836 continue
1851 continue
1837
1852
1838 if opts['keyword']:
1853 if opts.get('keyword'):
1839 changes = get(rev)
1854 changes = get(rev)
1840 miss = 0
1855 miss = 0
1841 for k in [kw.lower() for kw in opts['keyword']]:
1856 for k in [kw.lower() for kw in opts['keyword']]:
@@ -1943,19 +1958,19 b' def outgoing(ui, repo, dest=None, **opts'
1943 """
1958 """
1944 limit = cmdutil.loglimit(opts)
1959 limit = cmdutil.loglimit(opts)
1945 dest, revs, checkout = hg.parseurl(
1960 dest, revs, checkout = hg.parseurl(
1946 ui.expandpath(dest or 'default-push', dest or 'default'), opts['rev'])
1961 ui.expandpath(dest or 'default-push', dest or 'default'), opts.get('rev'))
1947 cmdutil.setremoteconfig(ui, opts)
1962 cmdutil.setremoteconfig(ui, opts)
1948 if revs:
1963 if revs:
1949 revs = [repo.lookup(rev) for rev in revs]
1964 revs = [repo.lookup(rev) for rev in revs]
1950
1965
1951 other = hg.repository(ui, dest)
1966 other = hg.repository(ui, dest)
1952 ui.status(_('comparing with %s\n') % util.hidepassword(dest))
1967 ui.status(_('comparing with %s\n') % util.hidepassword(dest))
1953 o = repo.findoutgoing(other, force=opts['force'])
1968 o = repo.findoutgoing(other, force=opts.get('force'))
1954 if not o:
1969 if not o:
1955 ui.status(_("no changes found\n"))
1970 ui.status(_("no changes found\n"))
1956 return 1
1971 return 1
1957 o = repo.changelog.nodesbetween(o, revs)[0]
1972 o = repo.changelog.nodesbetween(o, revs)[0]
1958 if opts['newest_first']:
1973 if opts.get('newest_first'):
1959 o.reverse()
1974 o.reverse()
1960 displayer = cmdutil.show_changeset(ui, repo, opts)
1975 displayer = cmdutil.show_changeset(ui, repo, opts)
1961 count = 0
1976 count = 0
@@ -1963,7 +1978,7 b' def outgoing(ui, repo, dest=None, **opts'
1963 if count >= limit:
1978 if count >= limit:
1964 break
1979 break
1965 parents = [p for p in repo.changelog.parents(n) if p != nullid]
1980 parents = [p for p in repo.changelog.parents(n) if p != nullid]
1966 if opts['no_merges'] and len(parents) == 2:
1981 if opts.get('no_merges') and len(parents) == 2:
1967 continue
1982 continue
1968 count += 1
1983 count += 1
1969 displayer.show(changenode=n)
1984 displayer.show(changenode=n)
@@ -2082,7 +2097,7 b' def pull(ui, repo, source="default", **o'
2082 Alternatively specify "ssh -C" as your ssh command in your hgrc or
2097 Alternatively specify "ssh -C" as your ssh command in your hgrc or
2083 with the --ssh command line option.
2098 with the --ssh command line option.
2084 """
2099 """
2085 source, revs, checkout = hg.parseurl(ui.expandpath(source), opts['rev'])
2100 source, revs, checkout = hg.parseurl(ui.expandpath(source), opts.get('rev'))
2086 cmdutil.setremoteconfig(ui, opts)
2101 cmdutil.setremoteconfig(ui, opts)
2087
2102
2088 other = hg.repository(ui, source)
2103 other = hg.repository(ui, source)
@@ -2095,8 +2110,8 b' def pull(ui, repo, source="default", **o'
2095 "so a rev cannot be specified.")
2110 "so a rev cannot be specified.")
2096 raise util.Abort(error)
2111 raise util.Abort(error)
2097
2112
2098 modheads = repo.pull(other, heads=revs, force=opts['force'])
2113 modheads = repo.pull(other, heads=revs, force=opts.get('force'))
2099 return postincoming(ui, repo, modheads, opts['update'], checkout)
2114 return postincoming(ui, repo, modheads, opts.get('update'), checkout)
2100
2115
2101 def push(ui, repo, dest=None, **opts):
2116 def push(ui, repo, dest=None, **opts):
2102 """push changes to the specified destination
2117 """push changes to the specified destination
@@ -2130,14 +2145,14 b' def push(ui, repo, dest=None, **opts):'
2130 feature is explicitly enabled on the remote Mercurial server.
2145 feature is explicitly enabled on the remote Mercurial server.
2131 """
2146 """
2132 dest, revs, checkout = hg.parseurl(
2147 dest, revs, checkout = hg.parseurl(
2133 ui.expandpath(dest or 'default-push', dest or 'default'), opts['rev'])
2148 ui.expandpath(dest or 'default-push', dest or 'default'), opts.get('rev'))
2134 cmdutil.setremoteconfig(ui, opts)
2149 cmdutil.setremoteconfig(ui, opts)
2135
2150
2136 other = hg.repository(ui, dest)
2151 other = hg.repository(ui, dest)
2137 ui.status(_('pushing to %s\n') % util.hidepassword(dest))
2152 ui.status(_('pushing to %s\n') % util.hidepassword(dest))
2138 if revs:
2153 if revs:
2139 revs = [repo.lookup(rev) for rev in revs]
2154 revs = [repo.lookup(rev) for rev in revs]
2140 r = repo.push(other, opts['force'], revs=revs)
2155 r = repo.push(other, opts.get('force'), revs=revs)
2141 return r == 0
2156 return r == 0
2142
2157
2143 def rawcommit(ui, repo, *pats, **opts):
2158 def rawcommit(ui, repo, *pats, **opts):
@@ -2158,7 +2173,7 b' def rawcommit(ui, repo, *pats, **opts):'
2158 message = cmdutil.logmessage(opts)
2173 message = cmdutil.logmessage(opts)
2159
2174
2160 files = cmdutil.match(repo, pats, opts).files()
2175 files = cmdutil.match(repo, pats, opts).files()
2161 if opts['files']:
2176 if opts.get('files'):
2162 files += open(opts['files']).read().splitlines()
2177 files += open(opts['files']).read().splitlines()
2163
2178
2164 parents = [repo.lookup(p) for p in opts['parent']]
2179 parents = [repo.lookup(p) for p in opts['parent']]
@@ -2327,15 +2342,15 b' def revert(ui, repo, *pats, **opts):'
2327 raise util.Abort(_("you can't specify a revision and a date"))
2342 raise util.Abort(_("you can't specify a revision and a date"))
2328 opts["rev"] = cmdutil.finddate(ui, repo, opts["date"])
2343 opts["rev"] = cmdutil.finddate(ui, repo, opts["date"])
2329
2344
2330 if not pats and not opts['all']:
2345 if not pats and not opts.get('all'):
2331 raise util.Abort(_('no files or directories specified; '
2346 raise util.Abort(_('no files or directories specified; '
2332 'use --all to revert the whole repo'))
2347 'use --all to revert the whole repo'))
2333
2348
2334 parent, p2 = repo.dirstate.parents()
2349 parent, p2 = repo.dirstate.parents()
2335 if not opts['rev'] and p2 != nullid:
2350 if not opts.get('rev') and p2 != nullid:
2336 raise util.Abort(_('uncommitted merge - please provide a '
2351 raise util.Abort(_('uncommitted merge - please provide a '
2337 'specific revision'))
2352 'specific revision'))
2338 ctx = repo[opts['rev']]
2353 ctx = repo[opts.get('rev')]
2339 node = ctx.node()
2354 node = ctx.node()
2340 mf = ctx.manifest()
2355 mf = ctx.manifest()
2341 if node == parent:
2356 if node == parent:
@@ -2417,7 +2432,7 b' def revert(ui, repo, *pats, **opts):'
2417 target = repo.wjoin(abs)
2432 target = repo.wjoin(abs)
2418 def handle(xlist, dobackup):
2433 def handle(xlist, dobackup):
2419 xlist[0].append(abs)
2434 xlist[0].append(abs)
2420 if dobackup and not opts['no_backup'] and util.lexists(target):
2435 if dobackup and not opts.get('no_backup') and util.lexists(target):
2421 bakname = "%s.orig" % rel
2436 bakname = "%s.orig" % rel
2422 ui.note(_('saving current version of %s as %s\n') %
2437 ui.note(_('saving current version of %s as %s\n') %
2423 (rel, bakname))
2438 (rel, bakname))
@@ -2638,11 +2653,11 b' def status(ui, repo, *pats, **opts):'
2638
2653
2639 node1, node2 = cmdutil.revpair(repo, opts.get('rev'))
2654 node1, node2 = cmdutil.revpair(repo, opts.get('rev'))
2640 cwd = (pats and repo.getcwd()) or ''
2655 cwd = (pats and repo.getcwd()) or ''
2641 end = opts['print0'] and '\0' or '\n'
2656 end = opts.get('print0') and '\0' or '\n'
2642 copy = {}
2657 copy = {}
2643 states = 'modified added removed deleted unknown ignored clean'.split()
2658 states = 'modified added removed deleted unknown ignored clean'.split()
2644 show = [k for k in states if opts[k]]
2659 show = [k for k in states if opts[k]]
2645 if opts['all']:
2660 if opts.get('all'):
2646 show += ui.quiet and (states[:4] + ['clean']) or states
2661 show += ui.quiet and (states[:4] + ['clean']) or states
2647 if not show:
2662 if not show:
2648 show = ui.quiet and states[:4] or states[:5]
2663 show = ui.quiet and states[:4] or states[:5]
@@ -2651,7 +2666,7 b' def status(ui, repo, *pats, **opts):'
2651 'ignored' in show, 'clean' in show, 'unknown' in show)
2666 'ignored' in show, 'clean' in show, 'unknown' in show)
2652 changestates = zip(states, 'MAR!?IC', stat)
2667 changestates = zip(states, 'MAR!?IC', stat)
2653
2668
2654 if (opts['all'] or opts['copies']) and not opts['no_status']:
2669 if (opts.get('all') or opts.get('copies')) and not opts.get('no_status'):
2655 ctxn = repo[nullid]
2670 ctxn = repo[nullid]
2656 ctx1 = repo[node1]
2671 ctx1 = repo[node1]
2657 ctx2 = repo[node2]
2672 ctx2 = repo[node2]
@@ -2668,7 +2683,7 b' def status(ui, repo, *pats, **opts):'
2668 for state, char, files in changestates:
2683 for state, char, files in changestates:
2669 if state in show:
2684 if state in show:
2670 format = "%s %%s%s" % (char, end)
2685 format = "%s %%s%s" % (char, end)
2671 if opts['no_status']:
2686 if opts.get('no_status'):
2672 format = "%%s%s" % end
2687 format = "%%s%s" % end
2673
2688
2674 for f in files:
2689 for f in files:
@@ -2704,13 +2719,13 b' def tag(ui, repo, name1, *names, **opts)'
2704 for n in names:
2719 for n in names:
2705 if n in ['tip', '.', 'null']:
2720 if n in ['tip', '.', 'null']:
2706 raise util.Abort(_('the name \'%s\' is reserved') % n)
2721 raise util.Abort(_('the name \'%s\' is reserved') % n)
2707 if opts['rev'] and opts['remove']:
2722 if opts.get('rev') and opts.get('remove'):
2708 raise util.Abort(_("--rev and --remove are incompatible"))
2723 raise util.Abort(_("--rev and --remove are incompatible"))
2709 if opts['rev']:
2724 if opts.get('rev'):
2710 rev_ = opts['rev']
2725 rev_ = opts['rev']
2711 message = opts['message']
2726 message = opts.get('message')
2712 if opts['remove']:
2727 if opts.get('remove'):
2713 expectedtype = opts['local'] and 'local' or 'global'
2728 expectedtype = opts.get('local') and 'local' or 'global'
2714 for n in names:
2729 for n in names:
2715 if not repo.tagtype(n):
2730 if not repo.tagtype(n):
2716 raise util.Abort(_('tag \'%s\' does not exist') % n)
2731 raise util.Abort(_('tag \'%s\' does not exist') % n)
@@ -2720,7 +2735,7 b' def tag(ui, repo, name1, *names, **opts)'
2720 rev_ = nullid
2735 rev_ = nullid
2721 if not message:
2736 if not message:
2722 message = _('Removed tag %s') % ', '.join(names)
2737 message = _('Removed tag %s') % ', '.join(names)
2723 elif not opts['force']:
2738 elif not opts.get('force'):
2724 for n in names:
2739 for n in names:
2725 if n in repo.tags():
2740 if n in repo.tags():
2726 raise util.Abort(_('tag \'%s\' already exists '
2741 raise util.Abort(_('tag \'%s\' already exists '
@@ -2738,7 +2753,7 b' def tag(ui, repo, name1, *names, **opts)'
2738 if date:
2753 if date:
2739 date = util.parsedate(date)
2754 date = util.parsedate(date)
2740
2755
2741 repo.tag(names, r, message, opts['local'], opts['user'], date)
2756 repo.tag(names, r, message, opts.get('local'), opts.get('user'), date)
2742
2757
2743 def tags(ui, repo):
2758 def tags(ui, repo):
2744 """list repository tags
2759 """list repository tags
@@ -2808,7 +2823,7 b' def unbundle(ui, repo, fname1, *fnames, '
2808 finally:
2823 finally:
2809 del lock
2824 del lock
2810
2825
2811 return postincoming(ui, repo, modheads, opts['update'], None)
2826 return postincoming(ui, repo, modheads, opts.get('update'), None)
2812
2827
2813 def update(ui, repo, node=None, rev=None, clean=False, date=None):
2828 def update(ui, repo, node=None, rev=None, clean=False, date=None):
2814 """update working directory
2829 """update working directory
@@ -205,7 +205,7 b' class dirstate(object):'
205 if not st:
205 if not st:
206 return
206 return
207
207
208 p = parsers.parse_dirstate(self._map, self._copymap, st);
208 p = parsers.parse_dirstate(self._map, self._copymap, st)
209 if not self._dirtypl:
209 if not self._dirtypl:
210 self._pl = p
210 self._pl = p
211
211
@@ -137,6 +137,7 b' quit:'
137 /* msvc 6.0 has problems */
137 /* msvc 6.0 has problems */
138 # define inline __inline
138 # define inline __inline
139 typedef unsigned long uint32_t;
139 typedef unsigned long uint32_t;
140 typedef unsigned __int64 uint64_t;
140 # else
141 # else
141 # include <stdint.h>
142 # include <stdint.h>
142 # endif
143 # endif
@@ -51,18 +51,22 b' def sha1(s):'
51
51
52 try:
52 try:
53 import subprocess
53 import subprocess
54 closefds = os.name == 'posix'
54 def popen2(cmd, mode='t', bufsize=-1):
55 def popen2(cmd, mode='t', bufsize=-1):
55 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, close_fds=True,
56 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize,
57 close_fds=closefds,
56 stdin=subprocess.PIPE, stdout=subprocess.PIPE)
58 stdin=subprocess.PIPE, stdout=subprocess.PIPE)
57 return p.stdin, p.stdout
59 return p.stdin, p.stdout
58 def popen3(cmd, mode='t', bufsize=-1):
60 def popen3(cmd, mode='t', bufsize=-1):
59 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, close_fds=True,
61 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize,
62 close_fds=closefds,
60 stdin=subprocess.PIPE, stdout=subprocess.PIPE,
63 stdin=subprocess.PIPE, stdout=subprocess.PIPE,
61 stderr=subprocess.PIPE)
64 stderr=subprocess.PIPE)
62 return p.stdin, p.stdout, p.stderr
65 return p.stdin, p.stdout, p.stderr
63 def Popen3(cmd, capturestderr=False, bufsize=-1):
66 def Popen3(cmd, capturestderr=False, bufsize=-1):
64 stderr = capturestderr and subprocess.PIPE or None
67 stderr = capturestderr and subprocess.PIPE or None
65 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, close_fds=True,
68 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize,
69 close_fds=closefds,
66 stdin=subprocess.PIPE, stdout=subprocess.PIPE,
70 stdin=subprocess.PIPE, stdout=subprocess.PIPE,
67 stderr=stderr)
71 stderr=stderr)
68 p.fromchild = p.stdout
72 p.fromchild = p.stdout
@@ -40,7 +40,7 b''
40 | {changenav%navgraphentry}
40 | {changenav%navgraphentry}
41 </div>
41 </div>
42
42
43 <div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div>
43 <noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
44
44
45 <div id="wrapper">
45 <div id="wrapper">
46 <ul id="nodebgs"></ul>
46 <ul id="nodebgs"></ul>
@@ -52,8 +52,6 b''
52 <script type="text/javascript">
52 <script type="text/javascript">
53 <!-- hide script content
53 <!-- hide script content
54
54
55 document.getElementById('noscript').style.display = 'none';
56
57 var data = {jsdata|json};
55 var data = {jsdata|json};
58 var graph = new Graph();
56 var graph = new Graph();
59 graph.scale({bg_height});
57 graph.scale({bg_height});
@@ -32,7 +32,7 b' graph |'
32
32
33 <div class="title">&nbsp;</div>
33 <div class="title">&nbsp;</div>
34
34
35 <div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div>
35 <noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
36
36
37 <div id="wrapper">
37 <div id="wrapper">
38 <ul id="nodebgs"></ul>
38 <ul id="nodebgs"></ul>
@@ -44,8 +44,6 b' graph |'
44 <script>
44 <script>
45 <!-- hide script content
45 <!-- hide script content
46
46
47 document.getElementById('noscript').style.display = 'none';
48
49 var data = {jsdata|json};
47 var data = {jsdata|json};
50 var graph = new Graph();
48 var graph = new Graph();
51 graph.scale({bg_height});
49 graph.scale({bg_height});
@@ -26,7 +26,7 b' navigate: <small class="navigate">#chang'
26 </p>
26 </p>
27 </form>
27 </form>
28
28
29 <div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div>
29 <noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
30
30
31 <div id="wrapper">
31 <div id="wrapper">
32 <ul id="nodebgs"></ul>
32 <ul id="nodebgs"></ul>
@@ -38,8 +38,6 b' navigate: <small class="navigate">#chang'
38 <script type="text/javascript">
38 <script type="text/javascript">
39 <!-- hide script content
39 <!-- hide script content
40
40
41 document.getElementById('noscript').style.display = 'none';
42
43 var data = {jsdata|json};
41 var data = {jsdata|json};
44 var graph = new Graph();
42 var graph = new Graph();
45 graph.scale({bg_height});
43 graph.scale({bg_height});
@@ -33,6 +33,10 b' list of commands:'
33 debugfoobar:
33 debugfoobar:
34 yet another debug command
34 yet another debug command
35
35
36 enabled extensions:
37
38 debugextension only debugcommands
39
36 special help topics:
40 special help topics:
37 dates Date Formats
41 dates Date Formats
38 patterns File Name Patterns
42 patterns File Name Patterns
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -51,6 +51,12 b' list of commands:'
51 kwfiles print files currently configured for keyword expansion
51 kwfiles print files currently configured for keyword expansion
52 kwshrink revert expanded keywords in working directory
52 kwshrink revert expanded keywords in working directory
53
53
54 enabled extensions:
55
56 keyword keyword expansion in local repositories
57 mq patch management and development
58 notify hook extension to email notifications on commits/pushes
59
54 use "hg -v help keyword" to show aliases and global options
60 use "hg -v help keyword" to show aliases and global options
55 % hg kwdemo
61 % hg kwdemo
56 [extensions]
62 [extensions]
@@ -51,6 +51,10 b' list of commands:'
51 qunapplied print the patches not yet applied
51 qunapplied print the patches not yet applied
52 strip strip a revision and all its descendants from the repository
52 strip strip a revision and all its descendants from the repository
53
53
54 enabled extensions:
55
56 mq patch management and development
57
54 use "hg -v help mq" to show aliases and global options
58 use "hg -v help mq" to show aliases and global options
55 adding a
59 adding a
56 updating working directory
60 updating working directory
@@ -1,4 +1,61 b''
1 notify extension - No help text available
1 notify extension - hook extension to email notifications on commits/pushes
2
3 Subscriptions can be managed through hgrc. Default mode is to print
4 messages to stdout, for testing and configuring.
5
6 To use, configure notify extension and enable in hgrc like this:
7
8 [extensions]
9 hgext.notify =
10
11 [hooks]
12 # one email for each incoming changeset
13 incoming.notify = python:hgext.notify.hook
14 # batch emails when many changesets incoming at one time
15 changegroup.notify = python:hgext.notify.hook
16
17 [notify]
18 # config items go in here
19
20 config items:
21
22 REQUIRED:
23 config = /path/to/file # file containing subscriptions
24
25 OPTIONAL:
26 test = True # print messages to stdout for testing
27 strip = 3 # number of slashes to strip for url paths
28 domain = example.com # domain to use if committer missing domain
29 style = ... # style file to use when formatting email
30 template = ... # template to use when formatting email
31 incoming = ... # template to use when run as incoming hook
32 changegroup = ... # template when run as changegroup hook
33 maxdiff = 300 # max lines of diffs to include (0=none, -1=all)
34 maxsubject = 67 # truncate subject line longer than this
35 diffstat = True # add a diffstat before the diff content
36 sources = serve # notify if source of incoming changes in this list
37 # (serve == ssh or http, push, pull, bundle)
38 [email]
39 from = user@host.com # email address to send as if none given
40 [web]
41 baseurl = http://hgserver/... # root of hg web site for browsing commits
42
43 notify config file has same format as regular hgrc. it has two
44 sections so you can express subscriptions in whatever way is handier
45 for you.
46
47 [usersubs]
48 # key is subscriber email, value is ","-separated list of glob patterns
49 user@host = pattern
50
51 [reposubs]
52 # key is glob pattern, value is ","-separated list of subscriber emails
53 pattern = user@host
54
55 glob patterns are matched against path to repo root.
56
57 if you like, you can put notify config file in repo that users can
58 push changes to, they can manage their own subscriptions.
2
59
3 no commands defined
60 no commands defined
4 % commit
61 % commit
@@ -21,6 +21,10 b' basic commands:'
21 status show changed files in the working directory
21 status show changed files in the working directory
22 update update working directory
22 update update working directory
23
23
24 enabled extensions:
25
26 record interactive change selection during commit or qrefresh
27
24 use "hg help" for the full list of commands or "hg -v" for details
28 use "hg help" for the full list of commands or "hg -v" for details
25 % help (mq present)
29 % help (mq present)
26 hg qrecord [OPTION]... PATCH [FILE]...
30 hg qrecord [OPTION]... PATCH [FILE]...
@@ -64,6 +64,9 b' echo "% Rebase with no arguments (from 3'
64 hg update -C 5
64 hg update -C 5
65 hg rebase 2>&1 | sed 's/\(saving bundle to \).*/\1/'
65 hg rebase 2>&1 | sed 's/\(saving bundle to \).*/\1/'
66
66
67 echo "% Try to rollback after a rebase (fail)"
68 hg rollback
69
67 createrepo > /dev/null 2>&1
70 createrepo > /dev/null 2>&1
68 echo
71 echo
69 echo "% Rebase with base == '.' => same as no arguments (from 3 onto 7)"
72 echo "% Rebase with base == '.' => same as no arguments (from 3 onto 7)"
@@ -126,6 +126,8 b' adding manifests'
126 adding file changes
126 adding file changes
127 added 5 changesets with 5 changes to 5 files
127 added 5 changesets with 5 changes to 5 files
128 rebase completed
128 rebase completed
129 % Try to rollback after a rebase (fail)
130 no rollback information available
129
131
130 % Rebase with base == '.' => same as no arguments (from 3 onto 7)
132 % Rebase with base == '.' => same as no arguments (from 3 onto 7)
131 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
133 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
General Comments 0
You need to be logged in to leave comments. Login now