.hgtags
author Gilles Moris <gilles.moris@free.fr>
Sun, 18 Oct 2009 14:35:36 +0200
changeset 9615 f51d1822d6fd
parent 9191 0d7b21053805
child 9870 f6a2dbbb0776
permissions -rw-r--r--
setup: refactor the version string to a subset of tag+tagdist-hash+date Here is an array summarizing the mercurial version string: [A] [B] [C] [D] [1] clone tag clean => tag [2] clone hash clean => latesttag+latesttagdistance-hash [3] clone tag dirty => tag+date [4] clone hash dirty => latesttag+latesttagdistance-hash+date [5] archive tag clean => tag [6] archive hash clean => latesttag+latesttagdistance-hash Column [A]: Mercurial built from an hg *archive* or hg *clone* working directory Column [B]: revision built has a *tag* or else default to the SHA1 *hash* Column [C]: working tree *clean* or *dirty* Column [D]: Mercurial version string Over the previous version: - row [5] did return just the node hash, now it returns the tag - prepend the latest tag and the distance to it to rows [2][4][6] - append also the date to row [3]; previously, it was just the tag - the version string is with an empty string to avoid possible TypeError exceptions during string manipulations - factorize the function to run hg commands; remove the error message as it is no more specific to the function. This scheme enables to have first part of the version strings that can be compared, whether it has been built from a tagged or untagged revision. The second part of the version adds a hash for untagged revisions and today's date if the working tree has local modifications. As the version string does not contain spaces or special characters, it should not break script parsing the 'hg version' command and should be usable for use in file names. The new code also ensure that the version string has exactly the same version string, whether it has been built from an archive or from a clone.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
66
5ec8b2ed858f Beginnings of changelog tagging
mpm@selenic.com
parents:
diff changeset
     1
d40cc5aacc31ed673d9b5b24f98bee78c283062c 0.4f
5ec8b2ed858f Beginnings of changelog tagging
mpm@selenic.com
parents:
diff changeset
     2
1c590d34bf61e2ea12c71738e5a746cd74586157 0.4e
5ec8b2ed858f Beginnings of changelog tagging
mpm@selenic.com
parents:
diff changeset
     3
7eca4cfa8aad5fce9a04f7d8acadcd0452e2f34e 0.4d
5ec8b2ed858f Beginnings of changelog tagging
mpm@selenic.com
parents:
diff changeset
     4
b4d0c3786ad3e47beacf8412157326a32b6d25a4 0.4c
189
37625132fe37 Add tag for 0.5
mpm@selenic.com
parents: 66
diff changeset
     5
f40273b0ad7b3a6d3012fd37736d0611f41ecf54 0.5
194
4ec26766be83 Update tags
mpm@selenic.com
parents: 189
diff changeset
     6
0a28dfe59f8fab54a5118c5be4f40da34a53cdb7 0.5b
458
ff8fbf99cd64 Added tag 0.6 for changeset 12e0fdbc57a0be78f0e817fd1d170a3615cd35da
mpm@selenic.com
parents: 194
diff changeset
     7
12e0fdbc57a0be78f0e817fd1d170a3615cd35da 0.6
685
79fb7032739f Added tag 0.6b for changeset 4ccf3de52989b14c3d84e1097f59e39a992e00bd
Matt Mackall <mpm@selenic.com>
parents: 458
diff changeset
     8
4ccf3de52989b14c3d84e1097f59e39a992e00bd 0.6b
972
0bc72d91aeda Added tag 0.6c for changeset eac9c8efcd9bd8244e72fb6821f769f450457a32
mpm@selenic.com
parents: 685
diff changeset
     9
eac9c8efcd9bd8244e72fb6821f769f450457a32 0.6c
1266
703783bc09c4 Added tag 0.7 for changeset 979c049974485125e1f9357f6bbe9c1b548a64c3
mpm@selenic.com
parents: 981
diff changeset
    10
979c049974485125e1f9357f6bbe9c1b548a64c3 0.7
1666
0fc1b588976f Added tag 0.8 for changeset 3a56574f329a368d645853e0f9e09472aee62349
Matt Mackall <mpm@selenic.com>
parents: 1266
diff changeset
    11
3a56574f329a368d645853e0f9e09472aee62349 0.8
2052
c0b945c5df08 Added tag 0.8.1 for changeset 6a03cff2b0f5d30281e6addefe96b993582f2eac
Matt Mackall <mpm@selenic.com>
parents: 1666
diff changeset
    12
