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
Rapportus
Oct 31, 2004
The 4th Blue Man
Anyone with experience using Perforce ever done the following? I haven't seen any documentation on built-in support for this.

Take a given perforce client (workspace), which is in any unknown "dirty" state -- files missing or added under the root, have list out of sync, etc -- and return it to a known-good "clean" state, which can be defined by an array of perforce labels. It is safe to assume the root of the workspace is unique and does not overlap with other workspaces.

I'm curious what CoC may know about this. I've come up with two solutions to solve this, but am I reinventing the wheel?

1) Wipe the entire client root and have list and re-sync to the array of labels. (Very inefficient since labels may contain 10+ Gb in some cases)
2) Wipe the have list, then re-flush have list to array of labels. Then p4 diff under the workspace root for a list of any files not equal to have list revision and force-sync those files. Then remove any files on host under the workspace root not contained in have list.

The use case is to guarantee production end points are truly cleaned after this process runs.

Rapportus fucked around with this message at 15:29 on Aug 6, 2009

Adbot
ADBOT LOVES YOU

nbv4
Aug 21, 2002

by Duchess Gummybuns
Whats the best source control program for single person projects? Right now I have a website project that I manage with SVN. Basically I just use it to streamline moving files from my local machine to my webserver. Instead of manually moving files with a ftp program, I just commit, then ssh into my server, then checkout.

Its gotten to the point where I think I need to start branching. I want to add new features, but don't want to tie up my source in case a bug is discovered in myworking site while the SVN repo is tied up in my developement of a new feature. I head SVN is bad at branching. Should I switch to another program like git or w/e or will SVN be fine?

Whompy
Apr 21, 2002
I have used : Subversion, Visual Source Safe, Source Depot, TFS, and Team System.

I am inclined towards Team System (Be damned the cost)

...

The most important part about a change-management-system is (to me, anyway): Does it grant the ability to track down changes in a non-obtuse manner (e.g. developer A checked in changeset 1 on 01/01 and developer B (without getting latest) checked in changeset 2 on 01/02 and ignored the merge)

I like Team Systems ease of fix on that.

...anyway...

http://msdn.microsoft.com/en-us/library/aa730834(VS.80).aspx

A primer on branching and merging...Good Doc.

...

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

nbv4 posted:

Whats the best source control program for single person projects? Right now I have a website project that I manage with SVN. Basically I just use it to streamline moving files from my local machine to my webserver. Instead of manually moving files with a ftp program, I just commit, then ssh into my server, then checkout.

Its gotten to the point where I think I need to start branching. I want to add new features, but don't want to tie up my source in case a bug is discovered in myworking site while the SVN repo is tied up in my developement of a new feature. I head SVN is bad at branching. Should I switch to another program like git or w/e or will SVN be fine?

Bazaar (my preference) or Mercurial are both good choices.

awesmoe
Nov 30, 2005

Pillbug

nbv4 posted:

Whats the best source control program for single person projects? Right now I have a website project that I manage with SVN. Basically I just use it to streamline moving files from my local machine to my webserver. Instead of manually moving files with a ftp program, I just commit, then ssh into my server, then checkout.

Its gotten to the point where I think I need to start branching. I want to add new features, but don't want to tie up my source in case a bug is discovered in myworking site while the SVN repo is tied up in my developement of a new feature. I head SVN is bad at branching. Should I switch to another program like git or w/e or will SVN be fine?

You will have no problems with svn for your needs

floWenoL
Oct 23, 2002

nbv4 posted:

Its gotten to the point where I think I need to start branching. I want to add new features, but don't want to tie up my source in case a bug is discovered in myworking site while the SVN repo is tied up in my developement of a new feature. I head SVN is bad at branching. Should I switch to another program like git or w/e or will SVN be fine?

You just pretty much described the use case where git really shines. I don't know what awesmoe is smoking but when I tried to do pretty much the same thing you did with svn it sucked pretty hard.

Also, the latency difference between committing locally vs. committing over the network is nice.

rotor
Jun 11, 2001
Probation
Can't post for 47 minutes!

floWenoL posted:

You just pretty much described the use case where git really shines. I don't know what awesmoe is smoking but when I tried to do pretty much the same thing you did with svn it sucked pretty hard.
you have to get pretty convoluted with branching before you're gonna start seeing the benefits from git

quote:

Also, the latency difference between committing locally vs. committing over the network is nice.
you can set up a local svn repo just as easily as you can with git

