Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68825

Re: Question about Source Control

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <cameron@cskk.homeip.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'say,': 0.05; '(so': 0.07; 'debug': 0.07; 'debugging': 0.07; 'diff': 0.07; 'modified': 0.07; 'subject:Question': 0.07; 'editor.': 0.09; 'statements': 0.09; 'subject:Source': 0.09; 'cc:addr:python-list': 0.11; 'changes': 0.15; 'books': 0.15; '24,': 0.16; 'bigger.': 0.16; 'cheap.': 0.16; 'docstring': 0.16; 'extension,': 0.16; 'fond': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'mean,': 0.16; 'message- id:@cskk.homeip.net': 0.16; 'parameter.': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'simpson': 0.16; 'typo': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'commit': 0.19; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'lets': 0.24; 'month,': 0.24; 'mon,': 0.24; 'cheers,': 0.24; 'file.': 0.24; '(or': 0.24; 'cc:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'record': 0.27; 'idea': 0.28; 'correct': 0.29; 'chris': 0.29; 'feature': 0.29; 'am,': 0.29; 'related': 0.29; "i'm": 0.30; 'religious': 0.31; 'file': 0.32; 'summary': 0.32; 'run': 0.32; 'entirely': 0.33; 'not.': 0.33; 'maybe': 0.34; 'but': 0.35; 'charset:us-ascii': 0.36; "i'll": 0.36; 'similar': 0.36; 'should': 0.36; 'wrong': 0.37; 'being': 0.38; 'e.g.': 0.38; 'rather': 0.38; 'little': 0.38; 'even': 0.60; 'read': 0.60; 'easy': 0.60; 'consists': 0.60; 'removing': 0.60; "you're": 0.61; 'back': 0.62; 'content-disposition:inline': 0.62; 'pick': 0.64; 'become': 0.64; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'mar': 0.68; 'combining': 0.68; 'felt': 0.74; 'repeat': 0.74; 'music': 0.75; 'received:192.168.15': 0.84; 'subject:Control': 0.84
Date Mon, 24 Mar 2014 11:19:53 +1100
From Cameron Simpson <cs@zip.com.au>
To Chris Angelico <rosuav@gmail.com>
Subject Re: Question about Source Control
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <CAPTjJmpotXCzkB3NMh9xnJfCVGCeAsYpz6F4VaMA0wZKdqyJQQ@mail.gmail.com>
User-Agent Mutt/1.5.21 (2010-09-15)
References <CAPTjJmpotXCzkB3NMh9xnJfCVGCeAsYpz6F4VaMA0wZKdqyJQQ@mail.gmail.com>
Cc "python-list@python.org" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.8423.1395620402.18130.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1395620402 news.xs4all.nl 2940 [2001:888:2000:d::a6]:48894
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:68825

Show key headers only | View raw


On 24Mar2014 09:56, Chris Angelico <rosuav@gmail.com> wrote:
> On Mon, Mar 24, 2014 at 1:58 AM, Albert-Jan Roskam <fomcl@yahoo.com> wrote:
> > One more thing (so this is not entirely a double post!). While reading these books I found that the authors were pretty religious about Clean Commits. I mean, ok, it's not a good idea to do one huge monolithic commit each month, but I felt they were exaggerating. But maybe I'm wrong and clean commits become more important when the number of collaborators get bigger. It's just so easy to fix something, and e.g. correct that typo in a docstring while you're at it.
> >
> 
> It's important even with a single editor. When you go back and look at
> a commit, you should be able to read the summary and know immediately
> whether a particular line in it should have been edited or not.
> Combining changes into a single commit makes that harder.
> 
> Commits are cheap. Do more of 'em rather than less.

I'm particularly fond of "hg record" (or the similar extension, "hg
crecord"), which lets you commit just parts of a modified file.

When I'm in a debugging branch, it gradually turns into a huge diff.
"hg record" lets me commit specific parts of a diff in a single
commit. Every so often I spent a little while cleaning out related
changes that are going to stay so that the final diffness consists
of debug statements and hacks-in-progress; much smaller.

So I'll pick a file and run an "hg record that-file" and pick all
the diff parts that involve, say, removing some parameter. And in
goes a single commit with just that feature change. Lather, rinse,
repeat for other small concrete changes.

And then my "hg diff" is back to being managably readable.

Cheers,
-- 
Cameron Simpson <cs@zip.com.au>

Wagner's music is better than it sounds.        - Mark Twain

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Question about Source Control Cameron Simpson <cs@zip.com.au> - 2014-03-24 11:19 +1100

csiph-web