Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
sonic bed head
Dec 18, 2003

this is naturual, baby!

BizarroAzrael posted:

I actually did a Robocopy from another copy on another machine, which seemed to go fine. Will this be alright for things like commits, or will it identify me as the person I copied it from? Might this be a better solution than a normal checkout?

As long as you also copied the .svn directories, it is exactly the same as a checkout. SVN isn't really built for tons of binary files like that. This might help.

http://stackoverflow.com/questions/538643/how-good-is-subversion-at-storing-lots-of-binary-files

Adbot
ADBOT LOVES YOU

BizarroAzrael
Apr 6, 2006

"That must weigh heavily on your soul. Let me purge it for you."

sonic bed head posted:

As long as you also copied the .svn directories, it is exactly the same as a checkout. SVN isn't really built for tons of binary files like that. This might help.

http://stackoverflow.com/questions/538643/how-good-is-subversion-at-storing-lots-of-binary-files

Late response but thanks for that.
So if I robocopy one SVN working copy(A) into another(B), and do an update on B, SVN will update the contents of A as well?

CHRISTS FOR SALE
Jan 14, 2005

"fuck you and die"
Hey git experts, I installed git on my jailbroken iPhone, and I'd like to know why I can't clone repos. Here's what happens when I try to: http://gist.github.com/608718

Pardot
Jul 25, 2001




CHRISTS FOR SALE posted:

Hey git experts, I installed git on my jailbroken iPhone, and I'd like to know why I can't clone repos. Here's what happens when I try to: http://gist.github.com/608718

Maybe try using the git protocol repo instead of the http one git clone git://github.com/dcinzona/LockInfo-Status-Bar-Icons---Winterboard-Theme.git

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

CHRISTS FOR SALE posted:

Hey git experts, I installed git on my jailbroken iPhone, and I'd like to know why I can't clone repos. Here's what happens when I try to: http://gist.github.com/608718

  1. What version of Git?
  2. What command did you run, exactly? Was it
    code:
    git clone "http://github.com/dcinzona/LockInfo-Status-Bar-Icons---Winterboard-Theme.git/GMT Statusbar
    Icons.theme"Initialize GMT Statusbar Icons.theme/.git
    This is definitely not a Git repository URL.
  3. Is this the only repository that you can't clone?
  4. Did you try the git:// URL?
  5. You do know that you can't clone a subdirectory of a repository, correct? Is that what you tried to do?

epswing
Nov 4, 2003

Soiled Meat
I've convinced the team to switch to Mercurial! Yay! We have a bunch of repositories on a server (windows box), one for each project.

So now it's time for linuxy programmer to become windowsy IT guy, because "I advocated for the stupid thing, so I better make it work."

I've been using TortoiseHG to launch the graphical webserver for each, giving each one its own port (8000, 8001, etc), clicking the "Start" button on each. Screw that, so I now have a batch file that looks like this
pre:
cd D:\hg\Project1
hg serve -d -p 8000

cd D:\hg\Project2
hg serve -d -p 8001

...

cd D:\hg\ProjectN
hg serve -d -p (8000 + N)
and it does work, but what I'd really like to have is an auto-launched windows service for each project, that someone can stop/start from that Services window somewhere in the control panel.

There's this thing http://mercurial.selenic.com/wiki/HgService but it looks like it can only run one server at a time ("WorkingDirectory the repository folder, if it's not specified it takes the install directory").

Am I going about this the wrong way?

epswing
Nov 4, 2003

Soiled Meat
Next question: Visual Studio 2010 and version control.

Background: I'm coming from eclipse/gedit/vi. Normally I just set my VCS to ignore the .settings folder and whatever else eclipse dumps into the root of my project. The idea is that anyone could use any ide/editor at any time, so don't push any ide-specific files into the repo. Makes sense.

In the case of a C++ app written with VS 2010, I get the feeling that the code is pretty much married to the ide/compiler. No one is ever going to use anything but VS 2010. Thing is, any time there's any kind of change to the settings, or compiler options, or anything really, a few ide-specific files change such as MyProject.sln, MyProject.vcproj, etc.

