##// END OF EJS Templates
merge with crew-stable
Alexis S. L. Carvalho -
r4896:ee04732f merge default
parent child Browse files
Show More
@@ -295,6 +295,8 def _convert(ui, src, dest=None, mapfile
295 295 srcauthor=whatever string you want
296 296 '''
297 297
298 util._encoding = 'UTF-8'
299
298 300 if not dest:
299 301 dest = hg.defaultdest(src) + "-hg"
300 302 ui.status("assuming destination %s\n" % dest)
@@ -1993,7 +1993,10 def parents(ui, repo, file_=None, **opts
1993 1993 """
1994 1994 rev = opts.get('rev')
1995 1995 if file_:
1996 ctx = repo.filectx(file_, changeid=rev)
1996 files, match, anypats = cmdutil.matchpats(repo, (file_,), opts)
1997 if anypats or len(files) != 1:
1998 raise util.Abort(_('can only specify an explicit file name'))
1999 ctx = repo.filectx(files[0], changeid=rev)
1997 2000 elif rev:
1998 2001 ctx = repo.changectx(rev)
1999 2002 else:
@@ -1,8 +1,8
1 1 #!/bin/sh
2 2 # test parents command
3 3
4 hg init a
5 cd a
4 hg init repo
5 cd repo
6 6 echo % no working directory
7 7 hg parents
8 8
@@ -25,3 +25,20 hg parents -r 2
25 25
26 26 echo % hg parents -r 2 a
27 27 hg parents -r 2 a
28
29 echo % hg parents -r 2 ../a
30 hg parents -r 2 ../a
31
32 echo '% cd dir; hg parents -r 2 ../a'
33 mkdir dir
34 cd dir
35 hg parents -r 2 ../a
36
37 echo '% hg parents -r 2 path:a'
38 hg parents -r 2 path:a
39
40 echo '% hg parents -r 2 glob:a'
41 cd ..
42 hg parents -r 2 glob:a
43
44 true
@@ -26,3 +26,19 user: test
26 26 date: Thu Jan 01 00:00:00 1970 +0000
27 27 summary: ab
28 28
29 % hg parents -r 2 ../a
30 abort: ../a not under root
31 % cd dir; hg parents -r 2 ../a
32 changeset: 0:b6a1406d8886
33 user: test
34 date: Thu Jan 01 00:00:00 1970 +0000
35 summary: ab
36
37 % hg parents -r 2 path:a
38 changeset: 0:b6a1406d8886
39 user: test
40 date: Thu Jan 01 00:00:00 1970 +0000
41 summary: ab
42
43 % hg parents -r 2 glob:a
44 abort: can only specify an explicit file name
General Comments 0
You need to be logged in to leave comments. Login now