Imagine you have commited file which name contain non latin letters.
git init test-repo cd test-repo echo "test" > тест.тэхэтэ git add . git commit -m "initial commit" Ok, lets list files changed at revision
git log -p Here you can see escaped file name, and obvious its hard to read.
diff --git "a/\321\202\320\265\321\201\321\202.\321\202\321\215\321\205\321\215\ new file mode 100644 index 0000000..9daeafb --- /dev/null +++ "b/\321\202\320\265\321\201\321\202.\321\202\321\215\321\205\321\215\321\202 @@ -0,0 +1 @@ +test To handle this case there is config options ‘core.
Sometimes (more precisely - rarely) you need to export files changed at given revision as directory tree instead of patch file.
Mercurial vcs has archive command which let you to export selected files at given revision:
hg archive --type files --rev $REVISION -I list_of_files To list files changed at revision:
hg log -r $REVISION --template '{files}\n' | sed 's/\n / -I /g' Here end of line character is used to handle the case of using space character in filename.
Church numerals is a great example of introducing abstraction in terms of composition of functions. This concept demonstrates that “data” (naturals numbers in particular) and operations on data can be defined in the same way - using higher-order functions.
Summary:
type Church a = (a -> a) -> a -> a zero, cone, ctwo :: Church a zero s z = z one s z = s z two s = s .
Some time ago i read excellent post about emacs library pcomplete.
The author described implementation of completion for git, mercurial version control system using this library. Article is really usefull, i used code as is, its easy and provides all you need, but later i have some problem with it.
First problem - eager evaluation. General commands for git and mercurial are calculated once. Great, there is no reason to call external process like git or hg multiple times but precalculation occured at script evaluation.
Foreword:
Sometimes you need to edit PATH variable.
Of course you edit .bash_profile, .bashrc, .profile or other scripts and this works fine only in terminal.
GUI apps at Mac Os use its own PATH variable (moreover has its own environment), which can be set using ‘launchctl setenv PATH <PATH_VALUE>’.
So you need to setup PATH for GUI apps correctly, and do not forget about PATH var for terminal.
Moreover, after update to Mac Os X 10.