So...what do I do here? If I ignore these, my co-workers can't launch their project upon checkout. If I include them, a good number of commits will contain ide-specific files/changes.

vvv E: much thanks

epswing fucked around with this message at 21:06 on Oct 5, 2010

Zhentar
Sep 28, 2003

Brilliant Master Genius
You want to exclude the user specific stuff, like .suo, .vcproj.*.user, .ncb, which hold the pure IDE settings stuff, and the build directories. Changes the the sln or vcproj are generally going to affect how your project compiles, which is presumably important; it'd be no different than committing changes to your makefile.

uXs
May 3, 2005

Mark it zero!

epswing posted:

I've convinced the team to switch to Mercurial! Yay! We have a bunch of repositories on a server (windows box), one for each project.

So now it's time for linuxy programmer to become windowsy IT guy, because "I advocated for the stupid thing, so I better make it work."

I've been using TortoiseHG to launch the graphical webserver for each, giving each one its own port (8000, 8001, etc), clicking the "Start" button on each. Screw that, so I now have a batch file that looks like this
pre:
cd D:\hg\Project1
hg serve -d -p 8000

cd D:\hg\Project2
hg serve -d -p 8001

...

cd D:\hg\ProjectN
hg serve -d -p (8000 + N)
and it does work, but what I'd really like to have is an auto-launched windows service for each project, that someone can stop/start from that Services window somewhere in the control panel.

There's this thing http://mercurial.selenic.com/wiki/HgService but it looks like it can only run one server at a time ("WorkingDirectory the repository folder, if it's not specified it takes the install directory").

Am I going about this the wrong way?

The best way is probably to set up an SSL server somehow, and use that. I have no idea how to do that though, it sounds like it's a pain on Windows.

Personally I just use a shared folder (on a server) and push/pull over network shares. Then again, most projects we do is just one person working on something, so we don't get any conflicts. From hanging around in the mercurial IRC channel, I get the impression that this 'solution' is rather frowned upon.

On top of that I'm also using hgwebdir as a tool to view the contents of all the repositories. It's pretty great. Look here for how to set it up on IIS: http://vampirebasic.blogspot.com/2009/06/running-mercurial-on-windows.html Even if you stick with using shares or SSL or whatever, I'd still suggest setting up hgwebdir because it's so incredibly useful for browsing repositories (and the entire history) without having to clone them.

I think it's possible to set up hgwebdir to allow push access as well, but I haven't looked into that yet. Maybe I should.

As for hg serve: it's really not meant as a real, permanent solution, but only in situations where you quickly, temporarily, need a server.

About the VS thing: Zhentar already answered you about the VS solution files, but I want to stress that you really need to pay attention to what you include or ignore. I have introduced a ton of people to Mercurial, taking great pains to tell them that they really need to know what they add to a repo, but basically everybody will ignore that and happily include a ton of compiled files that shouldn't be in source control.

Especially for the first few projects you need to go over the file list, file by file, to see if they should really be in there. If you're not sure, look it up. After you've done it a few times, your ignore files should be pretty standard so it will be quicker then. (Also check to see if you don't ignore too much. If you think you're done, clone the repo to some other machine and check if it still works.)

Edit: quick point about build directories: in most cases you can just ignore everything in there, but there's one exception: websites. In the bin folder you can sometimes find .refresh files. These are pointers to where some referenced DLL files are, and you do need those. Everything else can be ignored.

uXs fucked around with this message at 22:14 on Oct 5, 2010

epswing
Nov 4, 2003

Soiled Meat

uXs posted:

Personally I just use a shared folder (on a server) and push/pull over network shares

Aww dammit, I forgot that you can just point to a folder on a share and blamo. This is what we're going to do for sure, at least for now. Thanks!

Allie
Jan 17, 2004

