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