# HG changeset patch # User Thomas Arendsen Hein # Date 1182410749 -7200 # Node ID 7a7d4937272baf90af6f00bc47807a9172279583 # Parent 17f5d2069551ee62d2b0616ce3451a5f84e746f1 Kill trailing spaces diff --git a/hgeditor b/hgeditor --- a/hgeditor +++ b/hgeditor @@ -42,7 +42,7 @@ HGTMP="${TMPDIR-/tmp}/hgeditor.$RANDOM.$ cat "$1" > "$HGTMP/msg" MD5=$(which md5sum 2>/dev/null) || \ - MD5=$(which md5 2>/dev/null) + MD5=$(which md5 2>/dev/null) [ -x "${MD5}" ] && CHECKSUM=`${MD5} "$HGTMP/msg"` if [ -s "$HGTMP/diff" ]; then $EDITOR "$HGTMP/msg" "$HGTMP/diff" || exit $? diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2515,7 +2515,7 @@ def tag(ui, repo, name, rev_=None, **opt rev_ = opts['rev'] message = opts['message'] if opts['remove']: - if not name in repo.tags(): + if not name in repo.tags(): raise util.Abort(_('tag %s does not exist') % name) rev_ = nullid if not message: diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -303,7 +303,7 @@ def patch(patchname, ui, strip=1, cwd=No # Try to be smart only if patch call was not supplied if util.needbinarypatch(): args.append('--binary') - + if not patcher: raise util.Abort(_('no patch command found in hgrc or PATH')) diff --git a/templates/gitweb/map b/templates/gitweb/map --- a/templates/gitweb/map +++ b/templates/gitweb/map @@ -51,7 +51,7 @@ branchtag = ' 2: # variables with empty values may not exist on all platforms, filter # them now for portability sake. -env = [k for k,v in os.environ.iteritems() +env = [k for k, v in os.environ.iteritems() if k.startswith("HG_") and v] env.sort() diff --git a/tests/test-annotate b/tests/test-annotate --- a/tests/test-annotate +++ b/tests/test-annotate @@ -78,7 +78,7 @@ echo % linkrev vs rev hg annotate -r tip a # test issue 589 -# annotate was crashing when trying to --follow something +# annotate was crashing when trying to --follow something # like A -> B -> A echo % generate ABA rename configuration echo foo > foo diff --git a/tests/test-dispatch b/tests/test-dispatch --- a/tests/test-dispatch +++ b/tests/test-dispatch @@ -22,4 +22,4 @@ cd .. hg cat exit 0 - \ No newline at end of file + diff --git a/tests/test-empty-file b/tests/test-empty-file --- a/tests/test-empty-file +++ b/tests/test-empty-file @@ -18,7 +18,7 @@ hg commit -m 'add empty3' -d '1000000 0' hg heads hg merge 1 -# before changeset 05257fd28591, we didn't notice the +# before changeset 05257fd28591, we didn't notice the # empty file that came from rev 1. hg status hg commit -m merge -d '1000000 0' diff --git a/tests/test-empty-group b/tests/test-empty-group --- a/tests/test-empty-group +++ b/tests/test-empty-group @@ -1,12 +1,12 @@ #!/bin/sh # -# A B -# -# 3 4 3 -# |\/| |\ -# |/\| | \ -# 1 2 1 2 -# \ / \ / +# A B +# +# 3 4 3 +# |\/| |\ +# |/\| | \ +# 1 2 1 2 +# \ / \ / # 0 0 # # if the result of the merge of 1 and 2 diff --git a/tests/test-hgrc b/tests/test-hgrc --- a/tests/test-hgrc +++ b/tests/test-hgrc @@ -4,4 +4,4 @@ mkdir t cd t hg init echo "invalid" > .hg/hgrc -hg status 2>&1 |sed -e "s:/.*\(/t/.*\):...\1:" +hg status 2>&1 |sed -e "s:/.*\(/t/.*\):...\1:" diff --git a/tests/test-hook b/tests/test-hook --- a/tests/test-hook +++ b/tests/test-hook @@ -40,7 +40,7 @@ hg commit -m merge -d '2 0' # test generic hooks hg id -hg cat b +hg cat b cd ../b hg pull ../a diff --git a/tests/test-issue322 b/tests/test-issue322 --- a/tests/test-issue322 +++ b/tests/test-issue322 @@ -4,17 +4,17 @@ echo % file replaced with directory hg init a -cd a -echo a > a -hg commit -Ama -rm a -mkdir a +cd a +echo a > a +hg commit -Ama +rm a +mkdir a echo a > a/a echo % should fail - would corrupt dirstate hg add a/a -cd .. +cd .. echo % directory replaced with file diff --git a/tests/test-issue433 b/tests/test-issue433 --- a/tests/test-issue433 +++ b/tests/test-issue433 @@ -2,9 +2,9 @@ # http://www.selenic.com/mercurial/bts/issue433 hg init a -cd a -echo a > a -hg commit -Ama +cd a +echo a > a +hg commit -Ama hg parents -r 0 doesnotexist true diff --git a/tests/test-mq-qrefresh-replace-log-message b/tests/test-mq-qrefresh-replace-log-message --- a/tests/test-mq-qrefresh-replace-log-message +++ b/tests/test-mq-qrefresh-replace-log-message @@ -19,7 +19,7 @@ echo # Testing changing message with -m echo bbbb > file -hg qrefresh -m "Second commit message" +hg qrefresh -m "Second commit message" echo ======================= echo "Should display 'Second commit message'" hg log -l1 -v | sed -n '/description/,$p' @@ -41,7 +41,7 @@ hg qnew -m "First commit message" second echo aaaa > file2 hg add file2 echo bbbb > file2 -(echo "Fifth commit message" +(echo "Fifth commit message" echo " This is the 5th log message" >> logfile) |\ hg qrefresh -l- echo ======================= diff --git a/tests/test-rename-merge2 b/tests/test-rename-merge2 --- a/tests/test-rename-merge2 +++ b/tests/test-rename-merge2 @@ -12,7 +12,7 @@ EOF HGMERGE="python ../merge"; export HGMERGE # perform a test merge with possible renaming -# +# # args: # $1 = action in local branch # $2 = action in remote branch @@ -57,7 +57,7 @@ tm() hg status -camC -X rev hg ci -m "merge" -d "0 0" - + echo "--------------" echo @@ -65,10 +65,10 @@ tm() rm -r t } -up() { +up() { cp rev $1 hg add $1 2> /dev/null - if [ "$2" != "" ] ; then + if [ "$2" != "" ] ; then cp rev $2 hg add $2 2> /dev/null fi @@ -95,7 +95,7 @@ tm "up b " "nm a b" " " "13 merge tm "nc a b" "up a b" " " "14 merge b no ancestor" tm "up b " "nm a b" " " "15 merge b no ancestor, remove a" tm "nc a b" "up a b" " " "16 get a, merge b no ancestor" -tm "up a b" "nc a b" " " "17 keep a, merge b no ancestor" +tm "up a b" "nc a b" " " "17 keep a, merge b no ancestor" tm "nm a b" "up a b" " " "18 merge b no ancestor" tm "up a b" "nm a b" " " "19 merge b no ancestor, prompt remove a" tm "up a " "um a b" " " "20 merge a and b to b, remove a" diff --git a/tests/test-tags b/tests/test-tags --- a/tests/test-tags +++ b/tests/test-tags @@ -81,7 +81,7 @@ hg ci -m 'change foo 2' -d '1000000 0' # hg tags # test tag removal -hg tag --remove -d '1000000 0' bar +hg tag --remove -d '1000000 0' bar hg tip hg tags diff --git a/tests/test-up-local-change b/tests/test-up-local-change --- a/tests/test-up-local-change +++ b/tests/test-up-local-change @@ -63,6 +63,6 @@ echo a > a/a echo a > b/a hg --cwd a commit -A -m a cd b -hg add a +hg add a hg pull -u ../a hg st