rotor
Jun 11, 2001
Probation
Can't post for 47 minutes!

nbv4 posted:

Its gotten to the point where I think I need to start branching. I want to add new features, but don't want to tie up my source in case a bug is discovered in myworking site while the SVN repo is tied up in my developement of a new feature. I head SVN is bad at branching. Should I switch to another program like git or w/e or will SVN be fine?

svn will be fine.

Profane Obituary!
May 19, 2009

This Motherfucker is Dead
Hey guys i want to be able to branch, does svn do this?

MAN YOU SHOULD TOTALLY SWITCH TO MY FAVORITE VCS

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh
SVN is great at branching. It just sucks poo poo at merging.

uXs
May 3, 2005

Mark it zero!
As far as I know, pretty much all distributed systems are better at branching and (especially) merging than non-distributed systems. Advising a switch to git or mercurial or whatever doesn't seem too crazy to me. Especially since it's just himself and not an entire company.

I basically tried out git for the exact same reason. (I did come from SourceSafe, I guess svn could be a bit better.) And I AM switching the entire company over to Mercurial now :v:

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

Profane Obituary! posted:

Hey guys i want to be able to branch, does svn do this?

MAN YOU SHOULD TOTALLY SWITCH TO MY FAVORITE VCS
If all he needs to do is branch, and doesn't care about merging, just copying the directory will work as well as using SVN.

floWenoL
Oct 23, 2002

rotor posted:

you have to get pretty convoluted with branching before you're gonna start seeing the benefits from git

Not really; it's more like if you use svn you're stuck with doing trivial things with branches because it sucks at anything more.

quote:

you can set up a local svn repo just as easily as you can with git

Too bad that doesn't apply!

nbv4 posted:

Right now I have a website project that I manage with SVN. Basically I just use it to streamline moving files from my local machine to my webserver. Instead of manually moving files with a ftp program, I just commit, then ssh into my server, then checkout.

Old man rotor getting senile. Even if you have a remote repo anyway, the majority of git operations don't go over the network.

floWenoL
Oct 23, 2002

Profane Obituary! posted:

Hey guys i want to be able to branch, does svn do this?

MAN YOU SHOULD TOTALLY SWITCH TO MY FAVORITE VCS

How dare anyone suggest the right tool for the job!

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh
Git is still a little bit sketchy on Windows I think, unless you want to deal with Cygwin. I'm curious as to how well it'd work with SUA.

floWenoL
Oct 23, 2002

Avenging Dentist posted:

Git is still a little bit sketchy on Windows I think, unless you want to deal with Cygwin. I'm curious as to how well it'd work with SUA.

