Commit Graph

30 Commits

Author SHA1 Message Date
Christian Ebert
0c56ea9b1c keyword: cleanup test and make it portable
- replace sed call with python command
- no need to back up hgrc before record
2010-05-01 20:49:40 +02:00
Christian Ebert
44beae283e keyword: test recording 2010-04-26 04:01:13 +02:00
Christian Ebert
40b4260377 keyword: remove mq commands from restricted list
Monkeypatching patch.diff takes care of this since 224e03d75428.

Test mq more thoroughly by loosening [keywordmaps] and comparing
the output of hg cat with keyword expansion enabled and disabled.
2010-04-26 03:54:18 +02:00
Christian Ebert
5a7688ec87 keyword: replace deprecated mq commands in test 2010-04-16 14:30:13 +02:00
Mads Kiilerich
6d35022505 Tests with spaces in paths
This allows most tests to succeed with
./run-tests.py --tmpdir='/tmp/hg  test'
and introduces other tests for spaces and shell quoting
2010-03-24 01:43:24 +01:00
Christian Ebert
d7ec6a9f9d tests highlight, keyword: load extensions with "ext =" 2009-12-23 17:46:48 +00:00
Christian Ebert
dd907fdefb keyword: go into restricted mode when transplanting
Expanded keyword is read into diff with transplant -b otherwise.
Test this scenario.

Thanks to Adam Berkes for providing an example case.
2009-12-23 12:04:17 +00:00
Mads Kiilerich
0f7110ec11 Merge with redone 9660769e6539 (issue1860) 2009-10-16 11:19:39 +02:00
Christian Ebert
c56e7a0b9e test-keyword: run kwdemo before setting up [keyword] files
kwdemo would pass the test without uisetup otherwise.
Also no need to specify --default option.
2009-09-10 23:15:37 +02:00
Christian Ebert
13ea5fdcd5 keyword: make kwfiles -u show untracked files only (like status)
Remove extra documentation of -u/--unknown, as this is covered in
the option help already.
Like commands.status the code now zips the status flags.

Add more kwfiles tests.
2009-09-30 23:59:03 +02:00
Christian Ebert
00ff1e7846 keyword: remove "help keyword" from test
Testing help output does not make sense as we have no way to
check for errors in content which would be the only reasonable
test here.
2009-08-05 17:20:47 +02:00
Matt Mackall
e7ff3ff5bc merge: allow merging going backwards
New behavior is generally superior and more correct, except possibly
with regards to missing files. hg up . is now effectively a no-op,
which is probably the desired behavior for people expecting to move to
tip, but may surprise people who were expecting deleted files to
reappear.

case 1: update to .

a-w -> a-w

classic: ancestor a
 missing     recreated     right?
 rmed        recreated     WRONG
 added       forgotten     WRONG
 changed     preserved     RIGHT
 conflicted  can't happen

backward merge: ancestor a  (NO EFFECT)
 missing     missing      wrong?
 rm'ed       rm'ed        RIGHT
 added       preserved	  RIGHT
 changed     preserved    RIGHT
 conflicted  can't happen

case 2: update to ancestor of .

a-b-w -> b-w
          \
           a

classic:  ancestor a
 missing       recreated        right?
 rmed          recreated        wrong?
 added         forgotten        wrong?
 changed       preserved        RIGHT
 conflicted    preserved        wrong?

backwards merge: ancestor b
 missing       missing or conflict  right?
 rm'ed         missing or conflict  right?
 changed       preserved            RIGHT
 conflicted    merge                RIGHT
 added         preserved            right?
2009-06-08 18:14:44 -05:00
Martin Geisler
65537ad291 tests: removed redundant "-d '0 0'" from test scripts
The tests are executed with a .hgrc file which adds "-d '0 0'" by
default.
2009-04-26 14:29:02 +02:00
Matt Mackall
966fa4be08 resolve: require -a switch to resolve all files
Like revert -a, this should make this command slightly safer
2008-12-19 16:47:36 -06:00
Christian Ebert
586a27bcb7 notify: mime-encode messages
- addresses will be properly encoded
- message bodies will also be encoded as we are not sending
  patches that are meant to be applied
- update test output
- adapt test-keyword to ignore the new headers
2008-07-12 19:12:18 +01:00
Christian Ebert
ef7b051c64 keyword: avoid additional conflicts during merge/resolve
Make merge and resolve trigger kwtemplater.restricted to compare
data without keyword expansion.
The keyword stays outside the conflict:

$Keyword$
<<<<<<< local
bar
=======
foo
>>>>>>> other

and will again be expanded on commit.
Demonstrate in test case.
2008-08-22 08:26:18 +02:00
Christian Ebert
a72d3adc8a keyword: thorough hgweb testing
- test hgweb while keyword extension is _enabled_
- check expansion with hgweb.file
- besides log and diff, also check annotate for not expanding
2008-08-21 10:20:44 +02:00
Christian Ebert
5f30d91aa9 keyword: add verify to nokwcommands after refactor in 3fd7bf0cb4ce
Add test as well.
Thanks to Guy Brand for spotting this.
2008-08-07 09:53:57 +02:00
Christian Ebert
a2f0369b37 keyword: disable expansion for annotate
Keyword expansion should not be annotated.
Annotate revision when unexpanded keyword was inserted.

Add test.
2008-06-12 11:01:36 +02:00
Dirkjan Ochtman
5f60a364ae tests: add tests for hgweb to test-keyword 2008-03-22 18:33:10 +01:00
Matt Mackall
49e96f2d3e tests: remove some unnecessary sleeps 2008-03-20 14:14:15 -05:00
Alexis S. L. Carvalho
c028f52c83 keyword: remove "identify" and "remove" from nokwcommands
These two commands care about the list of modified files returned
by repo.status and we may need to do a full content comparison to
populate that list.
2008-02-21 16:22:31 -03:00
Christian Ebert
b2bd63ef17 keyword: add test for patch.diff monkey 2008-02-15 18:36:49 +01:00
Patrick Mezard
fec8b8be62 test-keyword: make it run under Windows
- don't cat symlink, content differs
- rewrite OS specific messages
- generate symlink with a bundle
2008-02-09 20:17:09 +01:00
Christian Ebert
4f67830b93 keyword: safeguards against erroneous behaviour or aborts
prevent issues due to global [keyword] filename patterns:
- add email to nokwcommands
- protect everything under .hg from expansion
  (tested with qcommit)
- exclude everything starting with .hg* just in case

prevent abort when pulling from bundlerepo:
- do not set up kwrepo for bundlerepo
  expansion inside a bundle is nonsense

bundlerepo issue spotted and test case provided by pmezard.
2008-02-06 23:14:33 +01:00
Christian Ebert
3f18608289 keyword: add very simple mq test 2008-01-19 03:06:01 +01:00
Christian Ebert
3cecc890c2 keyword: test that expansion is done filewise
Checks issue fixed in e56f3648b9a0.
2008-01-11 23:36:56 +01:00
Thomas Arendsen Hein
3b2b9afe52 Solaris compatibility fixes for test-keyword:
- do not use /bin/false (yields 255 instead of 1)
- do not use "cd -", simply use "cd .." instead.
2008-01-14 09:00:23 +01:00
Will Maier
213ea70ab4 Don't use the -i option with sed
This patch fixes test-keyword on platforms without GNU sed (like
OpenBSD).
2008-01-09 10:00:18 -06:00
Christian Ebert
459ae2dd85 keyword: add test 2008-01-04 18:22:39 +01:00