Show More
@@ -1905,7 +1905,7 b' def clone(ui, source, dest=None, **opts)' | |||
|
1905 | 1905 | def commit(ui, repo, *pats, **opts): |
|
1906 | 1906 | """commit changes in the queue repository (DEPRECATED) |
|
1907 | 1907 | |
|
1908 |
This command is deprecated; use hg |
|
|
1908 | This command is deprecated; use hg commit --mq instead.""" | |
|
1909 | 1909 | q = repo.mq |
|
1910 | 1910 | r = q.qrepo() |
|
1911 | 1911 | if not r: |
@@ -164,10 +164,7 b' def rebase(ui, repo, **opts):' | |||
|
164 | 164 | 'resolve then run hg rebase --continue')) |
|
165 | 165 | updatedirstate(repo, rev, target, p2) |
|
166 | 166 | if not collapsef: |
|
167 | extra = {'rebase_source': repo[rev].hex()} | |
|
168 | if extrafn: | |
|
169 | extrafn(repo[rev], extra) | |
|
170 | newrev = concludenode(repo, rev, p1, p2, extra=extra) | |
|
167 | newrev = concludenode(repo, rev, p1, p2, extrafn=extrafn) | |
|
171 | 168 | else: |
|
172 | 169 | # Skip commit if we are collapsing |
|
173 | 170 | repo.dirstate.setparents(repo[p1].node()) |
@@ -193,7 +190,7 b' def rebase(ui, repo, **opts):' | |||
|
193 | 190 | commitmsg += '\n* %s' % repo[rebased].description() |
|
194 | 191 | commitmsg = ui.edit(commitmsg, repo.ui.username()) |
|
195 | 192 | newrev = concludenode(repo, rev, p1, external, commitmsg=commitmsg, |
|
196 |
|
|
|
193 | extrafn=extrafn) | |
|
197 | 194 | |
|
198 | 195 | if 'qtip' in repo.tags(): |
|
199 | 196 | updatemq(repo, state, skipped, **opts) |
@@ -269,17 +266,19 b' def updatedirstate(repo, rev, p1, p2):' | |||
|
269 | 266 | if v in m2 and v not in m1: |
|
270 | 267 | repo.dirstate.remove(v) |
|
271 | 268 | |
|
272 | def concludenode(repo, rev, p1, p2, commitmsg=None, extra=None): | |
|
269 | def concludenode(repo, rev, p1, p2, commitmsg=None, extrafn=None): | |
|
273 | 270 | 'Commit the changes and store useful information in extra' |
|
274 | 271 | try: |
|
275 | 272 | repo.dirstate.setparents(repo[p1].node(), repo[p2].node()) |
|
276 | 273 | if commitmsg is None: |
|
277 | 274 | commitmsg = repo[rev].description() |
|
278 | if extra is None: | |
|
279 | extra = {} | |
|
275 | ctx = repo[rev] | |
|
276 | extra = {'rebase_source': ctx.hex()} | |
|
277 | if extrafn: | |
|
278 | extrafn(ctx, extra) | |
|
280 | 279 | # Commit might fail if unresolved files exist |
|
281 |
newrev = repo.commit(text=commitmsg, user= |
|
|
282 |
date= |
|
|
280 | newrev = repo.commit(text=commitmsg, user=ctx.user(), | |
|
281 | date=ctx.date(), extra=extra) | |
|
283 | 282 | repo.dirstate.setbranch(repo[newrev].branch()) |
|
284 | 283 | return newrev |
|
285 | 284 | except util.Abort: |
@@ -66,8 +66,9 b' keywords are usually available for templ' | |||
|
66 | 66 | The "date" keyword does not produce human-readable output. If you |
|
67 | 67 | want to use a date in your output, you can use a filter to process |
|
68 | 68 | it. Filters are functions which return a string based on the input |
|
69 | variable. You can also use a chain of filters to get the desired | |
|
70 | output:: | |
|
69 | variable. Be sure to use the stringify filter first when you're | |
|
70 | applying a string-input filter to a list-like input variable. | |
|
71 | You can also use a chain of filters to get the desired output:: | |
|
71 | 72 | |
|
72 | 73 | $ hg tip --template "{date|isodate}\n" |
|
73 | 74 | 2008-08-21 18:22 +0000 |
@@ -69,5 +69,9 b' def launch(application):' | |||
|
69 | 69 | return write |
|
70 | 70 | |
|
71 | 71 | content = application(environ, start_response) |
|
72 | for chunk in content: | |
|
73 | write(chunk) | |
|
72 | try: | |
|
73 | for chunk in content: | |
|
74 | write(chunk) | |
|
75 | finally: | |
|
76 | if hasattr(content, 'close'): | |
|
77 | content.close() |
@@ -26,6 +26,12 b' except:' | |||
|
26 | 26 | raise SystemExit( |
|
27 | 27 | "Couldn't import standard zlib (incomplete Python install).") |
|
28 | 28 | |
|
29 | try: | |
|
30 | import bz2 | |
|
31 | except: | |
|
32 | raise SystemExit( | |
|
33 | "Couldn't import standard bz2 (incomplete Python install).") | |
|
34 | ||
|
29 | 35 | import os, subprocess, time |
|
30 | 36 | import shutil |
|
31 | 37 | import tempfile |
@@ -80,7 +80,8 b' cvscall -q -d "$CVSROOT" checkout -d src' | |||
|
80 | 80 | ls srcfull |
|
81 | 81 | hg convert srcfull srcfull-hg \ |
|
82 | 82 | | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' \ |
|
83 | | grep -v 'log entries' | grep -v 'hook:' | |
|
83 | | grep -v 'log entries' | grep -v 'hook:' \ | |
|
84 | | grep -v '^[0-3] .*' # filter instable changeset order | |
|
84 | 85 | hg cat -r tip srcfull-hg/src/a |
|
85 | 86 | hg cat -r tip srcfull-hg/src/b/c |
|
86 | 87 |
@@ -67,10 +67,6 b' creating changesets' | |||
|
67 | 67 | 4 changeset entries |
|
68 | 68 | sorting... |
|
69 | 69 | converting... |
|
70 | 3 Initial revision | |
|
71 | 2 import | |
|
72 | 1 initial checkin | |
|
73 | 0 ci0 | |
|
74 | 70 | updating tags |
|
75 | 71 | a |
|
76 | 72 | c |
@@ -43,7 +43,7 b' createrepo > /dev/null 2>&1' | |||
|
43 | 43 | hg glog --template '{rev}: {desc}\n' |
|
44 | 44 | echo '% Rebasing B onto H' |
|
45 | 45 | hg up -C 3 |
|
46 | hg rebase --collapse 2>&1 | sed 's/\(saving bundle to \).*/\1/' | |
|
46 | hg rebase --collapse --keepbranches 2>&1 | sed 's/\(saving bundle to \).*/\1/' | |
|
47 | 47 | hg glog --template '{rev}: {desc}\n' |
|
48 | 48 | echo "Expected A, B, C, D, F, H" |
|
49 | 49 | hg manifest |
General Comments 0
You need to be logged in to leave comments.
Login now