6a03cff2b0f5d30281e6addefe96b993582f2eac 0.8.1
2252
ba7afc7dd901 Added tag 0.9 for changeset 35fb62a3a673d5322f6274a44ba6456e5e4b3b37
Matt Mackall <mpm@selenic.com>
parents: 2052
diff changeset
    13
35fb62a3a673d5322f6274a44ba6456e5e4b3b37 0.9
2659
93b765f30c07 Added tag 0.9.1 for changeset 2be3001847cb18a23c403439d9e7d0ace30804e9
Matt Mackall <mpm@selenic.com>
parents: 2252
diff changeset
    14
2be3001847cb18a23c403439d9e7d0ace30804e9 0.9.1
3866
740b2a23c0db Added tag 0.9.2 for changeset 36a957364b1b
Matt Mackall <mpm@selenic.com>
parents: 2659
diff changeset
    15
36a957364b1b89c150f2d0e60a99befe0ee08bd3 0.9.2
3924
b27f1da6ca88 Added tag 0.9.3 for changeset 27230c29bfec
Matt Mackall <mpm@selenic.com>
parents: 3866
diff changeset
    16
27230c29bfec36d5540fbe1c976810aefecfd1d2 0.9.3
4724
a084ed4b0c35 Added tag 0.9.4 for changeset fb4b6d5fe100
Matt Mackall <mpm@selenic.com>
parents: 3924
diff changeset
    17
fb4b6d5fe100b0886f8bc3d6731ec0e5ed5c4694 0.9.4
5473
040984468440 Added tag 0.9.5 for changeset 23889160905a
Matt Mackall <mpm@selenic.com>
parents: 4724
diff changeset
    18
23889160905a1b09fffe1c07378e9fc1827606eb 0.9.5
6387
cfa08c88a5c4 Added tag 1.0 for changeset bae2e9c838e9
Matt Mackall <mpm@selenic.com>
parents: 5473
diff changeset
    19
bae2e9c838e90a393bae3973a7850280413e091a 1.0
6623
58d4c6ae99f7 Added tag 1.0.1 for changeset d5cbbe2c49ce
Matt Mackall <mpm@selenic.com>
parents: 6387
diff changeset
    20
d5cbbe2c49cee22a9fbeb9ea41daa0ac4e26b846 1.0.1
6882
6ca12c67447c Added tag 1.0.2 for changeset d2375bbee6d4
Matt Mackall <mpm@selenic.com>
parents: 6623
diff changeset
    21
d2375bbee6d47e62ba8e415c86e83a465dc4dce9 1.0.2
7462
40098e76d376 Added tag 1.1 for changeset 2a67430f92f1
Matt Mackall <mpm@selenic.com>
parents: 6882
diff changeset
    22
2a67430f92f15ea5159c26b09ec4839a0c549a26 1.1
7531
e9d21bbfd4cc Added tag 1.1.1 for changeset 3773e510d433
Matt Mackall <mpm@selenic.com>
parents: 7462
diff changeset
    23
3773e510d433969e277b1863c317b674cbee2065 1.1.1
7555
5a6f417fa029 Added tag 1.1.2 for changeset 11a4eb81fb4f
Matt Mackall <mpm@selenic.com>
parents: 7531
diff changeset
    24
11a4eb81fb4f4742451591489e2797dc47903277 1.1.2
7824
0b5c7c239d29 Added tag 1.2 for changeset 11efa41037e2
Matt Mackall <mpm@selenic.com>
parents: 7555
diff changeset
    25
11efa41037e280d08cfb07c09ad485df30fb0ea8 1.2
7863
34eaa67fc7ea Added tag 1.2.1 for changeset 02981000012e
Matt Mackall <mpm@selenic.com>
parents: 7824
diff changeset
    26
02981000012e3adf40c4849bd7b3d5618f9ce82d 1.2.1
9010
475a02734d84 Added tag 1.3 for changeset 196d40e7c885
Matt Mackall <mpm@selenic.com>
parents: 7863
diff changeset
    27
196d40e7c885fa6e95f89134809b3ec7bdbca34b 1.3
9191
0d7b21053805 Added tag 1.3.1 for changeset 3ef6c14a1e8e
Matt Mackall <mpm@selenic.com>
parents: 9010
diff changeset
    28
3ef6c14a1e8e83a31226f5881b7fe6095bbfa6f6 1.3.1