Tuesday, August 23, 2016

Re: Using version control with django

On 2016-08-23 12:42, Rich Shepard wrote:
> I want to track django projects with subversion. (Single
> developer, local, so svn is better suited than the distributed git
> and mercurial.)

I used subversion both as a solo developer and as part of a team, and
have migrated to a DVCS for both simply because my code/repo can be
on multiple machines (laptop, desktop, hosting service, etc) even if
it's not part of a team, and branching/merging is much less painful
(well, branching in SVN is easy, it's the merging that I never found
easy). While I've settled on git for my needs (as has my $DAYJOB), I
have also used and endorse both Mercurial (hg) and Fossil as strong
competitors. For the solo developer (or small team) Fossil has some
really compelling features such as a built-in web interface that
includes a wiki and bug-tracking/ticketing system. Mercurial's
learning curve was a little shallower when coming from SVN yet will
still giving you most of the power of git (I think pretty much all
of git's functionality can now be mirrored with Mercurial but you
may have to enable some of the features that are disabled by default).

> So, where should I place trunk/, tags/, and branches/ be
> created? If they're in the overall project root
> (~/development/crm-project/) should I then move that directory's
> contents into the newly made trunk/ subdirectory?

Yes. Though see below about Subversion's partial checkouts.

You'd want the root of your project in the root of your trunk/master
which means Subversion would have

$ROOT_DIR/.svn/
$ROOT_DIR/trunk/.svn/
$ROOT_DIR/trunk/__init__.py
$ROOT_DIR/trunk/settings.py
$ROOT_DIR/trunk/crm/
$ROOT_DIR/trunk/crm/.svn/
$ROOT_DIR/trunk/crm/...
$ROOT_DIR/trunk/urls.py
$ROOT_DIR/trunk/wsgi.py
$ROOT_DIR/branches/...
$ROOT_DIR/branches/.svn/
$ROOT_DIR/tags/...
$ROOT_DIR/tags/.svn

(I understand that more recent versions of Subversion have an option
to refrain from littering your working-directories with .svn/ folders,
having just one at the root level)

while git/mercurial would have

$ROOT_DIR/.git/
$ROOT_DIR/__init__.py
$ROOT_DIR/crm/...
$ROOT_DIR/settings.py
$ROOT_DIR/urls.py
$ROOT_DIR/wsgi.py

Though to be fair, Subversion's lets you do partial check-outs, so
you can check out $ROOT_DIR/trunk/ or $ROOT_DIR/branches/$BRANCH into
a single folder, even if the containing repository is arranged as
described above.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20160823193357.20d88554%40bigbox.christie.dr.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment