Tracking base revision for files distributed without a repo
Matt Mackall
mpm at selenic.com
Thu Jan 23 20:19:56 UTC 2014
On Wed, 2014-01-22 at 23:47 -0600, Benjamin Fritz wrote:
> I have a set of scripts which I personally maintain in Mercurial.
> These scripts are often useful to other people, so I occasionally
> email updates to my coworkers (mostly on request).
>
> Now, these coworkers have no interest whatsoever in learning or using
> Mercurial. For these particular files, they couldn't care less about
> version control, far that matter.
>
> But when they occasionally email me back a modified copy of the script
> to fix a bug or expand the types of data it can handle, I'd really
> like to know where to start when merging in changes. They always send
> back just the modified files, not the directory I sent them, so I
> can't just go off the file created when I do an export, or just zip up
> a working copy and send it to them.
>
> I think this would be a good use-case for the KeywordExtension, but
> the wiki page http://mercurial.selenic.com/wiki/KeywordExtension calls
> this a "feature of last resort" without offering any alternatives
> which fit my needs.
>
> Are there better solutions than just embedding the revision in the
> file using KeywordExtension? Solutions that allow my coworkers to
> continue being lazy but allowing me to benefit from knowing which
> version they base any changes off, what to tell them I've changed
> since the last time I sent them updates, etc.?
Ideally, there'd be a way to ask Mercurial "which revision of file X is
closest to this copy here?"
Here's one way to do that on the command line (using the file 'hg'):
$ for x in `hg log hg --template "{rev}\n"`; do echo -n "$x "; hg diff
-r $x hg | wc -l ; done
14233 0
12805 11
12661 21
10263 35
8225 37
7672 39
5531 44
5197 42
5178 41
4635 43
3877 46
1698 46
515 49
457 49
280 49
249 49
248 57
247 152
246 275
245 442
241 563
237 563
230 563
227 563
226 564
224 569
220 573
219 572
213 578
210 597
209 600
207 646
206 646
203 646
198 620
196 620
193 619
192 619
188 620
175 620
174 616
163 611
162 611
158 603
155 586
150 586
145 577
142 577
130 577
129 575
124 571
123 578
122 578
121 575
107 567
106 561
105 564
104 563
103 459
93 545
92 545
91 532
89 529
88 524
87 524
83 484
81 483
80 481
79 456
74 441
70 441
69 441
68 433
67 423
65 411
64 411
62 402
56 403
54 393
53 393
52 393
50 393
49 389
46 383
39 375
38 379
34 380
33 372
31 356
29 350
24 350
23 336
22 336
21 322
18 321
17 312
16 294
11 294
5 289
0 288
--
Mathematics is the supreme nostalgia of our time.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list