hg pull --rebase When researching the bookmarks extension, I came across the rebase extension (http://mercurial.selenic.com/wiki/RebaseExtension). This did exactly what I wanted.
I had committed my routes.py which went in as changeset 760 in my local repository. I then ran hg pull --rebase, which downloaded changesets 760 to 769 from the main web2py repository. I checked the log and my routes.py changeset stayed at the head of the repository as changeset 770. Very cool. There's additional info here (http://mercurial.selenic.com/wiki/RebaseProject) for dealing with conflicts and other more complicated use cases, but for handling routes.py it's dead simple. For those using TortoiseHg for Windows, go to Repository Settings then click the Edit File button and paste the following lines into the text file that gets opened: [extensions] rebase = [tortoisehg] postpull = rebase Save and close the text file and you should be good to go. Enjoy! One final note. I am keeping a copy of routes.py in my myapp/private folder as Thadeus/Jonathan suggested. Seems like a smart best practice. On Tue, Aug 10, 2010 at 9:10 AM, Michael Wolfe <michael.joseph.wo...@gmail.com> wrote: > Rob, > > I haven't used the bookmark extension. I'll go check that out. > Thanks for the tip. > > -Mike > > On Mon, Aug 9, 2010 at 10:00 PM, Rob <r...@rmdashr.com> wrote: >> You could use the hg bookmark extension and keep 2 local branches. >> One branch for upstream code and the other branch for your own >> changes. Before you did a pull, you'd switch back to your upstream >> branch, pull, switch to local change branch, merge (or rebase) with >> upstream branch, etc... >> >> At least that's how I do it with git and it works great. >> >> On Aug 9, 8:20 am, mwolfe02 <michael.joseph.wo...@gmail.com> wrote: >>> I'm just looking for a best practice here. I am running web2py using >>> a clone of the repositoryhttps://web2py.googlecode.com/hg/. This has >>> worked really well for me. However, I just added a routes.py file. >>> Clearly, I want to version control this file, but that requires >>> committing the change to my local web2py repository. That's not a >>> problem, except that every time I update to the latest web2py version >>> I'll have two heads and have to merge. The merge should always be >>> done without conflicts, but it would be an extra step I'd have to do >>> each time. Also, if I wanted to send patches in at some point in the >>> future, would those extra changesets in my local repository cause >>> problems? >>> >>> I'm pretty well versed in using Mercurial for my own projects, but >>> web2py is the first open-source project I've been running from the >>> repository. >>> >>> My approach would be: Pull --> Update --> Merge --> Commit. Is there >>> a better way? >>> >>> (Note: I'm using TortoiseHg on Windows, so if anyone has specific >>> experience with that I'd like to hear that, too.) >>> >>> Thanks, >>> Mike >