Murky repo now using a subrepo for MYUtilities

3 views
Skip to first unread message

Jens Alfke

unread,
Apr 16, 2010, 12:23:51 PM4/16/10
to murk...@googlegroups.com
[If you haven’t checked out or cloned the Murky repository, you can skip this message. But if you’ve cloned it on Bitbucket, you really need to read this or your next pull will break.]

To simplify the setup for building Murky, I’m trying out Mercurial “subrepositories”. I’ve added MYUtilities as a subrepo of Murky, in the new ext/ subdirectory. That means it’ll now automatically get pulled and updated when updating Murky itself, so hopefully most people who access the Murky repository won’t even have to think about it.

This would be a good time to verify your Mercurial version (‘hg —version’) and update it if it’s out of date. I know that subrepos are a fairly new feature and have undergone a lot of development in recent releases, so for safety’s sake you should probably have at least 1.4 if not the latest 1.5.

If you’ve already checked out the official snej/murky repo to your local filesystem, hopefully the change will be transparent — the next time you pull from the official repo, the ‘hg update’ step will detect the subrepo and automatically pull & update snej/myutilities for you. The Xcode project entries for the MYUtilities files now point to the ext/ subdirectory, so it’ll build those sources instead. You can get rid of your separate local MYUtilities repository if you like.

If you’ve used Bitbucket to create your own hosted clone of snej/murky, and cloned from that, things appear to get a little bit more complicated, as far as I can tell. The subrepo path (in .hgsub) is “../myutilities”, which is interpreted relative to the URL that Murky was pulled from. So I think you’ll also need to have a clone of snej/myutilities, in order for the path relative to your clone of murky to work right.

(Maybe I should make the .hgsub file use an absolute URL pointing to my master MYUtilities repo? I’m not sure; I’m new at this.)

If you make any changes to Mercurial, there’s gotcha that I’ve run into: ‘hg status’ doesn’t descend into nested repositories. So if there are uncommitted changes inside ext/MYUtilities/, they will not be reported. To see them, you have to explicitly run ‘hg status -R ext/MYUtilities’ to directly query the status of the subrepo. On the other hand, ‘hg commit’ and ‘hg push' do know about subrepos, so changes you’ve made in MYUtilities will get checked in automatically. Which could be a surprise if you forgot to check the status of the subrepo first...

—Jens

--
---------------------------------------------------------------------------
M U R K Y
http://groups.google.com/group/murky-app
To unsubscribe: mailto:murky-app+...@googlegroups.com
---------------------------------------------------------------------------

Dave Reed

unread,
Apr 16, 2010, 3:43:00 PM4/16/10
to Murky
So does Murky use the new MYUtilities even if Xcode's Source Trees
still points to a different location?

I have the following setup (all check out using mercurial):
/Users/dreed/Projects/MYNetwork
/Users/dreed/Projects/MYUtilities
/Users/dreed/Projects/Murky
/Users/dreed/Projects/Attendance

where Attendance is my iPhone app that makes use of MYUtilities and
MYNetwork. In Xcode, I have the Source Trees for MYUtilities set to
point at the above mentioned directory.

I don't mind keeping multiple copies of MYUtilities around, but I'm
wondering which one Murky is going to use now.

Thanks,
Dave

Jens Alfke

unread,
Apr 16, 2010, 5:41:18 PM4/16/10
to murk...@googlegroups.com

On Apr 16, 2010, at 12:43 PM, Dave Reed wrote:

> So does Murky use the new MYUtilities even if Xcode's Source Trees
> still points to a different location?

Yes. If you inspect the MYUtilities folder item in the Xcode project,
its path is now set to 'ext/MYUtilities' relative to the project. It
no longer uses the 'MYUtilities' named source tree.

The Source Tree feature in Xcode just assigns a local path to a name,
and the name can be used in projects. It doesn't force that path to be
used anywhere unless a project chooses to use that name.

—Jens

Dave Reed

unread,
Apr 16, 2010, 6:36:16 PM4/16/10
to Murky


On Apr 16, 5:41 pm, Jens Alfke <j...@mooseyard.com> wrote:
> On Apr 16, 2010, at 12:43 PM, Dave Reed wrote:
>
> > So does Murky use the new MYUtilities even if Xcode's Source Trees
> > still points to a different location?
>
> Yes. If you inspect the MYUtilities folder item in the Xcode project,  
> its path is now set to 'ext/MYUtilities' relative to the project. It  
> no longer uses the 'MYUtilities' named source tree.
>
> The Source Tree feature in Xcode just assigns a local path to a name,  
> and the name can be used in projects. It doesn't force that path to be  
> used anywhere unless a project chooses to use that name.
>
> —Jens

Thanks for the info.

Dave
Reply all
Reply to author
Forward
0 new messages