Non IDE development strategy - what do others do that's fairly simple?
Cameron Simpson
cs at cskk.id.au
Sat Aug 1 19:08:04 EDT 2020
On 30Jul2020 21:15, Marco Sulla <Marco.Sulla.Python at gmail.com> wrote:
>What you want is a branch, I guess.
>
>https://www.mercurial-scm.org/wiki/Branch
>
>For simplicity, I suggest you have two different directories: one for the
>development branch and the other for the production branch.
Yes to this advice.
And I am also an editor in one window and command line in another window
person.
Note that a Mercurial "named branch" is a more, um, "solid" thing than a
git branch, which is much more like a mercurial bookmark. Basicly, you
can't easily remove a mercurial named branch. Bookmarks you can make and
discard freely. That said, I hardly ever use bookmarks.
You also do not need a named branch - a cloned directory works as well.
I use mercurial branches for long lived things, particularly development
on theme. My personal library has a bunch of long term branches - they
all get merged back into "default" frequently as things stabilise.
So for your scenario I'd add a named branch for the development,
particularly if it has a theme. But also as Marco suggests, clone your
tree into another directory for the development.
Look:
[~]fleet2*> cd ~/hg
/Users/cameron/hg
[~/hg]fleet2*> ls -d css-*
css-adzapper css-nodedb-nested-curly-syntax
css-aws css-nodedb-proxyobjs
css-beyonwiz css-persist
css-calibre css-pilfer
css-contractutils css-pt
css-csbug css-py3
[...]
Each of those trees is a clone of the main "css" tree. They do not all
have named branches.
[~/hg]fleet2*> cd css
[~/hg/css(hg:default)]fleet2*> hg clone . ../css-newdev
[~/hg/css(hg:default)]fleet2*> cd ../css-newdev
[~/hg/css-newdev(hg:default)]fleet2*> hg branch newdev
[~/hg/css-newdev(hg:newdev)]fleet2*>
So now I've got a clone in css-newdev, for a new named branch "newdev"
(obviously pick a better branch name). No need to make a named branch,
unless this is long lived, in which case it helps you track where
changes occurred - the branch name is recorded in commits.
You can merge to or from "../css" as needed.
I find this _much_ easier to deal with than the common git habit of
switching branches in place (which you can also do).
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Python-list
mailing list