Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #68534
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'exercise': 0.04; 'subject:Question': 0.07; 'adopted': 0.09; 'committing': 0.09; 'default.': 0.09; 'derived': 0.09; 'git': 0.09; 'rewrite': 0.09; 'subject:Source': 0.09; 'terms,': 0.09; 'cc:addr:python-list': 0.11; 'thread': 0.14; 'changes': 0.15; '"current': 0.16; '*before*': 0.16; 'clone': 0.16; 'fiddle': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'interactive,': 0.16; 'porting': 0.16; 'reedy': 0.16; 'reverses': 0.16; 'script,': 0.16; 'share,': 0.16; 'thinking,': 0.16; 'typo': 0.16; 'whatever,': 0.16; 'pushed': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'wed,': 0.18; 'module': 0.19; 'commit': 0.19; '(the': 0.22; 'command': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; 'lets': 0.24; 'logical': 0.24; 'tend': 0.24; 'regardless': 0.24; 'together.': 0.24; 'file.': 0.24; '(or': 0.24; 'cc:2**0': 0.24; 'sort': 0.25; 'script': 0.25; 'least': 0.26; 'header:In-Reply- To:1': 0.27; 'feature': 0.29; '[1]': 0.29; 'tim': 0.29; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'changed.': 0.31; 'chase': 0.31; 'produces': 0.31; 'anyone': 0.31; 'file': 0.32; 'becomes': 0.33; 'reader': 0.33; 'maybe': 0.34; 'message.': 0.35; 'transaction': 0.35; 'something': 0.35; 'more,': 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'should': 0.36; 'two': 0.37; 'clear': 0.37; 'branch': 0.38; 'pm,': 0.38; 'previous': 0.38; 'anything': 0.39; 'recent': 0.39; 'sure': 0.39; 'skip:u 10': 0.60; 'easy': 0.60; 'manually': 0.60; 'units': 0.60; 'up,': 0.60; 'most': 0.60; 'field.': 0.61; 'helps': 0.61; 'new': 0.61; 'offer': 0.62; 'soon': 0.63; 'myself': 0.63; 'more': 0.64; 'between': 0.67; 'believe': 0.68; 'mar': 0.68; 'frequently': 0.68; 'applying': 0.72; 'discover': 0.82; 'completely,': 0.84; 'history,': 0.84; 'subject:Control': 0.84; 'working,': 0.84; 'this;': 0.91; 'to:none': 0.92; 'taught': 0.96 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=QGebWv3Jbib4fc7LC4GybbFg4muurTCYFJ9D1EBPAqo=; b=t4rpt0nJFcdMEuHPX2tdXwCgqyZPMwrPxi78WgdrvCiAfgrDpw1SjhiKaTlaxNx+kA E8wFXbXoUSgiwvJn6b7VC9hzM7CmvZinBXIbUZSWFnsrZJJP9DAJi79btoZhCZIOdvO6 ZarRuoLmzQW2RwLeiULN387DiZD1NOuBiJoLm9xZFuX942Uu5H/fIINckNlNBuVKyZSd +jiMqijBaQCBTpguqbt7Bjj8eS6x7DBhyVt6AxNt8hszLpfee1ujHW6PW0PBPKosw+ft o0dtWuk4+GHERdsvvmxrfrDqCwnTf06/dj6IgJhPnpL9Gg0Af4J2fEAlVslyWqTlkL5p xI6g== |
| MIME-Version | 1.0 |
| X-Received | by 10.66.129.133 with SMTP id nw5mr36265989pab.98.1395196450021; Tue, 18 Mar 2014 19:34:10 -0700 (PDT) |
| In-Reply-To | <20140318211235.7be2bd4d@bigbox.christie.dr> |
| References | <lg6s09$irl$1@ger.gmane.org> <CAPTjJmqPca5cnNWu8T5BZhpH665X0=mrf7bJaLqVrQVMjZWu1g@mail.gmail.com> <lg8m6b$c8t$1@ger.gmane.org> <CAPTjJmqHXh2M3-QGbeLV_AkGAJzMEYmbuDLy8_dkpnhrpSUVMQ@mail.gmail.com> <mailman.8238.1395124947.18130.python-list@python.org> <bortetF7t42U1@mid.individual.net> <lgasdj$93f$1@ger.gmane.org> <20140318211235.7be2bd4d@bigbox.christie.dr> |
| Date | Wed, 19 Mar 2014 13:34:09 +1100 |
| Subject | Re: Question about Source Control |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| 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.8271.1395196459.18130.python-list@python.org> (permalink) |
| Lines | 62 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1395196459 news.xs4all.nl 2973 [2001:888:2000:d::a6]:53487 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:68534 |
Show key headers only | View raw
On Wed, Mar 19, 2014 at 1:12 PM, Tim Chase
<python.list@tim.thechases.com> wrote:
> On 2014-03-18 21:38, Terry Reedy wrote:
>> At least with hg, one should best test the code in the working
>> directory *before* committing to the local repository.
>
> I don't know if this is a hg-vs-git way of thinking, but I tend to
> frequently commit things on a private development branch regardless
> of brokenness, but once I get it working, I flatten & clean up those
> changes ("rebase" in git terms, which I believe has been adopted as a
> standardly-available-but-not-enabled-by-default module in hg) into
> logical units of change-sets that I then test individually before
> applying them to my more public-facing branch. This produces clean
> history that makes it easy for others to see what's going on.
My approach to rebasing is derived from the accountancy concepts my
Dad taught me. You create transactions, invoices, whatever, and you
can freely edit them so long as they're the "current batch". It's very
clear what the current batch is and where history begins. Then when
you update that batch, it becomes history and is indelible; if you
find an error in history, you put a new transaction through that
updates it (or maybe reverses it completely, so you can then do a new
clean transaction), which will have its own date (the date of the
correction) and its own identity. [1] In git terms, that means commits
above origin/master are freely editable, but as soon as anything's
pushed, it's not to be changed. I violate that rule only very VERY
occasionally, and only with the understanding that every clone of the
repo will have to be manually updated.
The "git rebase -i" command is perfect for this - it lets you rewrite
anything that isn't pushed yet, by default. I made myself a hook
script that helps with this; between that and the "autosquash" feature
of git rebase interactive, it's easy to fiddle with unpushed changes.
Let's say you discover a typo in an unpushed commit, and go and fix
the corresponding file. As long as it's a one-file edit, and the most
recent edit to that file is the commit you want to fix up, just type:
$ git commit -amf
or
$ git commit some-file -mf
and it'll make a fixup commit marked with that commit's message. Then:
$ git rebase -i
will notice that (if autosquash is enabled) and offer to squash the
two commits together. In all cases, only unpushed commits are
considered; everything from origin/master is untouchable.
If anyone wants the script, I'm happy to share, though it is
git-specific. Porting it to hg (does hg do hooks? I'm sure it must) is
left as an exercise for the reader :)
ChrisA
[1] Linking this in with a previous thread on identity vs value: a
transaction definitely has an identity, which may or may not be
representable with some sort of database ID field. The identity might
be something like "third row of the current batch" and nothing more,
but it has one.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Question about Source Control "Frank Millman" <frank@chagford.com> - 2014-03-18 08:42 +0200
Re: Question about Source Control Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-03-19 10:51 +1300
Re: Question about Source Control Terry Reedy <tjreedy@udel.edu> - 2014-03-18 21:38 -0400
Re: Question about Source Control Tim Chase <python.list@tim.thechases.com> - 2014-03-18 21:12 -0500
Re: Question about Source Control albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-03-22 17:32 +0000
Re: Question about Source Control Tim Chase <python.list@tim.thechases.com> - 2014-03-22 13:49 -0500
Re: Question about Source Control Albert-Jan Roskam <fomcl@yahoo.com> - 2014-03-22 13:01 -0700
Re: Question about Source Control Dave Angel <davea@davea.name> - 2014-03-22 22:18 -0400
Re: Question about Source Control Albert-Jan Roskam <fomcl@yahoo.com> - 2014-03-23 07:58 -0700
Re: Question about Source Control Chris Angelico <rosuav@gmail.com> - 2014-03-24 09:56 +1100
Re: Question about Source Control Terry Reedy <tjreedy@udel.edu> - 2014-03-23 21:26 -0400
Re: Question about Source Control Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-24 01:42 +0000
Re: Question about Source Control Chris Angelico <rosuav@gmail.com> - 2014-03-24 13:04 +1100
Re: Question about Source Control Terry Reedy <tjreedy@udel.edu> - 2014-03-24 00:55 -0400
Re: Question about Source Control Chris Angelico <rosuav@gmail.com> - 2014-03-19 13:34 +1100
csiph-web