In the olden days, to make a patch to a module, you had to have the original, untouched file and a copy that you modified. You'd then use diff to compare the two files.
At the Pittsburgh Perl Workshop, Ricardo was asking how to do some odd thing in git. Instead of anyone answering his question, everyone asked what he was doing. It turns out he was patching someone's module and making it a git repo while he worked. The process is really handy:
git initgit add .git commit -m "* Version 1.23 from CPAN"git format-patch --stdout -1There are other ways that you can do this, and you can change around the process in git. I like that git is lightweight enough to make it actually useful for everyday work.
can be submitted to RT directly too... (Score:1)
A variation on step 6 and 7:
step 6. Generate patch with
git format-patch -1step 7. Send directly to the RT queue for the module, assuming that the first line of the commit description makes a good bug title and the rest a decent description:
git send-email -to bug-Language-l33t@rt.cpan.org 0001-mypatch. (one can also uses--composeto write something different as the description as well)step 8. Marty's your uncle as well. :-)
darcs works well for this too (Score:1)
go with git, or with subversion, it's all the same (Score:1)
with apologies to Miguel de Cervantes, Pierre Menard, Joe Darion, and Sophia Loren/Sheena Easton ...
the workflow with subversion would be the same, except the default output of 'svn diff' is usable by patch, so no special command needed.
I used the equivalent of svn diff | ( cd $newdir; patch) just the other day to propagate changes from a local svn tree to one built with https login & comit bit.
Bill
# I had a sig when sigs were cool
use Sig;
Re:go with git, or with subversion, it's all the s (Score:2)
How would you do this in Subversion without maintaining a repository? Maybe you can, but I just don't know how.
Re: (Score:1)
a local repository of any sort ... even old sccs/rcs ... is always a good idea for hyper-meta-undo, if for nothing else. if git is better for that than svn, that's interesting news.
see also answer to Aristotle's similar question.
Bill
# I had a sig when sigs were cool
use Sig;
Re: (Score:1)
That is exactly what git (or any other DVCS for that matter) is so good for. :-)
In fact, that’s something I’ve said a couple of times – that DVCSs represent a backtracking to what local-only systems like RCS offered, and a move forward from there in the opposite direction for cross-host collaboration from the one that CVS and its offspring Subversion took. Instead of layering collaboration onto RCS by moving the repository out of a subdirectory of the working copy and behind a networked d
Re: (Score:1)
Subversion makes the mental overhead of creating a repository very much greater than any DVCS, where you just say
git initorhg initorbzr initor whatever you prefer – there’s no need to pick a place for you repository, it just goes wherever your working copy is. There’s also no need to turn the current directory into a working copy after checking it in initially by checking it right back out, which may in turn require casting a path to a URL (sincesvnadminonly works locally).It seems
Re: (Score:1)
i see your point that if you have just a tarball of source, creating a local repository easily is good. Needing a cheat sheet for creating
Bill
# I had a sig when sigs were cool
use Sig;
Re: (Score:1)
Sure, but you have to do it. Subversion does not (and by its nature as a centralised system cannot) provide a useful default for you, so everyone needs to establish their own convention and then script the sequence to their preferences. That’s obvious blinking twelve territory.