[darcs-users] [Haskell-cafe] Reverting to any old version using Darcs

Eric Kow kowey at darcs.net
Sun Apr 5 21:03:18 EDT 2009


On Wed, Apr 1, 2009 at 11:25 PM, Claus Reinke <claus.reinke at talk21.com>wrote:
> > Perhaps the rumours refer to non-tagged "versions"? In conventional
> > non-distributed version control systems, one
> > might go back to the version on a specific date, while with
> > darcs, that only makes sense wrt a specific repo (I think?).

On Wed, Apr 01, 2009 at 23:43:36 +0200, Peter Verswyvelen wrote:
> Yes, that might be the rumor indeed, it surely sounds like it :)
> Darcs is really very different, so it takes a while to get used to it when
> coming from other systems.

This has been said in one of the earlier responses, but I thought it was
worth repeating: darcs has a notion of context files which can be used to
retrieve exactly another version of a repository with darcs get
--context name-of-file.

You can generate such files by invoking darcs changes --context.  For
that matter, patch bundles (as created by darcs send) can also be used
as context files.  It's sometimes quite handy to do something like darcs
get --context foo.dpatch to retrieve exactly the version of the
repository a patch bundle was meant to apply to.

This is one of the little known features of darcs, and should probably
appear in some kind of darcs tips series of blog articles :-)

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090406/32382e72/attachment.bin


More information about the Haskell-Cafe mailing list