If you use shares with Windows machines, make sure you upgrade to at least 1.6.3 (1.6.4 is the latest). They just fixed a longstanding hard link corruption issue due to a Windows API being broken and giving bad information about hard links on network drives.

You can also run hgweb under IIS, but that requires more configuration up front.

BizarroAzrael
Apr 6, 2006

"That must weigh heavily on your soul. Let me purge it for you."
What's the difference between svn update failures from conflicts and "skipped" files and directories? Got a guy who has files marked as in conflict which were "skipped" and SVN doesn't bother to update the remainder of the directory they were in. Why doesn't svn just ignore these files and keep going? It's caused big holes in the update.

ToxicFrog
Apr 26, 2008


epswing posted:

Aww dammit, I forgot that you can just point to a folder on a share and blamo. This is what we're going to do for sure, at least for now. Thanks!

This may be a stupid question, but as your background is in linux, what's wrong with just hosting the repos on a linux box running sshd and using hg's SSH support to talk to it?

epswing
Nov 4, 2003

Soiled Meat
Nothing's wrong with that plan, except at my new job there isn't a single linux machine in the building.

:negative:

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Is there any way to pause and restart a clone in git like one might a normal HTTP transfer?

Our shittastic router likes to choke transfers over ~1 MB that aren't encrypted. My normal way around this is to 'pause' the transfer and restart it until finished, but I don't see a way to do that to git. Yes, I tried using git://. Never buy ZyXEL products, btw.

uXs
May 3, 2005

Mark it zero!

Munkeymon posted:

Is there any way to pause and restart a clone in git like one might a normal HTTP transfer?

Our shittastic router likes to choke transfers over ~1 MB that aren't encrypted. My normal way around this is to 'pause' the transfer and restart it until finished, but I don't see a way to do that to git. Yes, I tried using git://. Never buy ZyXEL products, btw.

Can you do an incremental clone? Get a few changesets at a time, not everything at once.

Or you could do the clone from somewhere sane, burn it on dvd, and just copy it. Once you have it, you can link it again to original repo. Changesets from that point should be small enough to work.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



uXs posted:

Can you do an incremental clone? Get a few changesets at a time, not everything at once.

I did not realize this was possible.

quote:

Or you could do the clone from somewhere sane, burn it on dvd, and just copy it. Once you have it, you can link it again to original repo. Changesets from that point should be small enough to work.

And I was about to come back and ask if it was safe to copy a local repo from a different machine to my own, but it sounds like you're saying it is, so I'm going to go try.

ToxicFrog
Apr 26, 2008


^^ Yes; both "copy the repo, then use 'git remote' to link it to the original" and "clone the repo locally, then move the clone somewhere else and use 'git remote' to edit the link" will work fine. Git repos are self-contained and all relative paths.

epswing posted:

Nothing's wrong with that plan, except at my new job there isn't a single linux machine in the building.

:negative:

Godspeed. :smith:

ColdPie
Jun 9, 2006

Munkeymon posted:

And I was about to come back and ask if it was safe to copy a local repo from a different machine to my own, but it sounds like you're saying it is, so I'm going to go try.

As said above, git repos can be copied just fine. You'll just have to be mindful of your remotes. Personally, I find just editing .git/config to be easier then messing about with 'git remote', but obviously both achieve the same goals. Just wanted to point out another option.

Mine GO BOOM
Apr 18, 2002
If it isn't broken, fix it till it is.

epswing posted:

Nothing's wrong with that plan, except at my new job there isn't a single linux machine in the building.
I've heard VMware Server has a nice price tag waiting for you that will fix this problem right up.

epswing
Nov 4, 2003

Soiled Meat
Actually I've been meaning to look into self-contained applications/stacks provided by http://bitnami.org/. Looks promising, actually...

wwb
Aug 17, 2004

epswing posted:

setting up mercurial on windows?

Not sure what you are running on, but see http://www.jeremyskinner.co.uk/mercurial-on-iis7/. Could help.

Also, if you have a virtual host running around, you could always just use
this http://www.turnkeylinux.org/revision-control

