Showing posts with label scm. Show all posts
Showing posts with label scm. Show all posts

2012-07-17

Pragmatic Starter Kit Books

6.21: news.cyb/dev/Pragmatic Starter Kit Books:

     Pragmatic Version Control
     Pragmatic Unit Testing
     Pragmatic Project Automation

6.25: what is Project Automation about?:

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 .

2009-12-26

svn on g'code

6.18: g'code/how to add code:
your source repository:

1. For instructions on how to check out a project's repository
from the command line, go to the Source tab.
Any user, regardless of whether they have a Google account,
can check out and browse the repository anonymously,
while project owners and members are granted full read and write permissions.
You can add project owners and members at the Administer tab.

2. If you plan on synching from an existing repository,
you must click the Reset This Repository link
at the bottom of the Source tab page
before making any other changes to your project's repository.
This includes creating any new wiki pages
because resetting the repository results in the loss of wiki content.
Do not start a wiki page in your project before you complete this step.

. on the source tab`page it says this:

New project? You can reset this repository
so that svnsync can be used to upload existing code history.
Command-Line Access
If you plan to make changes,
use this command to check out the code as yourself

svn checkout https://addm.googlecode.com/svn/trunk/ addm --username dr.addn

When prompted, enter your generated[*] googlecode.com password.
generated?
. Your googlecode.com password: random
This password is used by project owners and members when
checking out or committing source code changes,
or when using command-line tools to upload files to the project "Downloads" tab.

After you've been working with your project for a while,
the following subtabs on the Source tab will come in handy:
* Browse subtab
-- Allows you to browse the files and directories in your project
as they existed at a point in time.
* Changes subtab
-- Lists changes made to the repository.
You can also use this subtab to start a code review of any change.

Documenting your Project on the Wiki Tab

You can use the functionality under the Wiki tab
to create wiki pages for your project. Our wiki syntax is inspired by the
MoinMoin wiki syntax, and is more or less a subset of it.
We've found that MoinMoin is one of the most popular open source wikis
and provides a clean syntax for users.

Perform the following to create a wiki page:

1. In your project, click the Wiki tab.
2. Click the New page subtab.
3. Type the Page Name. This value must be alphanumeric with no spaces.
You won't be able to change this name later,
so be careful.
4. Enter the text and syntax for the page in the Content field.
Learn more about the wiki syntax.
5. Click a link in one of the Labels fields to see the available list of labels.
Labels help the user determine how relevant the wiki page is to them.
6. Click Preview, Save page, or Discard.

Subversion -- do you use?

We currently use Subversion 1.5.4, made available via WebDAV.
developers must use authenticated https:// to commit changes.

new to open source... how do I run an open source project?
If you are new, you should plan to
participate in existing open source projects to learn how they work.
You might also want to check out Karl Fogel's book,
Producing Open Source Software.

svn in xcode

6.5: proj.addn/net.stackoverflow.com/questions/511913/svn-and-xcode-woes:
. while doing a search [@] web.addn/dev.mac/subversion with xcode?
I noticed another asking the same question,
[@] http://stackoverflow.com/questions/511913/svn-and-xcode-woes
so, I pointed them to my find:
"(
apple's 2005 advice:
) .
6.18: proj.addn/mac/svn clients:
. where are svn gui app's for mac?
. here is some mac code;
Note carefully the Subversion version included in this installer
(from the installer package name). 0.7.3q - svn.1.6.2
If you have been using an earlier version of Subversion from the command line,
or with some other client,
you should upgrade all other such versions before installing this.
Otherwise, any working copy that has been touched by SCPlugin
will no longer be usable by your other clients.
Conversely, if you have other Subversion clients that use Subversion 1.5.x,
be sure to use a 1.5.x version of SCPlugin.
) .
my mac's svn version is 1.4.4
. I'm betting that I have not used mac's svn for anything
except to bring src down from other's svn's .

booking"svn (svnbook.red-bean)
"(
Subversion, CVS, and many other version control systems
use a copy-modify-merge model as an alternative to locking.
In this model, each user's client contacts the project repository
and creates a personal working copy
-- a local reflection of the repository's files and directories.
Users then work simultaneously and independently,
modifying their private copies.
Finally, the private copies are merged together into a new, final version.
The version control system often assists with the merging,
but ultimately, a human being is responsible for making it happen correctly.
eg,
When Harry attempts to save his changes to a file updated by sally,
the repository informs him that his file A is out of date.
So Harry asks his client to merge any new changes from the repository
into his working copy of file A.
Chances are that Sally's changes don't overlap with his own;
once he has both sets of changes integrated,
he saves his working copy back to the repository.
) --
[. from here I'm getting the impression
that the reason svn is sufficient
is that it's meant for collaborations
only by teams that are lead by
mgt, or concensus,
so that concurrent efforts are well orchestrated .
. the only time there would be a need for a merge
is when one person is doing the coding
while the other persons are doing only
review and corrections,
or additions to documentation sections;
ie, being meant as additions,
the merging should be a snap . ]


use of git to download a project

6.28: proj.addn/mac.git/use of git to download a project:

imac:~ addn$ man git

[1]+ Stopped man git
imac:~ addn$ git git://github.com/timburks/cocoa-programming-with-nu.git
git: 'git://github.com/timburks/cocoa-programming-with-nu.git' is not a git-command. See 'git --help'.
imac:~ addn$ git --help
usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate|--no-pager]
[--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS]

The most commonly used git commands are:
add Add file contents to the index
bisect Find the change that introduced a bug by binary search
branch List, create, or delete branches
checkout Checkout a branch or paths to the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
grep Print lines matching a pattern
init Create an empty git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
pull Fetch from and merge with another repository or a local branch
push Update remote refs along with associated objects
rebase Forward-port local commits to the updated upstream head
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
show Show various types of objects
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG

See 'git help COMMAND' for more information on a specific command.
imac:~ addn$ git clone git://github.com/timburks/cocoa-programming-with-nu.git
Initialized empty Git repository in /Users/addn/cocoa-programming-with-nu/.git/
remote: Counting objects: 404, done.
remote: Compressing objects: 100% (182/182), done.
remote: Total 404 (delta 150), reused 404 (delta 150)
Receiving objects: 100% (404/404), 661.32 KiB | 197 KiB/s, done.
Resolving deltas: 100% (150/150), done.
imac:~ addn$

2009-10-15

scm on google`code hosting

scm (source control mgt)
[10.15:
. I've been eagerly preparing to have my code hosted on Google`code,
reading up on svn,
but I was more impressed by Linus Torvald's presentation of Git,
so I was quite interested in Google's adoption of Hg instead of Git . ]