Declan Naughton wrote:
> In revision control systems like Mercurial and git, every time the
> repository is updated (recorded to in darcs terms) a new revision
> identifier is associated with it's new state, so that it can be
> referred to for checkouts and such.
> 
> In darcs, users MUST MANUALLY use tags, this I consider quite a
> downfall. Would it be a bad or a good idea for darcs to checksum the
> context and record this with records, and, (being the revision
> identifier) printing this out in 'darcs changes', providing for 'darcs
> get --rev=xxxxxxxxx' etc?
> 
> Or what am I overlooking?

Generally the consensus is that the distributed nature of darcs, plus 
the ability to cherry-pick individual patches, doesn't lend itself to 
useful universally unique numbers for revisions.  Various non-universal 
numbering schemes have been suggested, but thus far none have been 
implemented.  (Some have even suggested automagic tagging to some extent 
or another.  You could write an external script to do something of that 
sort if you really wanted... but said script would probably be better 
off recording useful context files and leaving tags for meaningful states.)

Anyway, the easiest way to say "here's a specific non-tagged version of 
the repository that I want you to get" in darcs is to pass along a 
context file (the output of ``darcs changes --context``) and you can 
``darcs get remote:repo --context=some/file.context``.  Context files 
are also very useful when repositories cannot directly communicate 
(firewall, etc) but need to share states so that patches can be emailed 
back and forth.  Context files are very much a darcs developers' best 
friend for communicating repository state and I don't think sending a 
simple context file is any more/less confusing/complicated/tough than 
trying to copy and paste some arbitrary n-digit numeral.  Maybe I'll 
write an article on my impressions of Darcs and Context files versus Tags...

More ways of getting other developers to specific states is to focus on 
good patch style.  Patches should be reasonably "atomic" (do what they 
say they do, contain everything needed or directly depend on anything 
not included), which is something often preached by all VCSes, but Darcs 
generally rewards good behavior a bit better than most.  Darcs offers a 
number of ways to say get me "patch x" and everything it depends on, and 
if things are reasonably atomic, that takes care of 80% of your needs to 
jump to a specific "revision".  If your patches have generally 
informative names and comments you can do that very well with darcs' 
interactive push/pull.  Memorable patch names can be searched for by 
command line with regexes and there is a "universally unique" hash 
identifier for every patch if you want a very specific command line that 
can be copy and pasted.

Tags are indeed the way to name a specific collection of patches and 
there is basically no overhead for tags and creating a new tag takes 
only time to name it, so I don't see manually "required" tags as that 
much of a downfall anyway.

--
--Max Battcher--
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to