Mercurial > hg
changeset 10784:716e76f89e3a stable
Merge with i18n
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 29 Mar 2010 15:16:05 -0500 |
parents | b9532264cb8b (diff) f58d5fbd941c (current diff) |
children | 2f2ae64a2948 ca6ba6cac6cd |
files | |
diffstat | 28 files changed, 180 insertions(+), 107 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Sun Mar 28 20:27:09 2010 +0200 +++ b/hgext/mq.py Mon Mar 29 15:16:05 2010 -0500 @@ -2603,7 +2603,8 @@ start = lrev + 1 if start < qbase: # update the cache (excluding the patches) and save it - self._updatebranchcache(partial, lrev + 1, qbase) + ctxgen = (self[r] for r in xrange(lrev + 1, qbase)) + self._updatebranchcache(partial, ctxgen) self._writebranchcache(partial, cl.node(qbase - 1), qbase - 1) start = qbase # if start = qbase, the cache is as updated as it should be. @@ -2611,7 +2612,8 @@ # we might as well use it, but we won't save it. # update the cache up to the tip - self._updatebranchcache(partial, start, len(cl)) + ctxgen = (self[r] for r in xrange(start, len(cl))) + self._updatebranchcache(partial, ctxgen) return partial
--- a/hgext/schemes.py Sun Mar 28 20:27:09 2010 +0200 +++ b/hgext/schemes.py Mon Mar 29 15:16:05 2010 -0500 @@ -34,6 +34,7 @@ bb = https://bitbucket.org/ bb+ssh = ssh://hg@bitbucket.org/ gcode = https://{1}.googlecode.com/hg/ + kiln = https://{1}.kilnhg.com/Repo/ You can override a predefined scheme by defining a new scheme with the same name. @@ -72,7 +73,8 @@ 'py': 'http://hg.python.org/', 'bb': 'https://bitbucket.org/', 'bb+ssh': 'ssh://hg@bitbucket.org/', - 'gcode': 'https://{1}.googlecode.com/hg/' + 'gcode': 'https://{1}.googlecode.com/hg/', + 'kiln': 'https://{1}.kilnhg.com/Repo/' } def extsetup(ui):
--- a/mercurial/localrepo.py Sun Mar 28 20:27:09 2010 +0200 +++ b/mercurial/localrepo.py Mon Mar 29 15:16:05 2010 -0500 @@ -320,7 +320,8 @@ # TODO: rename this function? tiprev = len(self) - 1 if lrev != tiprev: - self._updatebranchcache(partial, lrev + 1, tiprev + 1) + ctxgen = (self[r] for r in xrange(lrev + 1, tiprev + 1)) + self._updatebranchcache(partial, ctxgen) self._writebranchcache(partial, self.changelog.tip(), tiprev) return partial @@ -398,11 +399,10 @@ except (IOError, OSError): pass - def _updatebranchcache(self, partial, start, end): + def _updatebranchcache(self, partial, ctxgen): # collect new branch entries newbranches = {} - for r in xrange(start, end): - c = self[r] + for c in ctxgen: newbranches.setdefault(c.branch(), []).append(c.node()) # if older branchheads are reachable from new ones, they aren't # really branchheads. Note checking parents is insufficient: @@ -1503,30 +1503,22 @@ update, updated_heads = self.findoutgoing(remote, common, remote_heads) msng_cl, bases, heads = self.changelog.nodesbetween(update, revs) - def checkbranch(lheads, rheads, updatelb, branchname=None): + def checkbranch(lheads, rheads, branchname=None): ''' check whether there are more local heads than remote heads on a specific branch. lheads: local branch heads rheads: remote branch heads - updatelb: outgoing local branch bases ''' warn = 0 - if not revs and len(lheads) > len(rheads): + if len(lheads) > len(rheads): warn = 1 else: - # add local heads involved in the push - updatelheads = [self.changelog.heads(x, lheads) - for x in updatelb] - newheads = set(sum(updatelheads, [])) & set(lheads) - - if not newheads: - return True - # add heads we don't have or that are not involved in the push + newheads = set(lheads) for r in rheads: if r in self.changelog.nodemap: desc = self.changelog.heads(r, heads) @@ -1575,9 +1567,8 @@ localbrheads = self.branchmap() else: localbrheads = {} - for n in heads: - branch = self[n].branch() - localbrheads.setdefault(branch, []).append(n) + ctxgen = (self[n] for n in msng_cl) + self._updatebranchcache(localbrheads, ctxgen) newbranches = list(set(localbrheads) - set(remotebrheads)) if newbranches: # new branch requires --force @@ -1591,10 +1582,10 @@ for branch, lheads in localbrheads.iteritems(): if branch in remotebrheads: rheads = remotebrheads[branch] - if not checkbranch(lheads, rheads, update, branch): + if not checkbranch(lheads, rheads, branch): return None, 0 else: - if not checkbranch(heads, remote_heads, update): + if not checkbranch(heads, remote_heads): return None, 0 if inc:
--- a/mercurial/templates/map-cmdline.default Sun Mar 28 20:27:09 2010 +0200 +++ b/mercurial/templates/map-cmdline.default Mon Mar 29 15:16:05 2010 -0500 @@ -14,9 +14,9 @@ start_file_dels = 'files-: ' file_del = ' {file_del}' end_file_dels = '\n' -start_file_copies_switch = 'copies: ' +start_file_copies = 'copies: ' file_copy = ' {name} ({source})' -end_file_copies_switch = '\n' +end_file_copies = '\n' parent = 'parent: {rev}:{node|formatnode}\n' manifest = 'manifest: {rev}:{node}\n' branch = 'branch: {branch}\n'
--- a/tests/test-bisect Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-bisect Mon Mar 29 15:16:05 2010 -0500 @@ -103,5 +103,5 @@ hg bisect -r hg bisect --good tip hg bisect --bad 0 -hg bisect --command "`pwd`/script.py" +hg bisect --command "'`pwd`/script.py' and some parameters" true
--- a/tests/test-convert Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-convert Mon Mar 29 15:16:05 2010 -0500 @@ -49,7 +49,7 @@ mkdir emptydir # override $PATH to ensure p4 not visible; use $PYTHON in case we're # running from a devel copy, not a temp installation -PATH=$BINDIR $PYTHON $BINDIR/hg convert emptydir 2>&1 | sed 's,file://.*/emptydir,.../emptydir,g' +PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir 2>&1 | sed 's,file://.*/emptydir,.../emptydir,g' echo % convert with imaginary source type hg convert --source-type foo a a-foo
--- a/tests/test-convert-hg-svn Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-convert-hg-svn Mon Mar 29 15:16:05 2010 -0500 @@ -12,9 +12,9 @@ echo "mq = " >> $HGRCPATH svnpath=`pwd | fix_path`/svn-repo -svnadmin create $svnpath +svnadmin create "$svnpath" -cat > $svnpath/hooks/pre-revprop-change <<'EOF' +cat > "$svnpath"/hooks/pre-revprop-change <<'EOF' #!/bin/sh REPOS="$1" @@ -30,19 +30,19 @@ echo "Changing prohibited revision property" >&2 exit 1 EOF -chmod +x $svnpath/hooks/pre-revprop-change +chmod +x "$svnpath"/hooks/pre-revprop-change # SVN wants all paths to start with a slash. Unfortunately, # Windows ones don't. Handle that. -svnurl=$svnpath -expr $svnurl : "\/" > /dev/null +svnurl="$svnpath" +expr "$svnurl" : "\/" > /dev/null if [ $? -ne 0 ]; then - svnurl='/'$svnurl + svnurl="/$svnurl" fi -svnurl=file://$svnurl -svn co $svnurl $svnpath-wc +svnurl="file://$svnurl" +svn co "$svnurl" "$svnpath"-wc -cd $svnpath-wc +cd "$svnpath"-wc echo a > a svn add a svn ci -m'added a' a @@ -50,17 +50,17 @@ cd .. echo % initial roundtrip -hg convert -s svn -d hg $svnpath-wc $svnpath-hg | grep -v initializing -hg convert -s hg -d svn $svnpath-hg $svnpath-wc +hg convert -s svn -d hg "$svnpath"-wc "$svnpath"-hg | grep -v initializing +hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc echo % second roundtrip should do nothing -hg convert -s svn -d hg $svnpath-wc $svnpath-hg -hg convert -s hg -d svn $svnpath-hg $svnpath-wc +hg convert -s svn -d hg "$svnpath"-wc "$svnpath"-hg +hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc echo % new hg rev -hg clone $svnpath-hg $svnpath-work -cd $svnpath-work +hg clone "$svnpath"-hg "$svnpath"-work +cd "$svnpath"-work echo b > b hg add b hg ci -mb @@ -70,10 +70,10 @@ cd .. echo % echo hg to svn -hg --cwd $svnpath-hg pull -q $svnpath-work -hg convert -s hg -d svn $svnpath-hg $svnpath-wc +hg --cwd "$svnpath"-hg pull -q "$svnpath"-work +hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc echo % svn back to hg should do nothing -hg convert -s svn -d hg $svnpath-wc $svnpath-hg +hg convert -s svn -d hg "$svnpath"-wc "$svnpath"-hg echo % hg back to svn should do nothing -hg convert -s hg -d svn $svnpath-hg $svnpath-wc +hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
--- a/tests/test-convert-svn-move Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-convert-svn-move Mon Mar 29 15:16:05 2010 -0500 @@ -17,14 +17,14 @@ svnpath=`pwd | fix_path` # SVN wants all paths to start with a slash. Unfortunately, # Windows ones don't. Handle that. -expr $svnpath : "\/" > /dev/null +expr "$svnpath" : "\/" > /dev/null if [ $? -ne 0 ]; then - svnpath='/'$svnpath + svnpath="/$svnpath" fi -svnurl=file://$svnpath/svn-repo +svnurl="file://$svnpath/svn-repo" echo % convert trunk and branches -hg convert --datesort $svnurl/subproject A-hg +hg convert --datesort "$svnurl"/subproject A-hg cd A-hg hg glog --template '{rev} {desc|firstline} files: {files}\n'
--- a/tests/test-convert-svn-source Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-convert-svn-source Mon Mar 29 15:16:05 2010 -0500 @@ -16,9 +16,9 @@ svnpath=`pwd | fix_path` # SVN wants all paths to start with a slash. Unfortunately, # Windows ones don't. Handle that. -expr $svnpath : "\/" > /dev/null +expr "$svnpath" : "\/" > /dev/null if [ $? -ne 0 ]; then - svnpath='/'$svnpath + svnpath="/$svnpath" fi echo "# now tests that it works with trunk/tags layout, but no branches yet" @@ -30,12 +30,12 @@ mkdir tags cd .. -svnurl=file://$svnpath/svn-repo/proj%20B -svn import -m "init projB" projB $svnurl | fix_path +svnurl="file://$svnpath/svn-repo/proj%20B" +svn import -m "init projB" projB "$svnurl" | fix_path echo % update svn repository -svn co $svnurl/trunk B | fix_path +svn co "$svnurl"/trunk B | fix_path cd B echo hello > 'letter .txt' svn add 'letter .txt' @@ -44,14 +44,14 @@ "$TESTDIR/svn-safe-append.py" world 'letter .txt' svn ci -m world -svn copy -m "tag v0.1" $svnurl/trunk $svnurl/tags/v0.1 +svn copy -m "tag v0.1" "$svnurl"/trunk "$svnurl"/tags/v0.1 "$TESTDIR/svn-safe-append.py" 'nice day today!' 'letter .txt' svn ci -m "nice day" cd .. echo % convert to hg once -hg convert $svnurl B-hg +hg convert "$svnurl" B-hg echo % update svn repository again cd B @@ -60,7 +60,7 @@ svn add letter2.txt svn ci -m "second letter" -svn copy -m "tag v0.2" $svnurl/trunk $svnurl/tags/v0.2 +svn copy -m "tag v0.2" "$svnurl"/trunk "$svnurl"/tags/v0.2 "$TESTDIR/svn-safe-append.py" "blah-blah-blah" letter2.txt svn ci -m "work in progress" @@ -69,7 +69,7 @@ ######################################## echo % test incremental conversion -hg convert $svnurl B-hg +hg convert "$svnurl" B-hg cd B-hg hg glog --template '{rev} {desc|firstline} files: {files}\n' @@ -78,11 +78,11 @@ echo % test filemap echo 'include letter2.txt' > filemap -hg convert --filemap filemap $svnurl/trunk fmap +hg convert --filemap filemap "$svnurl"/trunk fmap hg glog -R fmap --template '{rev} {desc|firstline} files: {files}\n' echo % test stop revision -hg convert --rev 1 $svnurl/trunk stoprev +hg convert --rev 1 "$svnurl"/trunk stoprev # Check convert_revision extra-records. # This is also the only place testing more than one extra field # in a revision.
--- a/tests/test-extdiff Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-extdiff Mon Mar 29 15:16:05 2010 -0500 @@ -36,7 +36,7 @@ # should diff cloned file against wc file hg falabala > out # cleanup the output since the wc is a tmp directory -sed 's:\(.* \).*\(\/test-extdiff\):\1[tmp]\2:' out +sed 's:\(diffing [^ ]* \).*\(\/test-extdiff\):\1[tmp]\2:' out # test --change option hg ci -d '2 0' -mtest3 hg falabala -c 1 @@ -54,15 +54,15 @@ hg diff --git echo '% edit with extdiff -p' # prepare custom diff/edit tool -cat > differ.py << EOT +cat > 'diff tool.py' << EOT #!/usr/bin/env python import time time.sleep(1) # avoid unchanged-timestamp problems file('a/a', 'ab').write('edited\n') file('a/b', 'ab').write('edited\n') EOT -chmod +x differ.py -hg extdiff -p `pwd`/differ.py # will change to /tmp/extdiff.TMP and populate directories a.TMP and a and start tool +chmod +x 'diff tool.py' +hg extdiff -p "`pwd`/diff tool.py" # will change to /tmp/extdiff.TMP and populate directories a.TMP and a and start tool echo '% diff in working directory, after' hg diff --git
--- a/tests/test-import Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-import Mon Mar 29 15:16:05 2010 -0500 @@ -167,7 +167,7 @@ dir=`pwd` cd b/d1/d2 2>&1 > /dev/null hg import ../../../tip.patch -cd $dir +cd "$dir" echo "% message should be 'subdir change'" hg --cwd b tip | grep 'subdir change' echo "% committer should be 'someoneelse'"
--- a/tests/test-keyword Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-keyword Mon Mar 29 15:16:05 2010 -0500 @@ -87,8 +87,8 @@ diff a hooktest echo % removing commit hook from config -sed -e '/\[hooks\]/,$ d' $HGRCPATH > $HGRCPATH.nohook -mv $HGRCPATH.nohook $HGRCPATH +sed -e '/\[hooks\]/,$ d' "$HGRCPATH" > $HGRCPATH.nohook +mv "$HGRCPATH".nohook "$HGRCPATH" rm hooktest echo % bundle @@ -115,8 +115,8 @@ hg pull -u ../kw.hg 2>&1 | sed -e '/^Content-Type:/,/^diffs (/ d' echo % remove notify config -sed -e '/\[hooks\]/,$ d' $HGRCPATH > $HGRCPATH.nonotify -mv $HGRCPATH.nonotify $HGRCPATH +sed -e '/\[hooks\]/,$ d' "$HGRCPATH" > $HGRCPATH.nonotify +mv "$HGRCPATH".nonotify "$HGRCPATH" echo % touch touch a b @@ -364,7 +364,7 @@ echo % hg cat hg cat sym a b echo -rm $HGRCPATH +rm "$HGRCPATH" echo % cat cat a b echo % hg cat
--- a/tests/test-log Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-log Mon Mar 29 15:16:05 2010 -0500 @@ -38,6 +38,10 @@ echo '% log copies switch with --copies' hg log -vC --template '{rev} {file_copies_switch}\n' +echo '% log copies with hardcoded style and with --style=default' +hg log -vC -r4 +hg log -vC -r4 --style=default + echo % log copies, non-linear manifest hg up -C 3 hg mv dir/b e
--- a/tests/test-log.out Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-log.out Mon Mar 29 15:16:05 2010 -0500 @@ -94,6 +94,27 @@ 2 dir/b (b) 1 b (a) 0 +% log copies with hardcoded style and with --style=default +changeset: 4:66c1345dc4f9 +tag: tip +user: test +date: Thu Jan 01 00:00:05 1970 +0000 +files: dir/b e +copies: e (dir/b) +description: +e + + +changeset: 4:66c1345dc4f9 +tag: tip +user: test +date: Thu Jan 01 00:00:05 1970 +0000 +files: dir/b e +copies: e (dir/b) +description: +e + + % log copies, non-linear manifest 1 files updated, 0 files merged, 1 files removed, 0 files unresolved adding foo
--- a/tests/test-merge-tools Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-merge-tools Mon Mar 29 15:16:05 2010 -0500 @@ -62,7 +62,7 @@ echo "# hg merge -r 2" # override $PATH to ensure hgmerge not visible; use $PYTHON in case we're # running from a devel copy, not a temp installation -PATH=$BINDIR $PYTHON $BINDIR/hg merge -r 2 +PATH="$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2 aftermerge echo "# simplest hgrc using false for merge:" @@ -177,6 +177,17 @@ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output' aftermerge +echo '# Merge using tool with a path that must be quoted:' +beforemerge +cat <<EOF > 'my merge tool' +#!/bin/sh +cat "\$1" "\$2" "\$3" > "\$4" +EOF +chmod +x 'my merge tool' +hg merge -r 2 --config merge-tools.true.executable='./my merge tool' --config merge-tools.true.args='$base $local $other $output' +rm -f 'my merge tool' +aftermerge + echo echo Merge post-processing
--- a/tests/test-merge-tools.out Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-merge-tools.out Mon Mar 29 15:16:05 2010 -0500 @@ -497,6 +497,25 @@ # hg stat M f +# Merge using tool with a path that must be quoted: +[merge-tools] +false.whatever= +true.priority=1 +true.executable=cat +# hg update -C 1 +merging f +0 files updated, 1 files merged, 0 files removed, 0 files unresolved +(branch merge, don't forget to commit) +# cat f +revision 0 +space +revision 1 +space +revision 2 +space +# hg stat +M f + Merge post-processing
--- a/tests/test-mq-merge Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-mq-merge Mon Mar 29 15:16:05 2010 -0500 @@ -2,11 +2,6 @@ # Test issue 529 - mq aborts when merging patch deleting files -rewrite_path() -{ - sed -e 's:\\:/:g' -e 's:[^ ]*/t/::g' -} - checkundo() { if [ -f .hg/store/undo ]; then @@ -33,7 +28,7 @@ hg qrefresh -m "rm a" # Save the patch queue so we can merge it later -hg qsave -c -e 2>&1 | rewrite_path +hg qsave -c -e 2>&1 | grep -v ^copy checkundo qsave # Update b and commit in an "update" changeset @@ -45,7 +40,7 @@ # Here, qpush used to abort with : # The system cannot find the file specified => a hg manifest -hg qpush -a -m 2>&1 | rewrite_path +hg qpush -a -m 2>&1 | grep -v ^merging checkundo 'qpush -m' hg manifest
--- a/tests/test-mq-merge.out Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-mq-merge.out Mon Mar 29 15:16:05 2010 -0500 @@ -1,12 +1,10 @@ adding a adding b -copy .hg/patches to .hg/patches.1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved M b created new head a b -merging with queue at: .hg/patches.1 applying rm_a now at: rm_a b
--- a/tests/test-mq-qimport Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-mq-qimport Mon Mar 29 15:16:05 2010 -0500 @@ -68,12 +68,12 @@ rm foo # Under unix: file:///foobar/blah # Under windows: file:///c:/foobar/blah -patchurl=`echo $HGTMP/url.diff | tr '\\\\' /` -expr $patchurl : "\/" > /dev/null +patchurl=`echo "$HGTMP"/url.diff | tr '\\\\' /` +expr "$patchurl" : "\/" > /dev/null if [ $? -ne 0 ]; then - patchurl='/'$patchurl + patchurl="/$patchurl" fi -hg qimport file://$patchurl +hg qimport file://"$patchurl" hg qun echo % import patch that already exists
--- a/tests/test-progress Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-progress Mon Mar 29 15:16:05 2010 -0500 @@ -30,7 +30,7 @@ echo "[extensions]" >> $HGRCPATH echo "progress=" >> $HGRCPATH -echo "loop=" `pwd`/loop.py >> $HGRCPATH +echo "loop=`pwd`/loop.py" >> $HGRCPATH echo "[ui]" >> $HGRCPATH echo "interactive=1" >> $HGRCPATH
--- a/tests/test-pull Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-pull Mon Mar 29 15:16:05 2010 -0500 @@ -32,4 +32,4 @@ # It's tricky to make file:// URLs working on every platforms # with regular shell commands. URL=`python -c "import os; print 'file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"` -hg pull -q $URL +hg pull -q "$URL"
--- a/tests/test-push-warn Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-push-warn Mon Mar 29 15:16:05 2010 -0500 @@ -166,4 +166,32 @@ hg -R k push -r a j echo +echo % prepush -r should not allow you to sneak in new heads +hg init l +cd l +echo a >> foo +hg -q add foo +hg -q branch a +hg -q ci -d '0 0' -ma +hg -q up null +echo a >> foo +hg -q add foo +hg -q branch b +hg -q ci -d '0 0' -mb +cd .. +hg -q clone l m -u a +cd m +hg -q merge b +hg -q ci -d '0 0' -mmb +hg -q up 0 +echo a >> foo +hg -q ci -ma2 +hg -q up 2 +echo a >> foo +hg -q branch -f b +hg -q ci -d '0 0' -mb2 +hg -q merge 3 +hg -q ci -d '0 0' -mma +hg push ../l -b b + exit 0
--- a/tests/test-push-warn.out Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-push-warn.out Mon Mar 29 15:16:05 2010 -0500 @@ -100,7 +100,7 @@ 1 pushing to ../f searching for changes -abort: push creates new remote branches: d! +abort: push creates new remote branches: c, d! (use 'hg push -f' to force) 1 % fail on multiple head push @@ -167,6 +167,11 @@ (branch merge, don't forget to commit) pushing to j searching for changes +abort: push creates new remote branches: b! +(use 'hg push -f' to force) + +% prepush -r should not allow you to sneak in new heads +pushing to ../l +searching for changes abort: push creates new remote heads on branch 'a'! -(you should pull and merge or use push -f to force) - +(did you forget to merge? use push -f to force)
--- a/tests/test-rebase-pull Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-rebase-pull Mon Mar 29 15:16:05 2010 -0500 @@ -4,8 +4,6 @@ echo "graphlog=" >> $HGRCPATH echo "rebase=" >> $HGRCPATH -BASE=`pwd` - addcommit () { echo $1 > $1 hg add $1 @@ -16,7 +14,6 @@ hg commit -d "${2} 0" -m $1 } -cd $BASE rm -rf a hg init a cd a
--- a/tests/test-rollback Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-rollback Mon Mar 29 15:16:05 2010 -0500 @@ -42,7 +42,7 @@ #!/bin/sh echo "another precious commit message" > "$1" __EOF__ -chmod +x $HGTMP/editor -HGEDITOR=$HGTMP/editor hg --config hooks.pretxncommit=false commit 2>&1 | sed 's,exited with status .*,exited ...,g' +chmod +x "$HGTMP"/editor +HGEDITOR="'$HGTMP'"/editor hg --config hooks.pretxncommit=false commit 2>&1 | sed 's,exited with status .*,exited ...,g' echo '.hg/last-message.txt:' cat .hg/last-message.txt
--- a/tests/test-subrepo Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-subrepo Mon Mar 29 15:16:05 2010 -0500 @@ -196,8 +196,8 @@ hg -R nested_relative add hg -R nested_relative ci -mtest2 hg init main -echo nested_relative = ../nested_relative > main/.hgsub -echo nested_absolute = `pwd`/nested_absolute >> main/.hgsub +echo "nested_relative = ../nested_relative" > main/.hgsub +echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub hg -R main add hg -R main ci -m "add subrepos" cd ..
--- a/tests/test-subrepo-svn Sun Mar 28 20:27:09 2010 +0200 +++ b/tests/test-subrepo-svn Mon Mar 29 15:16:05 2010 -0500 @@ -10,11 +10,11 @@ escapedwd=`pwd | fix_path` # SVN wants all paths to start with a slash. Unfortunately, # Windows ones don't. Handle that. -expr $escapedwd : "\/" > /dev/null +expr "$escapedwd" : "\/" > /dev/null if [ $? -ne 0 ]; then - escapedwd='/'$escapedwd + escapedwd="/$escapedwd" fi -filterpath="sed s|$escapedwd|/root|" +filterpath="s|$escapedwd|/root|" filtersvn='s/ in transaction.*/ is out of date/;s/Out of date: /File /' echo % create subversion repo @@ -22,7 +22,7 @@ SVNREPO="file://$escapedwd/svn-repo" WCROOT="`pwd`/svn-wc" svnadmin create svn-repo -svn co $SVNREPO svn-wc +svn co "$SVNREPO" svn-wc cd svn-wc mkdir src echo alpha > src/alpha @@ -33,7 +33,7 @@ svn ci -m 'Add alpha' svn up cat > extdef <<EOF -externals -r1 $SVNREPO/externals +externals -r1 "$SVNREPO/externals" EOF svn propset -F extdef svn:externals src svn ci -m 'Setting externals' @@ -51,18 +51,18 @@ echo % add first svn sub with leading whitespaces echo "s = [svn] $SVNREPO/src" >> .hgsub -svn co --quiet $SVNREPO/src s +svn co --quiet "$SVNREPO"/src s hg add .hgsub hg ci -m1 echo % debugsub -hg debugsub | $filterpath +hg debugsub | sed "$filterpath" echo echo % change file in svn and hg, commit echo a >> a echo alpha >> s/alpha hg commit -m 'Message!' -hg debugsub | $filterpath +hg debugsub | sed "$filterpath" echo echo a > s/a @@ -104,4 +104,4 @@ hg clone t tc | fix_path cd tc echo % debugsub in clone -hg debugsub | $filterpath +hg debugsub | sed "$filterpath"