[EFB: Bitnami is also a good option]

nbv4
Aug 21, 2002

by Duchess Gummybuns
A few months ago someone posted a link to a really cool git repository visualizer, but I can't find the link. It represented every file as a little dot, and each committer was a little icon and it visualized each committer shrinking and expanding each file. Anyone know what I'm talking about?

musclecoder
Oct 23, 2006

I'm all about meeting girls. I'm all about meeting guys.

nbv4 posted:

A few months ago someone posted a link to a really cool git repository visualizer, but I can't find the link. It represented every file as a little dot, and each committer was a little icon and it visualized each committer shrinking and expanding each file. Anyone know what I'm talking about?

I'd be interested if there is one for git, but this one, code_swarm, for Subversion seems to be along the lines of what you're talking about : http://code.google.com/p/codeswarm/

nbv4
Aug 21, 2002

by Duchess Gummybuns

musclecoder posted:

I'd be interested if there is one for git, but this one, code_swarm, for Subversion seems to be along the lines of what you're talking about : http://code.google.com/p/codeswarm/

codeswarm is different, similar but different to what I'm looking for.

Slurps Mad Rips
Jan 25, 2009

Bwaltow!

nbv4 posted:

codeswarm is different, similar but different to what I'm looking for.

You are looking for Gource I believe.
:)

nbv4
Aug 21, 2002

by Duchess Gummybuns

SAHChandler posted:

You are looking for Gource I believe.
:)

Thats it! Yes thanks.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
I just convinced my team to switch from SVN to a DVCS because we are constantly refactoring our work and renaming files which causes too many tree conflicts. From my quick research it looks like Bazaar is the only the one to actually track renames and should thus eliminate these problems.

My main concern is that Bazaar doesn't seem to have as large a user base a Mercurial or Git. So my question is, if Bazaar is the tool that I want or can Mercurial handle it just as well?

uXs
May 3, 2005

Mark it zero!
Mercurial does track renames, but you need to explicitly tell it about them.

good jovi
Dec 11, 2000

'm pro-dickgirl, and I VOTE!

MEAT TREAT posted:

I just convinced my team to switch from SVN to a DVCS because we are constantly refactoring our work and renaming files which causes too many tree conflicts. From my quick research it looks like Bazaar is the only the one to actually track renames and should thus eliminate these problems.

My main concern is that Bazaar doesn't seem to have as large a user base a Mercurial or Git. So my question is, if Bazaar is the tool that I want or can Mercurial handle it just as well?

I think most of the confusion people have about Mercurial tracking renames comes from the fact that it doesn't track directories (which bzr apparently does), but rather just files. After I realized that, Mercurial has never done anything other than what I expected (with regards to renames at least).

king_kilr
May 25, 2007
git tracks renames AFAIK

ColdPie
Jun 9, 2006

king_kilr posted:

git tracks renames AFAIK

It makes a best-effort guess based off of what percent of the contents of the file changed. See git-log, especially the -M and --follow switches.

ToxicFrog
Apr 26, 2008


^^ Expanding on this, if you rename the file but don't change the contents in the same commit, it always gets it right. If you do change the contents at the same time you renamed it, it guesses, but the more you change the less likely it is to realize it's a rename rather than a delete+create.

Allie
Jan 17, 2004

uXs posted:

Mercurial does track renames, but you need to explicitly tell it about them.

Basically this boils down to using "hg mv" or "hg addremove" when you want to record renames. Future versions of Mercurial will probably take a hybrid approach and do both explicit recording and Git-style rename detection.

The whole bit about Mercurial not tracking renames is some bullshit Mark Shuttleworth made up in a blog post years ago. Mercurial has always tracked renames.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I've forked someone's project on github with the intention of them pulling my changes back in eventually. Part of my work involves adding a library written by me that's also hosted on github.


My first inclination is to, after I've cloned their project locally, to go to their 'library' directory and clone my project down from github...thus I'd have a repo nested inside another repo. Is this the right way to handle this?

