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
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
Matt Mackall
a65ef7bc5d
util: add sort helper
2008-06-27 18:28:45 -05:00
Matt Mackall
d4ab55a92b
status: clean up all users for unknown files
2008-06-27 13:43:29 -05:00
Matt Mackall
73c76dd164
repo.status: eliminate list_
2008-06-26 14:35:50 -05:00
Matt Mackall
bc715be859
add __len__ and __iter__ methods to repo and revlog
2008-06-26 14:35:50 -05:00
Matt Mackall
dcacfb3161
manifest: remove execf/linkf methods
2008-06-26 14:35:50 -05:00
Matt Mackall
fbb5127472
use repo[changeid] to get a changectx
2008-06-26 14:35:46 -05:00
Matt Mackall
d462e1fc26
simplify flag handling
...
add _checklink var to dirstate
introduce dirstate.flagfunc
switch users of util.execfunc/linkfunc to flagfunc
change manifestdict.set to take a flags string
change ctx.fileflags to ctx.flags
change gitmode func to a dict
remove util.execfunc/linkfunc
2008-06-26 13:46:34 -05:00
Matt Mackall
5867ff1667
use repo.changectx(None) to get a workingctx
2008-06-26 13:46:29 -05:00
Matt Mackall
9d556277c8
context: avoid using None for working parent
2008-06-25 17:35:20 -05:00
Matt Mackall
5001543d15
use repo.changectx rather than context.changectx
2008-06-25 17:34:28 -05:00
Christian Ebert
dba21309cf
keyword: mimic cmdutil.bail_if_changed even more
...
At the check before overwriting with kwexpand, kwshrink:
- abort when in middle of merge
- give terser abort message
2008-06-12 02:27:06 +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
Matt Mackall
fb88571d19
match: remove files arg from repo.status and friends
2008-05-12 11:37:08 -05:00
Matt Mackall
081e89551b
match: remove files argument from patch.diff
2008-05-12 11:37:08 -05:00
Matt Mackall
e02d6f5a75
walk: remove remaining users of cmdutils.matchpats
2008-05-12 11:37:07 -05:00
Bryan O'Sullivan
324c60f864
Get rid of reimplementations of util.binary
2008-04-09 15:49:20 -07:00
Christian Ebert
0051fba0c0
keyword: check for '\0' in entire data before acting
...
util.binary might not be safe enough, as it fails eg. on certain
pdf files (issue1066).
2008-04-09 14:12:32 +02:00
Christian Ebert
65d5e4ac26
keyword: make overwrite() arguments mandatory
2008-04-09 14:05:57 +02:00
Christian Ebert
7567765ad1
keyword: compact setting of optional arguments
2008-04-09 14:05:57 +02:00
Christian Ebert
4f367170f4
keyword: privatize remaining monkeypatches by moving them into reposetup
...
Make it more transparent if and when monkeypatches are needed.
2008-04-09 14:05:57 +02:00
Christian Ebert
3064a91343
keyword: collect filename patterns, wrap dispatch._parse in uisetup
...
Store [keyword] config in kwtools.
hgcmd defaults to empty string.
2008-04-09 14:05:56 +02:00
Christian Ebert
8d6395cf2d
keyword: regroup monkey patch code, underscore prefix private vars
2008-03-31 11:08:52 +02:00
Dirkjan Ochtman
ef391be22f
hgweb: refactor hgweb code
2008-03-28 19:40:44 +01:00
Joel Rosdahl
5dae3059a0
Expand import * to allow Pyflakes to find problems
2008-03-06 22:23:26 +01: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
a9403cc1e0
keyword: do not inspect node1 for diff if node2 is given
2008-02-15 18:37:00 +01:00
Christian Ebert
7255aa00ca
keyword: make main class and hg command accessible
...
Switch from global vars to top level dictionary.
Goal: make it easier for external tools (like tortoisehg)
to hook into keyword extension.
2008-02-15 18:36:28 +01:00
Christian Ebert
ee14824c5c
keyword: move expand/shrink decisions into kwtemplater
...
- do not clobber wrapper code
- get rid of clumsy kwtemplater attributes
2008-02-15 18:21:02 +01:00
Christian Ebert
fa355756f8
keyword: monkeypatch patch.diff for non-interactive diffs
...
Avoid clobbering diffs with expanded keywords eg. for
notify extension.
2008-02-13 23:49:57 +01:00
Christian Ebert
873b99708a
keyword: add glog to nokwcommands
2008-02-12 21:44:56 +01:00
Christian Ebert
5ae8043b4f
keyword: enable all monkey patches using _kwtemplater at reposetup
...
- no need for try-except block
- underscore prefix for private methods
- add doc strings
2008-02-10 08:25:09 +01:00
Christian Ebert
23b761501c
keyword: no expansion in web diffs
...
Expansion in hgweb view of changesets and diffs is not needed and
only distracting.
Expansion stays enable in file and archive requests where it
makes sense.
2008-02-10 04:24:59 +01:00
Christian Ebert
48114de10d
keyword: make restrict entirely a kwtemplater attribute
2008-02-10 01:53:19 +01:00
Christian Ebert
9543ba8beb
keyword: declare globals in a more compact way
2008-02-09 22:50:53 +01:00
Christian Ebert
beb5041c53
keyword: avoid os import by using util.splitpath
2008-02-09 22:37:51 +01:00
Patrick Mezard
e8fa1f56b2
keyword: fix symlink detection under Windows
2008-02-09 20:17:06 +01:00
Patrick Mezard
86d030fcbd
keyword: fix mq repository detection under Windows
2008-02-09 19:40:30 +01:00
Christian Ebert
afdf1d8870
keyword: monkeypatch dispatch._parse to avoid redundant run
...
Inspired by Thomas Arendsen Hein.
2008-02-07 22:25:00 +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
3a7f707771
keyword: fix pychecker warning about shadowed variable
...
Also no underscore prefix for restricted switch inside reposetup.
2008-02-07 15:56:20 +01:00
Matt Mackall
d3e9e34b5b
keyword: fix my string pasting thinko
...
Spotted by Maxim Dounin
2008-02-05 16:09:21 -06:00
Christian Ebert
9f2689b36a
keyword: nokwcommands, restricted string variables at top level
...
- prettier syntax conforming eg. to commands.norepo
- possibly easier to hook from outside
2008-02-04 21:08:45 +01:00
Christian Ebert
795a5f750c
keyword: split line continuation in 2 steps (style)
2008-02-04 18:27:36 +01:00
Christian Ebert
9a6e5dde8d
keyword: add empty_ok argument to kwrepo.commit
2008-02-04 18:27:36 +01:00
Christian Ebert
6bb66cc4a1
keyword: allow keyword expansion on clone
...
If [keyword] filename patterns are specified in a global hgrc
keywords will be expanded in clone.
This behaviour is more consistent but also more dangerous.
Specifying global, and thus more complicted, [keyword] patterns
might slow things down as well.
Mention this in help?
2008-02-04 18:27:36 +01:00
Matt Mackall
41e5c79455
templates: move filters to their own module
...
This eliminates just about all Mercurial dependencies in templater.py
2008-01-31 14:44:19 -06:00
Christian Ebert
bb3bdb2336
keyword: detect restricted commands thru variable
2008-01-26 13:04:36 +00:00
Christian Ebert
5e101da3a2
keyword: improve use of dicts
...
- actually use iteritems() when we iter over items of a dictionary
- store commit hooks in dictionary
(safe, as hook.hook() sorts before execution)
2008-01-22 13:12:43 +01:00