2010-02-28

dvcs with gui on mac for securing data

2.28: summary:
. notes of my journey deciding on Mercurial .

2.1: news.addn/dev/scm/internals of git:
. the popular $9 [Git internals] book from Peepcode.
conceptuals:
http://www.eecs.harvard.edu/~cduan/technical/git/
man page everyone should read:
http://www.kernel.org/pub/software/scm/git/docs/gitworkflows.html
...
http://www.stevestreeting.com/2009/08/06/getting-more-structured-with-my-dvcs-tests/

2.1: proj.addn/dev/scm:

. how is svn on {tortoise, mac} knowing where to check;
is there something integrated on mac?
. how do you limit growth of the time mach aspect?
be careful with your updates (don't commit a bunch
you'll only be deleting later);
export and reimport .
. make sure backup is obvious when transfering things to git .
. consider project size;
is svn smarter replacement of mac timemach?

web:
scripts instead of gui
http://svn-finder.sourceforge.net/

http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients
SmartSVN 79.00
xMerge add-on (Merging renamed/moved files) 399.00 USD
http://www.syntevo.com/smartsvn/index.html
. after that, I'm wondering if that lack of xmerge
was the reason git's inventor calls svn braindead .

http://versioncontrolblog.com/comparison/Bazaar/CVS/Git/Mercurial/Subversion/index.html
. hg might have better doc's?
and it's already installed on mac x.6 .
http://mercurial.berkwood.com/
The hg executable is now placed in /usr/local/bin for all versions of the installer.
For OS X 10.5 & 10.6
The package uses the default Python installation that comes installed.

darcs might fit my use case well

http://wiki.bazaar.canonical.com/MacOSXBundle/SnowLeopard
http://bazaar-vcs.org/WindowsDownloads

http://stackoverflow.com/questions/2105278/is-there-a-way-for-bazaar-to-automatically-detect-and-apply-changes-made-in-a-wor
Is there a way for Bazaar to be able to automatically detect changes (adds, removes, renames, etc.) made to part of the working directory and automatically apply them?
It looks like the automv plug-in will automatically detect renames and moves. This, along with bzr add * should do the trick.

http://www.stevestreeting.com/2009/09/28/early-stage-gitmercurialbazaar-evaluation-thoughts/

bzr copy doesn't work as expected
https://bugs.launchpad.net/bzr/+bug/269095

there is a rebase plugin available for Bazaar ( bazaar-vcs.org/Rebase)
and a queues one (launchpad.net/bzr-loom).

Bazaar does line-ending conversion already, since 1.14:
through a plugin (bzr-eol)..

http://doc.bazaar-vcs.org/explorer/en/visual-tour-windows.html

http://wiki.bazaar.canonical.com/BzrUsingBoundBranches
Bound branches are a way to make sure that both a local branch
and a remote branch have the same revisions.
This is particularly useful if one likes to work on two machines .
online plugins guide


pos.addn/dev/scm/for mac and pc:
. maybe I can use svn on pc side,
then use timemach on mac side?
Using Git With OS X: 6 Tools to Get You Up and Running


2.2: proj.addn/dev/scm/installs not going as expected:
. explore downloads meant for installing,
didn't I miss something about scm?
I looked at several things yesterday,
and I don't have anything in a context menu .


http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients
http://better-scm.berlios.de/comparison/comparison.html
http://en.wikipedia.org/wiki/Comparison_of_revision_control_software#User_interfaces


bzr-explorer for mac looks great
but the installers are only for pc:
https://launchpad.net/bzr-explorer/+download
download icon bzr-explorer-setup-0.11.2.exe (md5, sig)
Windows universal installer 198
download icon bzr-explorer-0.11.2.tar.gz (md5, sig)
Source code
. the visual tour of that .
however:
Standalone Installer page says it includes several gui's:
This is typically the best choice for most users and includes:
* the core Bazaar distribution
GUI clients - Bazaar Explorer, QBzr and optionally TortoiseBzr
numerous bundled plugins including BzrTools, bzr-svn, bzr-upload and bzr-xmloutput
* bundled Python (currently 2.5) interpreter with most (but not all) libraries.

for mac, there is a set of tools, no gui :
http://wiki.bazaar.canonical.com/MacOSXBundle/SnowLeopard

mac.mercurial.gui
http://www.jwwalker.com/pages/macmerc.html

mac.mercurial.gui#tortoisehg
http://tortoisehg.bitbucket.org/
http://bitbucket.org/tortoisehg/stable/wiki/ReleaseNotes


mac has tools update here
http://mercurial.selenic.com/wiki/mercurial-1.4.3_20100201-py2.6-macosx10.6
and great doc's;
http://hgbook.red-bean.com/
it also has a pkg that includes hg with tortoise for pc .
. it's the same one I got here: http://tortoisehg.bitbucket.org



textmate has scm support,
group collects why textmate is great;
http://stackoverflow.com/questions/33813/what-are-some-useful-textmate-features
note there is a clone for pc too:
http://www.e-texteditor.com/
co.dev:
http://e-texteditor.com/blog/category/tutorial


http://stackoverflow.com/questions/1598759/git-and-mercurial-compare-and-contrast


2.7:
[@] proj.addn/backup/log under hg control



2.8: bk.addn/dev/scm/patches:

. patches are files that show how 2 versions of a file differ .
. they're an alternative to journaling files
describing all changes in terms of
whole-line deletions and insertions .
. each contiguous pair of deletions and insertions
is refered to as one hunk of the patch .

. unix makes a patch with diff(txt,txt).patch,
and applies a patch with patch(patch).txt
. patch() doesn't represent folder systems exactly:
file creation doesn't show up if no lines were added;
and, file deletions don't show if the file was empty .

. patches are still being used as an alt' to
scm or version control systems
since the effect of each patch is the same as
one changeset -- the changes produced from
moving from one version to a child version .
. patches are typically used for customizing a codebase;
esp'ly when you aren't influential with that project
and can't get them to add your patches
as conditional compilation stmt's .
. in some large projects like the Linux kernel,
replacing patches with conditionals
would make the code unreadably complicated .

. combining scm with patching,
changes can be saved as a patch:
at any point where you could hg`commit,
you could instead diff() .


2.8: tips from trinitycore.org:

A tip about merging tool.
kdiff3.args=-L1 base --L2 local --L3 other $base $local $other -o $output
kdiff3.args=-L1 base --L2 local --L3 other $base $local $other -o $output --auto
sometimes you have hundreds of files to merge
but kdiff3 can solve conflicts automatically.
If you do not add "--auto"
you have to manually close the spammed kdiff3 windows.

hg serve
. the webserver option allows us to create
a great looking repo page for your local repo
on any port of your choosing.


proj.addn/dev/scm/eoln:

2.7:
. for getting eoln's done right,
-- where files checked out to a pc have pc eoln's --
my plan is to use yet another clone
on the main hard.drive,
after affecting some setting,
is this right?:
[configure repo'].window/diff/[Patch EOL]
-- default is no normalization,
so it's set to: platform?
( pc: crlf
, mac: lf
) .
you can tell when you've done this right
because agent-ransack or notepad will act right
and not ball-up the whole file on one line .
. instead of doing another clone,
I'll just add a working dir' to backup's clone
with backup`menu/tortoiseHg/update .

2.8: correction didn't take:

. after changing the hgrc file,
I cloned that to my xp's shared.folder;
but this did not work either .
. maybe I should clone without update,
then modify the new clone's hgrc,
then update .
. in any case I should do more booking:
file:///C:/Program Files/TortoiseHg/docs/hgrc.5.html

Filters for transforming files on checkout/checkin.
The most common usage is for
LF <-> CRLF translation on Windows.
For this, use the "smart" converters
which check for binary files:

[extensions]
hgext.win32text =
[encode]
** = cleverencode:
[decode]
** = cleverdecode:

Win32TextExtension short-comings:

biggest problem:
* The settings are not part of the repository
so all users must configure it for each clone.
[2.9:
. they would rather replace universal eoln's
with metadata which tells all cloners
that a given file or file`type
is supposed to use a particular eoln;
meaning that there must unversally be
tools that support a file's current eoln type .
Mark Hammond Dec 1, 2009:
. server-side hooks that force the line endings?
(ie: project/.hg/hgrc#[hooks]
pretxncommit.crlf = python:hgext.win32text.forbidcrlf
)
. this would only apply at *push* time,
not commit time. [ie, this may help the central repo,
but the lower-level repo's will have
already had their repo' histories destroyed .]
Given the distributed nature of hg
it seems that by the time a server-side hook kicks in,
the damage has already been done .
]

tips from trinitycore.org:
some bugs related to eol:
1. your patch modifies the whole file instead of only a few lines
2. you cannot apply patches (hunk failed)
3. your whole file is modified even if you did not change it
4. you cannot open .sln files using vc++

how to solve the problem:
1: apply hgext.win32text to [user's] global config file
[... and other steps if you're applying patches]
2: re-clone your local repo (must re-clone)
3: dos2unix and unix2dos are also handy:
. a patch is usually made with Unix`eoln's
but the patch needs dos`eoln's (with unix2dos)
in order to be applied to a source
that is cloned under the win32text extension .

another mod having a similar effect:
I was having a problem with
differences in whitespace
showing up into my patch files.
This added to my .hgrc helped that:
[diff]
ignorews=True
-- also, I no longer need to run this after updates:
dos2unix `find ./ -name '*.cpp' -o -name '*.h'`

2.9: here is the eoln ext's man'l!

. the reason for the change not sticking
was that the encode or decode filter settings
should not be changed while you have files checked out
- use hg update null
to remove any working files first.
[from the gui, tortoiseHg,
it might be easier to delete and reclone]

the filters come in two variants:
A "dumb" filter which modifies
anything looking like line endings
in all files it is applied to,
and a "clever" filter which only works on
files NOT containing zero bytes.
[what does "(not work) mean ?]
The simple heuristics used by the "clever" filter
will fail in some cases,
but it often works so well
that it can just be applied to all files.

a warning about the eoln extension:

. win32text is user-specific, not repo-specific.
This was not what we wanted;
svn's svn:eol setting is really handy
and has turned out to be great to have around.
. the hgeol extension currently under development
tries to mimic svn's eol function .
http://bitbucket.org/mg/hg-eol/overview/
. the plan is to have the .hgeol file
http://mercurial.selenic.com/wiki/EOLTranslationPlan
under version control
It would specify how files should be checked out
(e.g. native for the OS, \n, \r\n, or binary)
and make sure that no checkins
are going to lead to bad line endings.
[... but for now]
seems the encoder doesn't work
during conversion as the 'crlf'
commit hook fails.
Is it currently possible to correct the EOL
style of files during repository conversion?


. I used the win32 eoln extension
without the patch option, restarted,




2.10: sci.addn/dev/scm/hg`mov:
. after adding and moving,
I did commit/add (all);
then I tried the commit/mov.button,
and got this msg:
no movables; only clean files files can be moved .


2.12:
web.addn/dev/scm/hg/TortoiseMerge:

. TortoiseMerge is the merge tool that comes with TortoiseSVN;
here is a note on using it from TortoiseHG:
http://sundae.se/2008/06/10/using-tortoisemerge-in-tortoisehg/
. there were some conflicts from commenters,
and some known caveats weren't mentioned,
so I need to check this against the doc's, and some testing .

. add the following to your mercurial.ini file:
. My TortoiseSvn installation has a space character in the path,
so I need to add quotes around the file locaters:
To use this, I have to set Global setting or repository settings
to use myTortoiseMerge as
“Visual diff command” and “3-way Merge Tool”.

merge = filemerge

[extensions]
hgext.extdiff =

[extdiff]
cmd.vdiff = "C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe"
myTortoiseMerge = "C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe"

[merge-tools]
filemerge.executable = "C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe"
filemerge.args = /base:$base /theirs:$other /mine:$local /merged:$output

[tortoisehg]
vdiff = myTortoiseMerge



2.28: mis.addn/dev/scm/xpw.tortoisehg is getting complicated:

major pim change:
. log current year is part of pim.folder
. past log years are in log.folder .

trouble committing (2008 tucs)`L/2008/06 jun/System Scan - PLEASE WAIT - Scan in progress.html!
transaction abort!
rollback completed

[Errno 13] E:\pim\(2008 tucs)`L/2008/06 jun/System Scan - PLEASE WAIT - Scan in progress.html: Access is denied
[command interrupted]

. perhaps the reason for the access denial
is there is a file with nearly the same long name?
rename the other one .

(2008 tucs)`L/2008/01 jan/00.txt~: The system cannot find the path specified


. that error was a mystery as it wasn't reproducable .

No comments:

Post a Comment