##// END OF EJS Templates
revset: add wdir() function to specify workingctx revision by command...
Yuya Nishihara -
r24419:0e41f110 default
parent child Browse files
Show More
@@ -1852,6 +1852,16 b' def user(repo, subset, x):'
1852 1852 """
1853 1853 return author(repo, subset, x)
1854 1854
1855 def wdir(repo, subset, x):
1856 """``wdir()``
1857 Working directory.
1858 """
1859 # i18n: "wdir" is a keyword
1860 getargs(x, 0, 0, _("wdir takes no arguments"))
1861 if None in subset:
1862 return baseset([None])
1863 return baseset()
1864
1855 1865 # for internal use
1856 1866 def _list(repo, subset, x):
1857 1867 s = getstring(x, "internal error")
@@ -1947,6 +1957,7 b' symbols = {'
1947 1957 "tagged": tagged,
1948 1958 "user": user,
1949 1959 "unstable": unstable,
1960 "wdir": wdir,
1950 1961 "_list": _list,
1951 1962 "_intlist": _intlist,
1952 1963 "_hexlist": _hexlist,
@@ -2019,6 +2030,7 b' safesymbols = set(['
2019 2030 "tagged",
2020 2031 "user",
2021 2032 "unstable",
2033 "wdir",
2022 2034 "_list",
2023 2035 "_intlist",
2024 2036 "_hexlist",
@@ -509,6 +509,14 b' Test null revision'
509 509 1
510 510 0
511 511
512 Test working-directory revision
513 $ hg debugrevspec 'wdir()'
514 None
515 $ hg debugrevspec 'tip or wdir()'
516 9
517 None
518 $ hg debugrevspec '0:tip and wdir()'
519
512 520 $ log 'outgoing()'
513 521 8
514 522 9
@@ -240,6 +240,17 b" Check 'status -q' and some combinations"
240 240 $ rm deleted
241 241 $ hg copy modified copied
242 242
243 Specify working directory revision explicitly, that should be the same as
244 "hg status"
245
246 $ hg status --change "wdir()"
247 M modified
248 A added
249 A copied
250 R removed
251 ! deleted
252 ? unknown
253
243 254 Run status with 2 different flags.
244 255 Check if result is the same or different.
245 256 If result is not as expected, raise error
General Comments 0
You need to be logged in to leave comments. Login now