Honestly, any distributed VCS will do just fine in place of git (I don't remember which one is the Windows-friendly one).

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

floWenoL posted:

Honestly, any distributed VCS will do just fine in place of git (I don't remember which one is the Windows-friendly one).

Not if the BDFL chose git!!!

rotor
Jun 11, 2001
Probation
Can't post for 47 minutes!

floWenoL posted:

Not really; it's more like if you use svn you're stuck with doing trivial things with branches because it sucks at anything more.
We have been through this so very many times, perhaps you can just explain exactly what you mean instead of indulging in vague, ominous handwaving.

quote:

Too bad that doesn't apply!
At some point the code has to move from your machine to the server. You can run a local svn repo and export to the server if your connection to the server is too slow, at which point you have the same network situation that you would with git.

Are there any further spurious arguments you'd like to make? Perhaps you'd like to tell him about how much easier it is to create a git repository!

rotor fucked around with this message at 21:28 on Aug 7, 2009

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

floWenoL posted:

Honestly, any distributed VCS will do just fine in place of git (I don't remember which one is the Windows-friendly one).
Any of them which aren't git are very windows-friendly.

floWenoL
Oct 23, 2002

rotor posted:

We have been through this so very many times, perhaps you can just explain exactly what you mean instead of indulging in vague, ominous handwaving.

You first:

quote:

you have to get pretty convoluted with branching before you're gonna start seeing the benefits from git

Pretty much the definition of "vague" right there.

quote:

At some point the code has to move from your machine to the server. You can run a local svn repo and export to the server if your connection to the server is too slow, at which point you have the same network situation that you would with git.

Except that is a solution to a different problem. AFAIK, svn export only exports your working copy and not the version control information (i.e., .svn directories). This may actually be what the OP wants, but if you meant to show how svn can do "offline" version control just as well as git, you failed.

quote:

Are there any further spurious arguments you'd like to make? Perhaps you'd like to tell him about how much easier it is to create a git repository!

If your answer to "git can do X better than svn can" will always be "svn can do <something that's vaguely similar to X but not really the same>" then I might throw a few more at you, just to see what you can come up with. It'll be at least as amusing as reading the CVS developers' defense of CVS' limitations.

rotor
Jun 11, 2001
Probation
Can't post for 47 minutes!

floWenoL posted:

Pretty much the definition of "vague" right there.
then we'll have to agree that we're both tired of this argument then because I'm not going down that rathole again.

quote:

Except that is a solution to a different problem. AFAIK, svn export only exports your working copy and not the version control information (i.e., .svn directories). This may actually be what the OP wants
it seems pretty clear to me that it is, since I assume he's not an idiot and doesn't want .svn directories in his webroot.

quote:

If your answer to "git can do X better than svn can" will always be "svn can do <something that's vaguely similar to X but not really the same>" then I might throw a few more at you, just to see what you can come up with.
Sadly, I'm not enough of an idiot to say that svn can do everything git can, since that would be obviously factually incorrect. My issue is that I don't think this guy needs to go to the trouble of moving his vcs midproject because I'd guess that the ROI on the effort investment will basically never pay off. I think git advocates tend to overstate the both benefits of their VCS and the deficiencies of svn.

If he was starting a new project I'd say yeah, go nuts, git is probably a better choice. But he's not.

rotor fucked around with this message at 22:07 on Aug 7, 2009

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

rotor posted:

Sadly, I'm not enough of an idiot to say that svn can do everything git can, since that would be obviously factually incorrect. My issue is that I don't think this guy needs to go to the trouble of moving his vcs midproject because I'd guess that the ROI on the effort investment will basically never pay off. I think git advocates tend to overstate the both benefits of their VCS and the deficiencies of svn.

If he was starting a new project I'd say yeah, go nuts, git is probably a better choice. But he's not.
There's very little effort involved in switching from SVN to another VCS. Just install the new VCS, fast-import the repository, and archive the SVN version somewhere.

rotor
Jun 11, 2001
Probation
Can't post for 47 minutes!

Janin posted:

There's very little effort involved in switching from SVN to another VCS. Just install the new VCS, fast-import the repository, and archive the SVN version somewhere.

right, and then you have the actual work of learning how the new vcs works and how to take advantage of all these miraculous new features.

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

rotor posted:

right, and then you have the actual work of learning how the new vcs works and how to take advantage of all these miraculous new features.

svn commit -> bzr commit
svn update -> bzr pull
svn cp trunk/ branches/fix-poo poo -> bzr branch trunk fix-poo poo
?????? -> cd trunk; bzr merge ../fix-poo poo

floWenoL
Oct 23, 2002

rotor posted:

Sadly, I'm not enough of an idiot to say that svn can do everything git can, since that would be obviously factually incorrect. My issue is that I don't think this guy needs to go to the trouble of moving his vcs midproject because I'd guess that the ROI on the effort investment will basically never pay off.

He explicitly asked, "Whats the best source control program for single person projects?" If that's not an invitation to pimp your favorite VCS, I don't know what is.

quote:

I think git advocates tend to overstate the both benefits of their VCS and the deficiencies of svn.

I think you're overestimating the effort of porting a single-person project to another VCS and learning enough to be functional. If it were a large multi-person project in SVN then I'd be the first to agree that you should stick to svn.

rotor
Jun 11, 2001
Probation
Can't post for 47 minutes!

floWenoL posted:

He explicitly asked, "Whats the best source control program for single person projects?" If that's not an invitation to pimp your favorite VCS, I don't know what is.

Fair enough, but there was also this part:

quote:

I head SVN is bad at branching. Should I switch to another program like git or w/e or will SVN be fine?

svn is not "bad" at branching, and svn will be fine. That's basically what I'm saying here.

quote:

I think you're overestimating the effort of porting a single-person project to another VCS and learning enough to be functional.
that may be, but if you're just learning enough to be functional I'm not sure what the point of moving would be.

edit: then again, it sounds like he doesn't know how to branch in svn either, so maybe you've got a point.

rotor fucked around with this message at 23:05 on Aug 7, 2009

sklnd
Nov 26, 2007

NOT A TRACTOR
svn has only had non-poo poo merge tracking for about a year now, and if you're working in a shop with older Linux installs this can become frustrating. At a previous job I ended up going around and forcibly upgrading everyones FC9 svn install to something >= 1.5 because it wasn't backported into FC9 (at the time at least).

Also, using svn with a reasonably large project (say, a Linux kernel tree) is slow and annoying.

That's really the only bitch points I have about svn. Its pretty nice to use otherwise, though I think the dvcs model is a better way to work personally. svn is good enough that I can get by without hating life.

Factor Mystic
Mar 20, 2006

Baby's First Post-Apocalyptic Fiction
Is there any way to rename the author of a commit in Mercurial? I accidental skipped a letter in my name when configuring TortoiseHg and now a few recent commits in the repo have the wrong author name. Unfortunately I have also pushed those commits to the bitbucket repo, and it's bugging the hell out of me.

Things I have already tried:
- hgcollapse will only allow you to collapse your own commits, not ones from another author (which technically is what's happening). Plus I'd rather keep the commits separate if possible
- Stripping the commits, and re-pushing my local repo to bitbucket. This re-pushed the wrong author names as expected, even though I had already corrected my misspelling in the config. I'm hoping it's possible to manually edit the local repo somehow, then a strip and re-push would work?

uXs
May 3, 2005

Mark it zero!

Factor Mystic posted:

Is there any way to rename the author of a commit in Mercurial? I accidental skipped a letter in my name when configuring TortoiseHg and now a few recent commits in the repo have the wrong author name. Unfortunately I have also pushed those commits to the bitbucket repo, and it's bugging the hell out of me.

Things I have already tried:
- hgcollapse will only allow you to collapse your own commits, not ones from another author (which technically is what's happening). Plus I'd rather keep the commits separate if possible
- Stripping the commits, and re-pushing my local repo to bitbucket. This re-pushed the wrong author names as expected, even though I had already corrected my misspelling in the config. I'm hoping it's possible to manually edit the local repo somehow, then a strip and re-push would work?

My first instinct would be to try the convert extension. There's bound to be some way to map usernames to other usernames there while you do the conversion.

Rat Supremacy
Jul 15, 2007

The custom title is an image and/or line of text that appears below your name in the forums
Is there a tool like gitk or the network graph generator on github, but for Windows?

Github is being slow and hasn't updated (including file listings, latest commits, branch lists and of course the graph) since this afternoon. It is pissing me off.

Profane Obituary!
May 19, 2009

This Motherfucker is Dead

Factor Mystic posted:

Is there any way to rename the author of a commit in Mercurial? I accidental skipped a letter in my name when configuring TortoiseHg and now a few recent commits in the repo have the wrong author name. Unfortunately I have also pushed those commits to the bitbucket repo, and it's bugging the hell out of me.

Things I have already tried:
- hgcollapse will only allow you to collapse your own commits, not ones from another author (which technically is what's happening). Plus I'd rather keep the commits separate if possible
- Stripping the commits, and re-pushing my local repo to bitbucket. This re-pushed the wrong author names as expected, even though I had already corrected my misspelling in the config. I'm hoping it's possible to manually edit the local repo somehow, then a strip and re-push would work?

It takes a little fiddling with to get it right but it works, i've done it.

http://stackoverflow.com/questions/732819/can-i-change-the-username-on-a-mercurial-changeset

Ferg
May 6, 2007

Lipstick Apathy

haywire posted:

Is there a tool like gitk or the network graph generator on github, but for Windows?

Github is being slow and hasn't updated (including file listings, latest commits, branch lists and of course the graph) since this afternoon. It is pissing me off.

Gitk runs on Windows. It's part of msysgit.

There's a few alternative tools you can find here: http://git.or.cz/gitwiki/InterfacesFrontendsAndTools#GraphicalInterfaces, but all of the Windows tools I found on there were kind of poo poo. The best alternative to gitk that I've found is gitg for Linux which is only prettier than gitk, it's not more powerful.

Ahz
Jun 17, 2001
PUT MY CART BACK? I'M BETTER THAN THAT AND YOU! WHERE IS MY BUTLER?!
I've got a question for a specific use for version control. My company has a license for Clearcase and we do make use of it for source version control. My issue is that I am in charge of system documentation and would like to implement version control for the documentation as well (Word docs, models, and other varying binaries etc.)

My requirements are as follows:
Full developer access to the system documentation library
Audit trails
Full previous versions going back at least 10 versions
Production copies of all files published to a network share where non-deveopers who don't use or need any type of version control client/tool can get at the latest production version

Can clearcase handle this? Would it be more work to use our current license and add a repository or VOB or whatever and have to go through possible configuration/change management headaches than to perhaps go with some free cheap version control repository that's kept separate from clearcase?

My key requirements are most definitely the production version being automatically published to a network share and the audit trails.

Factor Mystic
Mar 20, 2006

Baby's First Post-Apocalyptic Fiction

uXs posted:

My first instinct would be to try the convert extension. There's bound to be some way to map usernames to other usernames there while you do the conversion.

Profane Obituary! posted:

It takes a little fiddling with to get it right but it works, i've done it.

http://stackoverflow.com/questions/732819/can-i-change-the-username-on-a-mercurial-changeset

Thanks, you guys are awesome, that did it. I overwrote the old local repo with the converted one, stripped the wrong changesets on bitbucket, and pushed the local repo. And it worked!

BizarroAzrael
Apr 6, 2006

"That must weigh heavily on your soul. Let me purge it for you."
I've got a guy who would like a script for build machines to revert all local changes and update to a specified version. Is the way to do this just to svn revert the whole project, then svn update it all, or is there something more elegant? Revert seems to only allow you to change stuff to the HEAD revision.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

BizarroAzrael posted:

I've got a guy who would like a script for build machines to revert all local changes and update to a specified version. Is the way to do this just to svn revert the whole project, then svn update it all, or is there something more elegant? Revert seems to only allow you to change stuff to the HEAD revision.

"svn revert" reverts to the version you checked out, not to HEAD.

BizarroAzrael
Apr 6, 2006

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

Avenging Dentist posted:

"svn revert" reverts to the version you checked out, not to HEAD.

Ah, so I will need a separate Update command, cheers.

Horse Cock Johnson
Feb 11, 2005

Speed has everything to do with it. You see, the speed of the bottom informs the top how much pressure he's supposed to apply. Speed's the name of the game.
My company is toying with the idea of migrating to Subversion, which I'm familiar with but have only used on small projects where I've been the only developer. Basically I'd just like to get some suggestions on the best type of setup for our web applications.

We're currently using Visual Studio 2008 with CruiseControl.NET and SourceGear Vault.

Currently we have three environments (development, testing and production) and a Vault repository for each environment. When developing on our local machines we check in/out from the dev repo. We then have a separate machine that we use to publish to test & production, so when stuff is ready to go out we have to manually add every single new and modified file to the right Visual Studio project on this machine, check it into the repository and then CruiseControl handles the building and publishing.

What's the best practice with Subversion? Do we just continue doing the same thing except with Subversion repos? Or is there a better way?

Horse Cock Johnson fucked around with this message at 18:28 on Aug 21, 2009

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

CommunityPancakeDay posted:

We then have a separate machine that we use to publish to test & production, so when stuff is ready to go out we have to manually add every single new and modified file to the right Visual Studio project on this machine, check it into the repository and then CruiseControl handles the building and publishing.

This part sounds really goofy and weird. A cursory glance at the CruiseControl.NET page tells me that it supports SVN, so chances are you can have it point to a tag in your development repo and check out from that whenever it updates. (Tags are used as a way of "bookmarking" a revision in your repo, usually to say "this is the code for released version X.Y.Z").

Adbot
ADBOT LOVES YOU

Horse Cock Johnson
Feb 11, 2005

Speed has everything to do with it. You see, the speed of the bottom informs the top how much pressure he's supposed to apply. Speed's the name of the game.

Avenging Dentist posted:

This part sounds really goofy and weird.

It's always felt really goofy and weird, but it was set up that way long before I ever got here. If there's a better way of doing things I'd love to not bother with that any more.

Avenging Dentist posted:

A cursory glance at the CruiseControl.NET page tells me that it supports SVN, so chances are you can have it point to a tag in your development repo and check out from that whenever it updates. (Tags are used as a way of "bookmarking" a revision in your repo, usually to say "this is the code for released version X.Y.Z").

Yeah, I'm aware of the branch and tag functionality in SVN which (I think) is the biggest reason for us to migrate to it. It's just something that Vault doesn't do very well - or, that we've never been able to get it to do very well.

So theoretically we could have one repository, create a branch off the trunk for feature X, develop and test against that branch, merge that branch back into the trunk when feature X is ready to go live and then immediately create a tag to represent the code that went live when we pushed out feature X.

Does that make sense? I'm going to make the "this is how it would work with Subversion" pitch on Monday morning and I want to be sure I know what I'm talking about.

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