bitprophet
Jul 22, 2004
Taco Defender

Thermopyle posted:

I've forked someone's project on github with the intention of them pulling my changes back in eventually. Part of my work involves adding a library written by me that's also hosted on github.


My first inclination is to, after I've cloned their project locally, to go to their 'library' directory and clone my project down from github...thus I'd have a repo nested inside another repo. Is this the right way to handle this?

A) You actually can't do it quite that simply, you need to use git submodules, Google around for that phrase and you'll find plenty of tutorials. It's basically declaring you want other git repo URL X to be rooted at path Y in the current repo, and a few management commands to set it up and pull it down.

B) Depending on the language you're using, it may be better to release your library on the language's package distribution channel and then just specify it as a dependency in the project's metadata. For example, in Python, add the lib to PyPI and its name to your project's setup.py; for Ruby, add it to Rubygems and update your Gemfile or whatever is in vogue these days for that stuff. Etc.

You can often just specify a Git repo directly in such tools as well, bypassing the "host it on a package network" step entirely, but the end result is the same -- a copy of the library is installed into your language library path instead of inside your own codebase.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

bitprophet posted:

A) You actually can't do it quite that simply, you need to use git submodules, Google around for that phrase and you'll find plenty of tutorials. It's basically declaring you want other git repo URL X to be rooted at path Y in the current repo, and a few management commands to set it up and pull it down.

B) Depending on the language you're using, it may be better to release your library on the language's package distribution channel and then just specify it as a dependency in the project's metadata. For example, in Python, add the lib to PyPI and its name to your project's setup.py; for Ruby, add it to Rubygems and update your Gemfile or whatever is in vogue these days for that stuff. Etc.

You can often just specify a Git repo directly in such tools as well, bypassing the "host it on a package network" step entirely, but the end result is the same -- a copy of the library is installed into your language library path instead of inside your own codebase.

Say I use git submodule. How does that work for the root project's maintainer and for people who clone from the root project? Is it transparent to them, and they just do a regular git clone?

I've perused a couple submodule web tutorials, but either I was too stupid to get it, or they didn't address it from the standpoint of my questions above.

My main concern is that the root project is maintained by someone who is a little unfamiliar with git, and a ton of users (who aren't necessarily too technical) of that project actually use it by cloning it.

bitprophet
Jul 22, 2004
Taco Defender

Thermopyle posted:

Say I use git submodule. How does that work for the root project's maintainer and for people who clone from the root project? Is it transparent to them, and they just do a regular git clone?

IIRC you do still need to do submodule init/update after cloning, but I actually don't work with submodules a ton, and they apparently got some fixes to make them more usable in recent Git versions, so I'd either experiment or read the man pages closely.

Mithaldu
Sep 25, 2007

Let's cuddle. :3:
Last i checked submodules are flat out retarded and require you to do the following to keep your own repo in synch with a subbed repo:

1. update submodule repo
2. commit to own repo that the subbed repo was updated

Unless you do this everytime the subbed repo changes, your repo will just stick to the old state at which the subbed repo was added first.

Adbot
ADBOT LOVES YOU

epswing
Nov 4, 2003

Soiled Meat
Mercurial question.

I'm happily developing along, tagging as I go, 1.0, 1.1, 1.2, 2.0, 2.1.

Then I realize there's a bug in the 1.x line, so I need to fix that and merge the fix into 2.1:

clone to -r 1.2
do some work, commit
add tag 1.3
pull (I'll get multiple heads here)
merge*
commit
push

That merge will always give me a .hgtags merge conflict. I simply keep the changes from both sources and things work fine (does the order of the lines in .hgtags matter?). However if I instead clone to the revision after -r 1.2 and follow the steps above, there isn't any .hgtags conflict.

So when I go back to fix something, should I clone to the tag I want, or one rev after the tag I want?

Aside: I love mercurial, and will probably name my first born "mercurial", but having tags as changesets seems unintuitive. Why are they versioned?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply