4

I mean that I need to identify a set of applied patches by some number or a string to quickly check if I have the same code version as the other people without any synchronizations.

Is there some built-in darcs solution for this?

sbos
  • 307
  • 4
  • 11

2 Answers2

5

There's no short identifier for this - it's one of the downsides of the cheap cherry-picking darcs gives you. You can get a long identifier by first running darcs optimize --reorder and then looking at the output of darcs changes --context - but two repos with the same contents might list things in the context in different order, so it's still not perfect. You could sort the output and compare those.

So overall

darcs optimize --reorder
darcs changes --context | sort | md5sum

would give you a reasonable approximation of a version identifier.

The darcs optimize --reorder step isn't absolutely necessary, it's just possible that without it you'll get different results when the repos actually contain the same set of patches.

Ganesh Sittampalam
  • 28,821
  • 4
  • 79
  • 98
1

You can also use darcs pull and darcs push to see whether there are any patches not synchronized.

$ darcs pull --dry-run ; darcs push --dry-run


Would pull from "/home/masse/temp/2013/01/09/tests/project"...
Would pull the following changes:
Wed Jan  9 16:39:50 EET 2013  mats.rauhala@iki.fi
  * Canonical order for colors

Making no changes: this is a dry run.
Would push to "/home/masse/temp/2013/01/09/tests/project"...
No recorded local changes to push!
Masse
  • 4,334
  • 3
  • 30
  • 41
  • Using `darcs pull` and `darcs push` is I think the common way to check for differences. Since both commands are interactive, you can also run them and see the result, possibly press `c` to get the patch count, and then exit without pulling anything. – Mark Stosberg Aug 15 '13 at 01:03